Ask Your Question

ralff's profile - activity

2018-09-12 11:52:18 -0600 asked a question What is the output of reprojectImageTo3D?

What is the output of reprojectImageTo3D? In the documentation, it says the output contains the 3D coordinates of the po

2018-07-05 11:13:45 -0600 received badge  Enthusiast
2016-04-27 23:52:07 -0600 received badge  Necromancer (source)
2016-04-27 17:56:58 -0600 answered a question undefined reference to gp_camera_autodetect

I followed berak's advice, and tried to install opencv from master, and everything installed no problem. Thanks!

2016-04-27 13:43:30 -0600 asked a question Can't install opencv 3.0.0 or greater

I can't install any version of opencv 3.0.0 or greater. When I run make, I get a lot of undefined reference errors. It looks like these are reference to libgphoto2 or gphoto2, so I tried reinstalling libgphoto2 and gphoto2, but I still get the undefined reference when running make.... I cannot find any way to resolve this issues.

../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_unref'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_abilities_list_get_abilities'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_set_abilities'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_context_unref'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_get_readonly'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_list_count'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_count_children'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_result_as_string'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_abilities_list_free'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_count_choices'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_context_new'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_list_get_name'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_context_set_status_func'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_capture'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_file_new'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_list_get_value'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_set_changed'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_file_get_data_and_size'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_file_delete'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_port_info_list_new'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_get_choice'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_port_info_list_load'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_port_info_list_free'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_abilities_list_load'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_autodetect'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_new'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_context_set_error_func'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_set_value'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_abilities_list_new'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_init'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_unref'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_port_info_list_lookup_path'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_port_info_list_get_info'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_get_config'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_set_port_info'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_list_unref'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_get_child'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_exit'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_context_set_message_func'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_get_id'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_camera_file_get'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_file_unref'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to `gp_widget_get_name'
../../lib/libopencv_videoio.so.3.1.0: undefined reference to ...
(more)
2016-04-27 13:02:09 -0600 commented question undefined reference to gp_camera_autodetect

I also get this error and am not able to install opencv 3.0.0 or above due to this....

2016-03-30 15:28:17 -0600 asked a question Supressing "init done" and "opengl support available"

When displaying an image using OpenCV, the following two lines are output to the terminal.

init done
opengl support available

Is there a way to suppress these outputs? These messages are kind of annoying.

2014-08-18 15:44:33 -0600 commented question libgphoto2 convert char* to cv::Mat

Thanks! imdecode is what I needed.

2014-08-18 15:25:43 -0600 commented question libgphoto2 convert char* to cv::Mat

The data pointer is filled using the function gp_file_get_data_and_size from libgphoto2 library inside the capture_to_memory function using *data = file->data where file is the camerafile libgphoto data type, but I can't find anymore information about that struct. The data can be saved to a .jpg using fwrite. Look at my edit to see how the data is stored to file. I believe I should be able to convert to a cv::Mat instead of writing to a file then reloading the image.

2014-08-18 15:24:00 -0600 received badge  Editor (source)
2014-08-18 13:08:48 -0600 asked a question libgphoto2 convert char* to cv::Mat

I am using libgphoto2 to get images from a still camera, and I am not able to convert the images into cv::Mat data type. The image from the camera is stored as char*, and when I convert the image, the image is solid blue. This is the relevant code I have for the question.

Camera *camera; 
gp_camera_new (&camera);
GPContext *context = gp_context_new();

char *data;
unsigned long size;
FILE *f;
capture_to_memory(camera, context, (const char**)&data, &size);

f = fopen("foo2.jpg", "wb");
retval=fwrite(data, size, 1, f);
fclose(f);

cv::Mat tempMat = cv::Mat(3456, 5184, CV_8UC3, (unsigned char) *data);

I am able to write the data to a file and reload the image in opencv, but I don't want to save and load from file every time I capture an image.