How can I convert multiple images to grayscale thresholds, furthermore how can I convert those thresholds to binary strings?
6 views (last 30 days)
Show older comments
I've exported many frames from saved videos (.mp4) to .jpg and I want to convert them all to grayscale thresholds and then ideally into binary strings so that I can show a simplistic version of how the video progresses in a coded format.
I am new to MATLAB and would appreciate it if some advice could be in laymans terms/not hurl me immediately out of my depth. Thank you in advance.
0 Comments
Answers (1)
Image Analyst
on 15 Feb 2016
Attached is an example of how to read in a video and do something to each frame (get the mean), and plot it. I am not sure what algorithm you plan on using to convert the frame into a threshold - please share it. To convert a number to a binary string, use dec2bin(). I do not know how you would like to display all those binary strings, for example as numbers in the command window, as a line or bar plot, as an image, or ??????
5 Comments
Image Analyst
on 16 Feb 2016
I'm still not sure how you're going to derive the threshold number. And if you're going to threshold/binarize the image with that, and if you do, whether you want to display the binary image or just the binary value of the string of 1's and zeros.
See attached code where I build up a N by 8 image of binary data from randomly generated threshold values.

See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!