You therefore need to convert your “RGB matrix” into a “brightness matrix”. However, for this project you don’t care about colors and the individual RGB values - you’re only interested in the overall brightness of each pixel. You’ve now loaded a matrix of pixel data, where each pixel is represented as an RGB tuple. Convert the RGB tuples of your pixels into single brightness numbers # Delete or comment this debugging code out once you've established that it worksģ. # … and so on for many thousands of lines. It will only take 1 or 2 lines of code to load your image and print its height and width, but doing so will ensure you’ve got the library installed correctly, and help you get familiar with its documentation.Īt the end of this section, your program should print output that looks something like: Once you’ve found and installed a library, start by using it to simply read your image file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |