Hello, I have an image (1024 x 1024) and I used the "fromfile" command in numpy to put every pixel of this image into a matrix.
How to reduce image size (for example, to 512 x 512) by changing this matrix?
a = numpy.fromfile(( - path - ,'uint8').reshape((1024,1024))
I do not know how to change matrix a to reduce image size. Therefore, if anyone has an idea, please share your knowledge, and I will be grateful. Thanks
EDIT:
When I look at the result, I find that the reader has read the image and placed it in the โmatrixโ. So I changed the "array" to a matrix.
Jose told me that I can only take an even column and even draw a row and put it in a new matrix. This will reduce the image to half the size. What command in scipy / numpy do I need to use for this?
thanks
Hold_My_Anger
source share