I have a Python routine that uses the OpenCV library to process Planet Analytic 4-band imagery. It is working fine on individual Planet 4-band image files. However, it is having issues working on merged pairs of Planet 4-band imagery. I appreciate any assistance overcoming the issue described below.
I have merged a pair of 4-band Planet images using the GDAL_Merge.py function. The merged imagery looks good when I open it in ImageJ. All 4 bands are in the image and all the merged pixel values that I investigate are the same value as in the original non-merged image. My routine uses the OpenCV imgread() function to open the image and then imgsplit() routine to split it into the separate bands (blue, green, red, NIR). On the merged image, the array resulting from imgread('merged filename') is only being seen as a single band vice 4-bands. I print out the shape using img.shape and it shows me (row, cols) but only 1 channel (band). It should actually be (rows, cols, 4).
Does anyone know why the OpenCV imgread does not correctly open the merged image? What can I do to use imgread correctly on the merge image?
Please sign in to leave a comment.