Ask Your Question

ldn's profile - activity

2014-06-22 05:48:39 -0600 commented question accessing to a Matrix cell

these code are in a function that returns harris_results,harris_features_def and a long value. that's why harris_result is a pointer. and I just need to access each cell . long harris(cv::Mat derivX, cv::Mat derivY,int is_first,cv::Mat *harris_results,cv::Mat *harris_features_def) and I just need to access each cell . as the below code is not working, just for test I tried to cout std::cout<<harris_results->at<uchar>(10,100)<<std::endl; to see is it's reading teh value, but it does not for (i=6 ; i < harris_results->rows; i++) for (j=6 ; j < harris_results->cols; j++) if ((harris_results->at<uchar>(i, j) > Harris_TH) && (i>5) && (i<1020) && (j>5) && (j<1020)) { harris_features[t][1]=harris_results->at<uchar>(i, j); harris_features[t][2]=i;...

2014-06-22 03:32:09 -0600 asked a question accessing to a Matrix cell

Hello

I am implementing some filters on my image, but the point is that when I use abs() and then try to imshow my result image, it's all black. the harris_result is a cv::Mat *harris_result.

cv::MatExpr x = cv::abs(re); harris_results = &x.a;//convert cv::MatExpr to cv::Mat and then when I want to print the content of harris_result

std::cout<<harris_results->at<uchar>(10,100)<<std::endl; harris_result="" is="" a="" cv::mat="" *harris_result<="" p="">

there is no error, but while debugging at this line it stops working.

I appreciate some help

Thanks