Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explanation needed #1

Open
SoebHussain opened this issue Aug 31, 2018 · 1 comment
Open

Explanation needed #1

SoebHussain opened this issue Aug 31, 2018 · 1 comment

Comments

@SoebHussain
Copy link

SoebHussain commented Aug 31, 2018

	prob_map = cv::Mat(frame.size(), CV_32FC1);
	cv::Mat frame_bin;
	cv::LUT(frame, bin_mapping, frame_bin);

	float *p_prob_map = prob_map.ptr<float>(0);
	cv::MatIterator_<cv::Vec3b> it, end;
	for (it = frame_bin.begin<cv::Vec3b>(), end = frame_bin.end<cv::Vec3b>(); it != end; ++it)
	{
		*p_prob_map++ = prob_lut.at<float>((*it)[0], (*it)[1], (*it)[2]);
	}

Hi
Thanks for providing such a beautifully written code. I would be very thankful if you could explain what the above lines of code are doing.
Thanks 👍

@isgursoy
Copy link

What is done is crash, in prob_lut.at<float>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants