red colour intensity display for comparison
Show older comments
i have some images . 5 in number .all the images have red roses in it. my task is to just find out which image has the highest number of roses .and this i have to do it in most simple manner since i am a novice and have to start from ground zero.
hence i decided to just calculate the mean intensity of red colour in of each image.,
my codes are
I=imread('1.jpg'); rplane=i(:,:,1);
Z=mean(rplane)
question is "wheteher the image with maximum number of roses will have the maximum mean of red colour component"
whether such an idea is going to work out or i have to chalk out some other difficult stratergy....
please tell the very basic ideas as i am just a new hobbiesiest programmer trying to
Accepted Answer
More Answers (1)
Image Analyst
on 17 Sep 2011
0 votes
Assuming you have simple images for a beginning student project, your idea will probably suffice. For example all you have are roses (no other clutter such as leaves, vases and other stuff that varies from image to image) and all the roses are about the same size, etc. Just get the mean value of the red channel and look for the image with the highest mean red value, or the lowest mean blue value. It's not a super-robust method but I bet if you posted your images we'd find that it would work. I doubt you were supplied with very challenging images for a beginner exercise. If it doesn't work, then post your images so we can see what the complicating factors are.
Your code wouldn't exactly work because MATLAB is case sensitive so I is different than i. You shouldn't use i anyway since it's the imaginary variable. You should also use mean2() instead of mean().
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!