Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Easy BGR to Grayscale conversion

I want to convert an image to Grayscale using this simple code using the new C++ API --> found on the OpenCV original documentation page.

Link: http://docs.opencv.org/doc/tutorials/introduction/load_save_image/load_save_image.html

I don't know which one is a placeholder and which one is not.

The changes I made are marked by a pink rectangle. -Are those changes correct?

This is the original code, that was online at the documentation page:

image description

This is the changed code by myself:

image description

Do I have to link the cv.h or cv.hpp, because I've heard, that the GCC compiler only takes .hpp files since its made for C++ and not C. Am I correct?

Thanks.