BONJOUR à tous,
mon projet c'est de détecter des défauts sur surface d'un carreau (point noir,fissure)
j'ai pris l'image d'un carreau blanc sur fond noir.
je veux me débarrasser de l'arrière-plan et conserver les caractéristiques du carreau, j'ai un code qui ne fonctionne pas bien: voici
please help me!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 a=imread('1.jpg'); figure; imshow(a); b=rgb2gray(a) b = im2double(b); %convert to double thresh_level = graythresh(b); %find best threshold level c = b > thresh_level; %do thresholding imshow(c) d = im2double(c).*b; %c is binary, so we need to convert it first imshow(d,[])
Partager