Skip to content

Instantly share code, notes, and snippets.

View fjperezgrau's full-sized avatar

Francisco J Perez Grau fjperezgrau

View GitHub Profile
if (last_image_.rows == msg->height && last_image_.cols == msg->width)
{
cv::cvtColor(last_image_, cv_image.image, CV_BGR2GRAY);
used_last_image_ = true;
}
else
{
cv_image.image = cv::Mat(msg->height, msg->width, CV_8U);
cv_image.image = cv::Scalar(128);
}