필자는 기능 감지에 대해 읽고 해리스 코너 감지기를 사용해보고 싶었습니다. I는 상기 DST가 각 화소에 코너 강도를 함유 플로트의 이미지가해리스 코너 감지기의 결과 개선
void cornerHarris(InputArray src, OutputArray dst, int blockSize, int ksize, double k, int borderType=BORDER_DEFAULT)
를 호출함으로써 이루어진다 실현.
나는 내가 다음 그림에 적용하고 싶어이 일을보고 싶어 :pic of a laptop http://i49.tinypic.com/dbijh3.jpg
생산 결과는 다음이었다
corners not detected http://i49.tinypic.com/jgtzqt.jpg
당신을 말할 수 결과가 좋지 않다. 주요 소음은 감지되지 않았습니다.
이미지의 모서리를 인쇄하는 데 사용한 코드는 다음과 같습니다. 임계 값을 사용하고 임계 값에 임의의 값을 설정했습니다.
int _tmain(int argc, _TCHAR* argv[])
{
Mat img, dst, threshed;
img = imread("c:\\laptop.jpg",0);
dst = Mat::zeros(img.size(), CV_32FC1);
cornerHarris(img, dst, 2, 3, 0.04, BORDER_DEFAULT);
threshold(dst, threshed, 0.00001, 255, THRESH_BINARY_INV);
namedWindow("meh", CV_WINDOW_AUTOSIZE);
imshow("meh", threshed);
//imwrite("harris.jpg", threshed);
waitKey(0);
return 0;
If I reduce threshold the result is white with just a few black dots (detections) Increasing threshold just produces a more noisy like image.
감사합니다.이 부분은 핵심 검색 문서 근처에 없었습니다. 어떻게이 (또는 한 가지 학습)도 이와 관련이 있습니까? – StuckInPhD