1 | initial version |
If you just look in the cornerHarris() documentation, you will see that:
src – Input single-channel 8-bit or floating-point image.
This means that you must convert it to CV_8FC1
instead of CV_32FC1
. I am pretty sure that this will fix your problem.
2 | added code part |
If you just look in the cornerHarris() documentation, you will see that:
src – Input single-channel 8-bit or floating-point image.
This means that you must convert it to CV_8FC1
instead of CV_32FC1
. I am pretty sure that this will fix your problem.problem. So just do:
dst.convertTo(temp, CV_8FC1);
3 | No.3 Revision |
If you just look in the cornerHarris() documentation, you will see that:
src – Input single-channel 8-bit or floating-point image.
This means that you must convert it to CV_8FC1CV_8UC1instead or CV_32F
(which is the value of all the 3 channels: 32 = 8*3). CV_32FC1
. I am pretty sure that this will fix your problem. So just do:
dst.convertTo(temp, CV_8FC1);