MathLab working on images

2 views (last 30 days)
francesco
francesco on 14 Mar 2014
Edited: Image Analyst on 19 Mar 2014
I have 2 images: VISUALSALIENCY and EVENTSALIENCY ( both images are in grey scale).. in VISULASALIENCY white is minimum and black is maximum.. in EVENTSALIENCY white is minumum and black is maximum .. i have to do an inversion , and should be somthing using the matrix of ONE ... ONE ...= ONE - VISUAL .. something similiar ....
then i have to do the thresholding of both images.. i need help thanks

Accepted Answer

Image Analyst
Image Analyst on 14 Mar 2014
No inversion is necessary. Just reverse the sign of the > sign if you want to find maximums that have values the opposite of what you'd normally think they should have.
% Threshold to get dark values, which are max saliencies for both arrays.
maxVisual = VISUALSALIENCY < 128; % or whatever
maxEvent = EVENTSALIENCY < 128; % or whatever
bothMax = maxVisual & maxEvent; % If you're interested in where both are max.
  8 Comments
francesco
francesco on 19 Mar 2014
i have to do the intersecton between the 2 fulls images.. i am not really good on mathlab , ..my teacher said i have to do first the inversion of visualsaliency because max and min are the opposite of event , then do the treeshold of both images and at end do the intersection between the 2 fulls images treshoolded
Image Analyst
Image Analyst on 19 Mar 2014
Edited: Image Analyst on 19 Mar 2014
Can you outline in red the two regions that should be ANDed? And show the final image. Is the final image the house image but only in the pair of really dark rectangles and everything else is black? And I know what your teacher is saying, but again, you don't actually need to do an inversion since it can be handles by how you do the thresholding.

Sign in to comment.

More Answers (1)

Walter Roberson
Walter Roberson on 14 Mar 2014
if the values in an array are in the range 0 to 1, then 1 minus the array will give the greyscale inversion.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!