How to crop image using maximum pixel value in MATLAB
3 views (last 30 days)
Show older comments
Hello Everyone, I hope you are doing well, I have the following Image in which I have pixel values of 255 exist on index [80,85,355,550,600]
I want to find the maximum index Value Where 255 exist for example in above 600 is the maximum value then add 50 index in it to make new index maximum value to 650
Then i want to divided the index values [80,85,355,550,600] by maximum index (650). Then multiple it 10000, to get the index value.
Let say i have index 80 where 255 (white pixel) exist. Then divide the index by maximum value (650) Which gives the value 0.1230, Then we finally multiply it by 10000 to give the index 1230. this the new index where 255 values exist. or you can say we map 80 to 1230 using white pixel values.
Now the 255 exist on index [1230, 1307,5461, 8461, 9230]
and Then we crop the image based on this values How can i do it in MATLAB
Answers (0)
See Also
Categories
Find more on Get Started with MATLAB 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!