1 | initial version |
also, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE
is the wrong constant for cvtColor
. this should be : Imgproc.COLOR_BGR2GRAY
2 | No.2 Revision |
also, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE
is the wrong constant for cvtColor
. this should be : Imgproc.COLOR_BGR2GRAY (currently, youre converting to bgra, not to grayscale)
3 | No.3 Revision |
i've seen your SO question, they asked you to cut down your code, but here, now, the important part is missing:
you have to decide on a fixed image size (say, 100x100) for both training & testing, and resize all images to that, before further processing .
also, Imgcodecs.CV_LOAD_IMAGE_GRAYSCALE
is the wrong constant for
. this should be : Imgproc.COLOR_BGR2GRAY cvtColorcvtColor()
(currently, youre converting to bgra, bgra, not to grayscale)grayscale, so 4x more pixels, than expected.)