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

fix bug for the use of CV_GRAY2BGR #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ch8/direct_method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void DirectPoseEstimationSingleLayer(

// plot the projected pixels here
cv::Mat img2_show;
cv::cvtColor(img2, img2_show, CV_GRAY2BGR);
cv::cvtColor(img2, img2_show, cv::COLOR_GRAY2BGR);
VecVector2d projection = jaco_accu.projected_points();
for (size_t i = 0; i < px_ref.size(); ++i) {
auto p_ref = px_ref[i];
Expand Down
6 changes: 3 additions & 3 deletions ch8/optical_flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ int main(int argc, char **argv) {

// plot the differences of those functions
Mat img2_single;
cv::cvtColor(img2, img2_single, CV_GRAY2BGR);
cv::cvtColor(img2, img2_single, COLOR_GRAY2BGR);
for (int i = 0; i < kp2_single.size(); i++) {
if (success_single[i]) {
cv::circle(img2_single, kp2_single[i].pt, 2, cv::Scalar(0, 250, 0), 2);
Expand All @@ -151,7 +151,7 @@ int main(int argc, char **argv) {
}

Mat img2_multi;
cv::cvtColor(img2, img2_multi, CV_GRAY2BGR);
cv::cvtColor(img2, img2_multi, COLOR_GRAY2BGR);
for (int i = 0; i < kp2_multi.size(); i++) {
if (success_multi[i]) {
cv::circle(img2_multi, kp2_multi[i].pt, 2, cv::Scalar(0, 250, 0), 2);
Expand All @@ -160,7 +160,7 @@ int main(int argc, char **argv) {
}

Mat img2_CV;
cv::cvtColor(img2, img2_CV, CV_GRAY2BGR);
cv::cvtColor(img2, img2_CV, COLOR_GRAY2BGR);
for (int i = 0; i < pt2.size(); i++) {
if (status[i]) {
cv::circle(img2_CV, pt2[i], 2, cv::Scalar(0, 250, 0), 2);
Expand Down