1 | initial version |
Ok take a step back. Simply googling the opencv documentation and looking at the threshold function, you can see the following thing.
src – input array (single-channel, 8-bit or 32-bit floating point)
This means that you cannot supply a 16 bit unsigned image to that function. It is simply not implemented. I agree that the above SimpleBlobDetector should get a check on the input type however not to trigger this. Will look deeper into it and supply a fix.
2 | No.2 Revision |
Ok take a step back. Simply googling the opencv documentation and looking at the threshold function, you can see the following thing.
src – input array (single-channel, 8-bit or 32-bit floating point)
This means that you cannot supply a 16 bit unsigned image to that function. It is simply not implemented. I agree that the above SimpleBlobDetector should get a check on the input type however not to trigger this. Will look deeper into it and supply a fix.
Okay the problem is actually here. The code assumes that a correct type was supplied, but it doesn't check if the type is 8 bit or 32 bit. We should force to input to be changed to a single channel 8 bit image.
3 | No.3 Revision |
Ok take a step back. Simply googling the opencv documentation and looking at the threshold function, you can see the following thing.
src – input array (single-channel, 8-bit or 32-bit floating point)
This means that you cannot supply a 16 bit unsigned image to that function. It is simply not implemented. I agree that the above SimpleBlobDetector should get a check on the input type however not to trigger this. Will look deeper into it and supply a fix.
Okay the problem is actually here. The code assumes that a correct type was supplied, but it doesn't check if the type is 8 bit or 32 bit. We should force to input to be changed to a single channel 8 bit image.
Fix added: https://github.com/Itseez/opencv/pull/3190