i want to convert an image into a matrix representing the intensity levels of the image please help me by providing what necessary header files has to be included or what will be the code (mathematical operation to be performed) so as to extract the intensity levels
either in c++ or java