We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I want to extract the luminosity value of the pixels of greyscale images as a matrix in a .txt file, process them mathematicaly in a suitable program (e.g excel) and recombine them in a new image. I'm totaly ignorant about programming so any help would be of great help. Thanks
Answers
look here:
https://www.processing.org/reference/PImage_pixels.html
When you got this:
This code is supposed to read a file:
See also
get()
in the reference.Re:
This is (probably) a really bad idea. It is much, much easier (and faster, and more reliable) to mathematically process matrices of pixels using the Processing language, rather than exporting them to Excel, doing math on them, then reimporting them.
If you provide details of your calculations on your brightness and how it will be recombined with your original image, it could be implemented here on chrisir's code. Just give it a try!
Kf
Anything that can be done in excel can be done in Processing. So why use excel?
Thank you a lot for your help!!!
The math that I want to do is very simple; like summing or averaging the (Xi,Yj) pixel of two images or to maintain the relative values of the pixels' luminosity of an image while setting their sum to a specific value. I'm sure that using excel is a very large detour, and I think that if a get a proper result on some tests that I' m running, I' ll try to use code in processing.
Good decision. Excel (or such other software) will only complicate the process more.