I am getting mask image and RGB image from Unreal Engine using UnrealCV. Here, I also get the color information(R, G, B) of the object using UnrealCV from the mask image. Now, I want to know how can I pass this RGB information to OpenCV to do the thresholding.
I am doing now this stuff converting the mask image to Grayscale image and then doing the thresholding. But I don't want to do this. I have checked this answer but here image range has used which I also don't want to do. As in the mask image, every object has its unique color information so I just want to be more specific by sending the RGB information of the desired object from the mask image and then want to tell OpenCV to do the thresholding on the color that I have sent to OpenCV thresholding function.
The code used to get the RGB information is --
get_mask_color= client.request('vget /object/object_name/color')
It will give the mask color and then I want to pass it to OpenCV for the thresholding purpose.
I expect that it will do the thresholding as like as it is now doing on Grayscale image and then I will use the thresholded image to do the contour operation.