From: Beho nashed on 16 Jun 2010 17:59 Hello, I have some samples that has different degrees of damage. http://drop.io/rlv072i you can see that there are two boundaries. I am trying to calculate the area of the small one. I tried to adjust the contrast, and then use some of the previously posted scripts such as creaseg and ImROI, it couldn't detect the small area. #[code] I=imread('sample.jpg'); J = IMADJUST(I,[0.1; 0.8],[0.2; 0.9],20); % I made gamma large, as it showed the area more visible. %imshow(I) %figure; %imshow(J) imwrite(J,'test_gamma.jpg'); h=rgb2gray(J); A = adapthisteq(h,'clipLimit',0.02,'Distribution','rayleigh'); figure, imshow(h); figure, imshow(A); gray_level = graythresh(A); % Trying to convert it to Black&White, but it doesn't really work BWImage = im2bw(A,gray_level); imwrite(BWImage,sample_mod.jpg'); figure, imshow(BWImage) image_size = size(BWImage); all_pixels = image_size(1,1) * image_size(1,2); count_w_pxl = (BWImage == 1); white_pixels = sum(sum(count_w_pxl)); pxl_in_sq = 70^2; Damage_Area = white_pixels / pxl_in_sq; [Code] Is there a simpler method to detect the small area and calculate its area
From: ImageAnalyst on 16 Jun 2010 18:26 Heck, I can't even detect the small area. What exactly is it that separates one area from the other? If I had to draw it, I'd have a tough time. Maybe you can draw it and post it and say what criteria you're using to decide where to draw it.
From: Beho nashed on 16 Jun 2010 18:39 "Beho nashed" <beho86(a)yahoo.com> wrote in message <hvbhf9$ep3$1(a)fred.mathworks.com>... > Hello, > I have some samples that has different degrees of damage. > http://drop.io/rlv072i > > you can see that there are two boundaries. I am trying to calculate the area of the small one. > > I tried to adjust the contrast, and then use some of the previously posted scripts such as creaseg and ImROI, it couldn't detect the small area. > > #[code] > > I=imread('sample.jpg'); > > J = IMADJUST(I,[0.1; 0.8],[0.2; 0.9],20); % I made gamma large, as it showed the area more visible. Hello ImageAnalyst, I uploaded what I meant ( http://drop.io/rlv072i ), something like that! The imadjust I am using is actually showing the area I am looking for! give it a try: I=imread('sample.jpg'); J = IMADJUST(I,[0.1; 0.8],[0.2; 0.9],20); %imshow(I) %figure; imshow(J) but I am not sure what to do after this.
From: ImageAnalyst on 16 Jun 2010 18:52 Beho: imadjust does nothing at all to help you. It just scales the image, that's all. You can find the objects equally well without scaling them beforehand. So now you need to define where the edges are because to me it looks like the are areas where blob 1 and blob 2 blend together pretty well. In that case you might have to get partial boundaries somehow and then use something like snakes to "complete" the boundary. Not easy. If you can segment based on intensity (perhaps by using just one of the color channels), or by color, then that's easier. Maybe you can use bilateral filtering to make the regions more uniform and the edges sharper and more distinct. See the examples on this page: http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html -ImageAnalyst
From: Beho nashed on 16 Jun 2010 19:04 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <53ed35ef-fc17-4674-a600-35de503b364c(a)a40g2000vbl.googlegroups.com>... > Beho: > imadjust does nothing at all to help you. It just scales the image, > that's all. You can find the objects equally well without scaling > them beforehand. So now you need to define where the edges are > because to me it looks like the are areas where blob 1 and blob 2 > blend together pretty well. In that case you might have to get > partial boundaries somehow and then use something like snakes to > "complete" the boundary. Not easy. If you can segment based on > intensity (perhaps by using just one of the color channels), or by > color, then that's easier. Maybe you can use bilateral filtering to > make the regions more uniform and the edges sharper and more > distinct. See the examples on this page: > http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html > -ImageAnalyst Hello ImageAnalyst, What I need is an approximate for the area. I know that they tend to overlap each other. I read about the imadjust, changing the gamma value changes the image intensity. The image generated by the imadjust doesn't show much from region one ( the larger region). I thought all what I needed is just to identify the area of the region in white. if I can eliminate the white noise around the image, and switch the color of the yellow to something darker, then I think I can convert the pic to B&W image. I would like to know your opinion? ( I am new to ML btw) thanks,
|
Next
|
Last
Pages: 1 2 Prev: Remember the Consolidator by John D'Errico? Next: Image Sequence Labelling Problem |