Ask Your Question

SergioBasurco's profile - activity

2018-12-04 03:26:56 -0500 received badge  Popular Question (source)
2018-06-18 20:00:37 -0500 received badge  Notable Question (source)
2017-05-12 04:25:50 -0500 received badge  Popular Question (source)
2016-07-29 10:14:56 -0500 received badge  Famous Question (source)
2015-10-15 18:47:46 -0500 received badge  Notable Question (source)
2015-07-13 10:00:10 -0500 received badge  Student (source)
2015-04-25 06:28:55 -0500 received badge  Popular Question (source)
2013-10-09 04:22:58 -0500 commented question How to create an array of Mat by the number of frame?

Maybe I'm mistaken but it seems you are just pointing to blob instead of doing the Mat assignment. Check here for Mat handling, and here for vector push_back. The push_back method will allow you not to care about the array (vector) size.

2013-10-08 05:52:41 -0500 commented question How to create an array of Mat by the number of frame?

You could try using a std::vector<Mat> and use the push_back method to store each frame. Also make sure you either clone() or copyTo() the frames, else you will be overwriting just a single frame each time.

2013-10-08 05:50:04 -0500 asked a question Windows imshow sometimes showing gray image

I have done a bit of research on this topic, apparently Windows OpenCV builds might have an error using imshow. This problem varies a bit but the result is a gray image instead of the correct RGB image stored in a Mat structure.

Here it's suggested that it could be due to the jpeg codecs. It's also mentioned as a bug in the developer zone, that it's related to namedWindows.

I'm using the stitching_detailed example. The relevant part is the final panorama, which is stored in the result Mat. When saving it to a file it works correctly.

imwrite(result_name, result); // works

If I show the image either like this:

imshow("result", result);
waitKey(0);

or like this:

namedWindow("result", CV_WINDOW_NORMAL);
imshow("result", result);
waitKey(0);

I get a gray image displayed.

But if I do the following:

imwrite(result_name, result);
Mat pano = imread(result_name , CV_LOAD_IMAGE_COLOR);
namedWindow("result", CV_WINDOW_NORMAL); //works without this line too
imshow("result", pano);
waitKey(0);

I get the correct image displayed, i.e. Saving it to a file and then reading it works. But not the live rendering of the generated image.

What can be the cause?

2013-10-07 06:04:42 -0500 received badge  Supporter (source)
2013-09-06 03:12:54 -0500 answered a question Transparent border after calibration

When remapping use:

cv::remap(temp, rview, map1, map2, cv::INTER_LINEAR, cv::BORDER_TRANSPARENT);
2013-08-26 06:27:22 -0500 asked a question Transparent border after calibration

I have remapped camera undistortion using initUndistortRectifyMap, when remapping this is the image I'm getting:

image description

I'm wondering whether the remapping can give me an alpha value for the black borders. I need them to be invisible and show only the image.

2013-08-25 13:26:24 -0500 asked a question Read values from xml always 0

I've just managed to run the camera calibration tutorial succesfully and I have an output xml file with the calibration coefficients and other information. I'm trying to use FileStorage to read the values like this:

string filename = "input.xml";
cv::FileStorage fs;
fs.open(filename, cv::FileStorage::READ);

fs["image_Width"] >> width;
fs["image_Height"] >> height;
//width = (int) fs["image_Width"];
//height = (int) fs["image_Height"];

std::cout << width << " x " << height << std::endl;

However I always get the value 0. This is the xml file I'm using:

<?xml version="1.0"?>
<opencv_storage>
<image_Width>1920</image_Width>
<image_Height>1080</image_Height>
</opencv_storage>
2013-07-22 02:10:07 -0500 received badge  Scholar (source)
2013-07-19 09:31:56 -0500 commented answer Build OpenCV with my own ffmpeg build

I just tried to answer to my own question but I can't since I'm a new user... it was a long post and went away :( Anyways, for those who need a solution asap, I solved it using gstreamer + openCV, which uses ffdec_h264 (from ffmpeg) as decoder, so I don't know where the bug is coming from and don't have time to debug it all over OpenCV. Gstreamer getting started How to merge it with OpenCV. I hope it helps someone, I'll file a report and answer here with the feedback when I have some time.

2013-07-19 06:32:32 -0500 commented answer Build OpenCV with my own ffmpeg build

I'm currently in the process of building OpenCV with my own ffmpeg build. I'll try to formally report the bug, but it might not be an OpenCV issue but only ffmpeg's.

2013-07-19 03:53:43 -0500 asked a question Build OpenCV with my own ffmpeg build

Hi, The ffmpeg version OpenCV 246 is using has a bug reading h.264 streams. I'm trying it via RTSP from a IP camera. This bug has been reported to ffmpeg but I'm not sure it's been pulled yet to the latest release. http://ffmpeg.org/trac/ffmpeg/ticket/697

I want to build ffmpeg on my own patching the file they mention. Using this ffmpeg build I'd like to build OpenCV to support this fix. Maybe it can be included in the next version.

How do I build OpenCV using the ffmpeg build? Should I just replace the .dll files?

Thanks.

2013-07-17 11:02:05 -0500 commented question How to identify different images using OpenCV android?

It seems non-trivial. You should look into image processing and feature detection. Then maybe apply learning methods and classifiers to determine which disease it is. I am new to OpenCV so I don't know the exact how-to but some reading on those topics should help.

2013-07-17 10:26:46 -0500 received badge  Editor (source)
2013-07-17 10:23:49 -0500 asked a question How to fix H264 decoding?

Hi I'm using version 246 of openCV. My application plays multiple IPCamera streams via RTSP. I understand it uses ffmpeg to load the rtsp url I provide. I have two IP cameras, one of them works well, with some h.264 errors but the live video feed is playing. The other one, avigilon model 2.0-H3-B1 gives the following error:

[h264 @ --------] non-existing PPS referenced
[h264 @ --------] non-existing PPS 0 referenced
[h264 @ --------] no frame!

After researching this is due problems with ffmpeg decoders, or x264 decoders (I don't know if there is any difference). I've read that there are some patches around but I have no idea how to apply them. Should I rebuild ffmpeg again? If so, how do I make my openCV version use the new ffmpeg build?

I've also found gstreamer can solve this issue, I'm not sure if openCV uses gstreamer or not. If so, how do I make it use the gstreamer libs instead of ffmpeg?

I'm working under Windows VS2010.

Thanks!

2013-07-11 12:08:54 -0500 commented answer Ip / network camera access.

How would I find out the URL for my camera, it's a Mega-Pixel security camera this model. Onvif protocol. It allows mjpeg and h.264. No idea how to get the url for direct streaming