how to unified the get back Mat.at<..> function ?
hello opencv community, in my code i'm dealing with mutiple Matrices type or depth Mat, is it possible to use Mat.at function without having any information about its type,
any help i would be glad
best regards
curr_pixel_value = frame.at<float>(row_index,clo_index);
curr_pixel_value = frame.at<uchar>(row_index,clo_index);
curr_pixel_value = frame.at<double>(row_index,clo_index);
what is your actual use-case for this ?
the short answer might be:
I'm using this to applying an arithmetic equation inside a ROI so I see my case is rare, I'll avoid that next time thank you Sir #berak :)
again, what is your "arithmetic equation", and where does the input for it come from ?
i'm trying to calculate the distribution of Gibbs (Gibbs random field) for this ROI
please show us, what you're doing. (we can't help without context)
you will find the equation on this links 1- https://postimg.org/image/ahtl2mx1v/ 2- https://postimg.org/image/woygx23cp/
this is not, what you are doing.
(and btw, you can do exp & sum on whole Mat's / rois, no need for random access.)
thank you for your hospitality Sir