TIF image intensity filter
이전 댓글 표시
Hi,
I have a tif image, which is an object with high intensity light reflecting off of it and I want to locate the surface by using the pixels of maximum intensity. The file is loaded as follows:
% Read the *.tif image into the workspace and display it:
img = double(imread(tif_fileName));
img = ( img == max( img(:) ) );
% Check with a plot of maximum intensity:
imagesc(img); axis xy;
% Find the locations of pixels of max intensity:
[J I] = find(img);
The problem I have is that there is a line of pixels, where the surface is, which is quite obvious and I want to do a search for the ends of this line, but there are some erroneous pixels, elsewhere in the image, which are interfering with the search for these positions, does anyone have an idea of how to only do a search for a line of pixels, the closest I have got to doing this is something as follows:
for k = 1:( length(I) - 1 )
if ((( I(k + 1) ) - I(k) ) == 1) % This finds where the i +1th pixel minus the i pixel step is 1 (if more than one is noise (try plot of I and J)!
pixel_loc_I = k;
break
end
end
This finds the I location ok but the J location is problematic. Does anyone have an idea of how i could filter the data a bit or do something so that I only get the pixels I want clustered around the object reflection line? The line is a straight line, so I just need to locate the end points to define the surface I want.
Many Thanks,
Robbie
댓글 수: 6
Image Analyst
2012년 11월 30일
Robbie
2012년 11월 30일
Image Analyst
2012년 11월 30일
Where have we seen this image before? Is it one for a class that a professor uploaded? Is this a homework problem?
Robbie
2012년 11월 30일
Image Analyst
2012년 11월 30일
A few months ago I did some code for an image that looked virtually identical. They had some kind of a bright edge or blade tilted in the middle of the picture and it was surrounded by a glow or glare of noise - pretty similar in appearance to your image. I think it either had material streaming around it, or it was illuminated by a laser, or some other reason why the noise was there. I can't find the message though. Maybe I'll take a shot at yours if I get time today.
Robbie
2012년 11월 30일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Images에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!