Ask Your Question

Subhasis's profile - activity

2020-02-19 05:38:01 -0600 received badge  Popular Question (source)
2012-12-07 07:08:21 -0600 asked a question Problem with converting 16 bit unsigned short image into WimageBuffer

IplImage *kinectDepthImage; kinectDepthImage = cvCreateImage( cvSize(640,480),IPL_DEPTH_16U,1);

/* Here I put the data into the Image */ //Now I want to put it into a buffer ..any of the below 2 lines gives me error cv::WImageBuffer_16u depthBufer(kinectDepthImage); or cv::WImageBuffer1_16u depthBufer(kinectDepthImage);

My error is " /opt/ros/fuerte/include/opencv2/core/wimage.hpp:243: cv::WImage<t>::WImage(IplImage*) [with T = short unsigned int, IplImage = _IplImage]: Assertion `!img || img->depth == Depth()' failed. pass1Aborted (core dumped) "

2012-11-02 10:16:13 -0600 asked a question OpenCv Error: GPU API call(out of memory) in copy, file gpumat.cpp, line 1053

Hi All, I have an issue with running CUDA gpu on OpenCV 2.4.2. I have a 8600 GTS graphics card with CUDA enabled (v1.1). I compiled OpenCV with CUDA on. And it built binaries successfully.

I tried to run a simple code from opencv_gpu tutorial. It gives me an error as mentioned in the subject.

  try
   {
       cv::Mat src_host = cv::imread("lena.jpg", CV_LOAD_IMAGE_GRAYSCALE);
       cv::gpu::GpuMat dst, src;
       src.upload(src_host);

       cv::gpu::threshold(src, dst, 128.0, 255.0, CV_THRESH_BINARY);

       cv::Mat result_host(dst);
       cv::imshow("Result", result_host);
       cv::waitKey();
   }
   catch(const cv::Exception& ex)
   {
       std::cout << "Error: " << ex.what() << std::endl;
   }

A similar issue is posted in another thread as given below. But there has been no solution. Can anybody give am idea of what could be the problem

http://answers.opencv.org/question/2542/gpu-api-call-error-out-of-memory-in-mallocpitch/

2012-11-01 09:37:31 -0600 asked a question Problem with running OpenCV with GPU support..

Hi All,

OpenCV Error: No GPU support (The library is compiled without GPU support) in throw_nogpu, file /tmp/buildd/ros-fuerte-opencv2-2.4.2-0precise-20120908-1632/modules/gpu/src/precomp.hpp, line 113 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/buildd/ros-fuerte-opencv2-2.4.2-0precise-20120908-1632/modules/gpu/src/precomp.hpp:113: error: (-216) The library is compiled without GPU support in function throw_nogpu

I built OpenCV WITH_CUDA on. It was built succesfully.I suppose there is some conflict between openCV from ROS and my installed ROS. I also tried to run the example after it built the binaries called ./opencv_test_gpu. It said me Ok for most of the test untill it stopped with an error as below

./opencv_test_gpu

OS: Linux 32 CUDA Driver version: 5000 CUDA Runtime version: 4020 CUDA device count: 1

Device 0: Name: GeForce 8600 GTS Compute capability version: 1.1 terminate called after throwing an instance of 'cv::Exception' what(): /home/subhasis/OpenCV-2.4.2/modules/core/src/gpumat.cpp:312: error: (-217) out of memory in function queryMemory

Segmentation fault (core dumped)

I would be greatful if someone suggests me a solution for the problem.

2012-09-25 15:11:40 -0600 commented answer Bad pointer issue in c++

Thanks a lot...Your solution was helpful. Now I dont have the bad pointer issue.

2012-09-24 12:38:00 -0600 received badge  Student (source)
2012-09-24 11:57:16 -0600 commented answer Bad pointer issue in c++

Hi, I completely agree with your point about the pointer getting overwritten.As you see there are only 3 lines of code in the program and no other variable. The only thing I am unable figure out in these 3 lines of code, where exactly it occurs. If I remove the first line of the cv::mat object i dont get the bad pointer problem in release mode as well. I would really appreciate if you can give me a hint of where can this behaviour occur regarding the illegal memory overwritting

2012-09-24 10:24:50 -0600 commented answer Bad pointer issue in c++

I tried to rebuild the solution with no success. If i try to put the string variable global it doesnt have any problem. But inside the same function they create problem (only in the release mode). I really am unable to figure out the reason.

2012-09-24 10:20:40 -0600 answered a question Bad pointer issue in c++

I tried to rebuild the solution with no success. If i try to put the string variable global it doesnt have any problem. But inside the same function they create problem (only in the release mode). I really am unable to figure out the reason.

2012-09-24 09:08:59 -0600 received badge  Editor (source)
2012-09-24 09:08:31 -0600 asked a question Bad pointer issue in c++

Hi All,

I had a problem. Basically, was little strange. I have a feeling it might be a bug in OpenCV. But not sure. The below code works only in debug mode but not in release mode (VS 2010 express edition). The problem is string variable path shows bad pointer and doesn’t assign the value as given below to it. I am using OpenCv 2.4.0.

cv::Mat testMatrix(3,3,CV_64F);
std::string path = ".\\input";
std::cout<<path ;

If I remove the first line it works fine. And this problem occurs only in release mode not in debug mode. Do you have any suggestions ?