I have a Java application that uploads images. I'd like to determine if these images are RGB, infrared/thermal (we use an ironbow color palette specifically), or grayscale. I've found this answer for detecting if it's grayscale from user @FiReTiTi, but I'm clueless about how to do the same for infrared or RGB images.
There's no discernible difference in the EXIF metadata from our drone camera's RGB and infrared imagery. Furthermore, we are using various drones with different FLIR cameras where we can't simply rely on the make/model of camera being reliably helpful. Our "problem" drone is a DJI make drone with a "XT2" as the model for both RGB and infrared images. Other drones we dealt with had "FLIR" as the make so it was easy to see that it was infrared or not. These ones do not.
Because of these issues, we are now attempting to detect the image type by somehow inspecting the image color palette itself in Java. Our end goal is to detect what imagery is being uploaded from drones and placing them in the proper folders for processing based on the image type.