Ask Your Question

Revision history [back]

click to hide/show revision 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.

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);

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_8UC1 instead or CV_32F (which is the value of CV_32FC1. I am pretty sure that this will fix your problem. So just do:all the 3 channels: 32 = 8*3).

dst.convertTo(temp, CV_8FC1);