Info

This question is closed. Reopen it to edit or answer.

How to take maximum vector from the image? Can anyone name the function

1 view (last 30 days)
I am trying to develop following algorithm...
The threshold value based on maximum pixel value
in the image is as follows:
Algorithm:
1.) Take maximum vector from the image.
2.) If max>0.8 then T=max*0.7
3.) Else if max<0.6 %
This means this image tends to be in dark range, so
it is not related T=0.6
4.) Else T=max*0.6
5.) If bw(x,y) is the threshold version of I(x,y)
then,1 if I(x,y)> Tbw(x,y)0 otherwise
  2 Comments
Jan
Jan on 7 May 2019
What exactly is a "maximum vector of an image"? Does the explanation of the algorithm calrify the question?
This is not clear to me: " If bw(x,y) is the threshold version of I(x,y) then,1 if I(x,y)> Tbw(x,y)0 otherwise"
Anil K
Anil K on 7 May 2019
This is the point I am not understanding (maximum vector of an image)...remaing is clear..Untitled.png

Answers (1)

Image Analyst
Image Analyst on 7 May 2019
With g1 = g at time 1, and g2 = g at time 2, try
t=0.1
bw1 = 255 / (1-t) + (1/(1-t)) * double(g1);
t=0.2
bw2 = 255 / (1-t) + (1/(1-t)) * double(g2);
deltaBw1 = bw1 == 1;
deltaBw2 = bw2 == 1;
img = sum(deltaBw1(:) - sum(deltaBw2(:));
I don't think img will be an image since you're summing up all the pixels into a single number. But if you do this for lots of different times, you can put all the img scalars into a vector, like you want.
  1 Comment
Anil K
Anil K on 7 May 2019
Thanks for your asnwer. I have tried but not achieved desired...actual I want...as per following requirementUntitled.png

Tags

Community Treasure Hunt

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

Start Hunting!