HSV Help - Imshow two thresholds
3 views (last 30 days)
Show older comments
Hey all,
I'm trying to display the following image in HSV, and setting the red and green thresholds. How can I do it so the user specifies with an input? Cheers
redlevel = input('Please insert a value between 0 and 1 for Red.\n','s');
red=str2double(redlevel);
objectofintrest = (objectofintrest(:,:,1)<(red));
greenlevel = input('Please insert a value between 0 and 1 for Green.\n','s');
green=str2double(greenlevel);
objectofintrest = ((objectofintrest(:,:,2))<(green));
% redgreen= [redlevel & grelevel];
imshow(objectofintrest, red, green);
5 Comments
Image Analyst
on 18 Apr 2013
Edited: Image Analyst
on 18 Apr 2013
Is objectofintrest an RGB image or an HSV image? What is the range of it? Between 0 and 255 or between 0 and 1?
Maybe you'd like my thresholding app: http://www.mathworks.com/matlabcentral/fileexchange/29372-thresholding-an-image
Answers (1)
Image Analyst
on 18 Apr 2013
Edited: Image Analyst
on 18 Apr 2013
Check out my color segmentation tutorials. There is one that works in HSV color space. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
0 Comments
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!