I want to sort all element of mat but my kernel size(kernel_size=61) is very large. Now i use
///* For each window row */
for ( iwr = wr_begin; iwr < wr_end; iwr++ )
{
/* For each window column */
memcpy(p+k*win_size,src2.data+(ic-c_begin)+(ir-r_begin+iwr-wr_begin)*num_cols,sizeof(win_size));
k+=1;
}
//cv::Rect roi(ic-c_begin,ir-r_begin,win_size,win_size);
//Mat roi_image=src2(roi);
//roi_image
std::sort(p,p+win_count);
median_value=p[pos] ;
Is any faster method?? pls tell me, thanks:)