Ask Your Question

Marsstar's profile - activity

2014-05-24 16:53:22 -0600 asked a question 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.

2014-05-12 02:32:41 -0600 received badge  Necromancer (source)
2014-05-11 10:47:52 -0600 answered a question Hi , I have installed opencv on MAC using macports.

Watch and follow this video on Youtube: OpenCV 2.4.8 Installation in Mac 10.7.5 & Qt 5.0.1

This worked for me! : ;-)

2014-05-11 10:37:55 -0600 received badge  Editor (source)
2014-05-11 10:28:28 -0600 asked a question Macports, compiling using G++ in Terminal

I installed OpenCV for mac with MacPorts by following this video: https://www.youtube.com/watch?v=mJWVz3ncRoo

When I ran this script as shown in that video (compiled with the G++ compiler), it runs nicely and I've put in this here into the Terminal: g++ main.cpp -o main -I/opt/local/include -L/opt/local/lib -lopencv_highgui.2.4.9 -lopencv_core.2.4.9

image description

The code above works just fine, but the sample code from this site "http://opencvlover.blogspot.ch/2011/07/accesing-camera-using-opencv.html" showed up some errors in the Terminal. I've put this into the Terminal: g++ camera.cpp -o camera -I/opt/local/include -L/opt/local/lib -lopencv_highgui.2.4.9 -lopencv_cv.2.4.9 -lopencv_iostream.2.4.9

and the Terminal outputted this:

image description

Why am I getting this error, although I linked it correctly? Can you recommend me any tutorial, that uses a G++ compiler on a OS X with the Terminal? THANKS. Marsstar