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)
Show older comments
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
Answers (1)
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
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!