2020-05-24 17:56:03 -0600 | received badge | ● Famous Question (source) |
2018-08-17 23:14:59 -0600 | received badge | ● Notable Question (source) |
2018-02-07 15:18:16 -0600 | received badge | ● Popular Question (source) |
2015-12-01 15:28:34 -0600 | commented question | OpenCv Python failing with error (-215) on calcHist function I figured out that the size of some of my images were not the same so in order to fix it i wrote a script to resize all of my data.... stupid mistake but thought that all of my data was of the same size and therefore it was pretty hard to see. Thanks |
2015-12-01 07:32:03 -0600 | commented question | OpenCv Python failing with error (-215) on calcHist function yes the cv2.cvtColor function below it does the same thing... but if I load the image using imread(maskpasth,0) i get the same error |
2015-11-30 06:19:58 -0600 | asked a question | OpenCv Python failing with error (-215) on calcHist function hi everyone, I am trying to use the calcHist function to calculate the histogram of images of different animals. I have created masks of these images by implementing the following code: Then I use the RGBHistogram class calculate my histogram of the original images like so: finally, I create an instance of this class and use it as a feature describer that is appended to my data array. This will ultimately be used as input to a random forest classifier. here is the code where i do this: When i run this code I am getting the following error: I have a working example of very similar code with a different dataset so I am thinking it might be a problem with the way I generate the mask of the animal images? I have checked that the mask.dtype and image.dtype are both 8 bit as well as the image and mask paths are correct. I can not think of what might be happening here. I tried printing the target and it appears it runs through the loop two times before it crashes. I am new to python and opencv and am doing this for a school project so I would really appreciate if someone might be able to give me some ideas!! thanks in advance! |