Ask Your Question

AVB's profile - activity

2020-10-24 03:20:42 -0500 received badge  Student (source)
2020-07-31 05:57:52 -0500 received badge  Notable Question (source)
2020-07-31 05:57:52 -0500 received badge  Popular Question (source)
2019-08-26 21:45:56 -0500 received badge  Famous Question (source)
2017-11-29 18:14:45 -0500 received badge  Notable Question (source)
2017-05-03 21:44:12 -0500 received badge  Popular Question (source)
2016-04-11 00:23:52 -0500 commented question Unexpected imdecode error

Yes, the vector is indeed empty. curl just won't work for some reason...

2016-04-08 07:00:30 -0500 commented question Unexpected imdecode error

Your code has worked in all other cases. Just this server is messing things up, I guess. How can I check whether curl code has been executed??

2016-04-08 06:27:30 -0500 commented question Unexpected imdecode error

Oh. Will check that!

2016-04-08 05:53:43 -0500 received badge  Editor (source)
2016-04-08 05:52:54 -0500 asked a question Unexpected imdecode error

I wanted to download an image from a given URL. I followed the answer given to a previous question I posted. Here

It works fine on its own, but when I integrated it with Kurento Media Server it did not work.
There was an unexpected error as follows:

Unexpected error while processing method: /build/buildd/opencv-2.4.8+dfsg1/modules/highgui/src/loadsave.cpp:307: error: (-215) buf.data && buf.isContinuous() in function imdecode_
(Code:-32603, Type:null)

What could be the error?

2016-04-07 07:37:31 -0500 commented question PNG image with alpha channel

@Tetragramm, imread() fails since I have to pass an URL.

2016-04-06 07:54:21 -0500 commented question PNG image with alpha channel

I tried to integrate curl with my server and it raised a lot of dependency issues which was why I had to shift to video capture.

If curl is doing it correctly, I'll look into integrating it. Thanks!

2016-04-06 07:49:37 -0500 commented question PNG image with alpha channel

I meant the following:

I'll use a server through which I'll be streaming video. I'll be doing video processing frame by frame. The goal is to add some image logo to this video stream.

The above mentioned code works for other images perfectly, just specific png files turn out looking like this.

Thanks though :)

2016-04-06 07:36:06 -0500 commented question PNG image with alpha channel

What could be a possible solution though? I had tried this using lib-curl too, and had the same output. This image is supposed to be overlay-ed on top of another image, hence I need it to have a transparent background.

Is there no option of maintaining alpha values at all?

2016-04-06 07:15:29 -0500 asked a question PNG image with alpha channel

I'm new to OpenCV and I've done a small POC for reading an image from some URL.

I'm reading the image from an URL using video capture. The code is as follows:

   VideoCapture vc;
   vc.open("http://files.kurento.org/img/mario-wings.png");
   if(vc.isOpened() && vc.grab()) 
   {
           cv::Mat logo;
           vc.retrieve(logo);
           cv::namedWindow("t");
           imwrite( "mario-wings-opened.png", logo);
           cv::imshow("t", logo);
           cv::waitKey(0);
           vc.release();
   }


This image is not opened correctly, possibly due to alpha channel.
What is the way to preserve alpha channel and get the image correctly?
Any help is appreciated.

-Thanks

Actual image and expected output:
image description

Opened image:
image description

2016-03-30 04:08:55 -0500 commented answer load image from url

Got it to work! Thank You!!

2016-03-30 01:34:34 -0500 asked a question load image from url

I'm new to OpenCV. I've given a link to the function imread as follows:

Mat logo = imread("http://files.kurento.org/img/mario-wings.png");

I've checked and the image exists on the given path. imread() still fails to read it.

Any mistake that I've made?

-Thanks

2016-03-29 05:52:22 -0500 commented answer Pass by reference errors

Thank you! I followed both your steps and it is working now.

2016-03-29 05:51:34 -0500 received badge  Scholar (source)
2016-03-29 05:40:05 -0500 asked a question Pass by reference errors

Hi, I'm new to openCV and I've written the following code:

 void add_image(Mat &mat);

 int main() 
  {
        Mat mat = imread("img1.png", 1);
        add_image(mat); 
        imshow("Result", mat);
        waitKey(0);
        return 0;
  }

  void add_image(Mat &mat)
  {
        Mat logo = imread("img2.png", 1);
        logo.copyTo(mat(cv::Rect(0,0, logo.cols, logo.rows))); //Exception here
  }

On compilation I get the following error:

OpenCV Error: Assertion failed (!fixedSize()) in release, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/matrix.cpp, line 1619 terminate called after throwing an instance of 'cv::Exception' what(): /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/matrix.cpp:1619: error: (-215) !fixedSize() in function release

Aborted (core dumped)

How can I resolve this?

Regards,

A.

2016-03-24 01:41:52 -0500 asked a question Installation errors: Ubuntu

Hi,

I'm a newbie and I'm using Ubuntu 14.04. I've currently downloaded opencv 3.1.0 from the official website. While installing, most of the files like gstreamer and video.h are not found. I assume ipp_icv file is downloaded correctly, since it does not give any errors and logs show that it has been unpacked. The installation succeeds.

I'm further building packages using debuild. This is where it cannot find ipp_icv and fails. What could be the reason?

I read that I should manually download the said file and I've done that. If so, where should I put the unpacked ipp_icv folder?

Regards, A.