Ask Your Question

Baris Evrim Demiroz's profile - activity

2020-02-17 01:53:04 -0500 received badge  Notable Question (source)
2018-07-23 06:50:29 -0500 received badge  Notable Question (source)
2018-04-14 14:15:54 -0500 received badge  Necromancer (source)
2017-12-20 01:27:33 -0500 received badge  Nice Question (source)
2017-12-20 01:26:12 -0500 received badge  Popular Question (source)
2017-04-11 06:01:39 -0500 received badge  Popular Question (source)
2015-09-21 02:55:57 -0500 received badge  Taxonomist
2015-08-04 13:17:48 -0500 received badge  Famous Question (source)
2015-07-01 16:20:29 -0500 received badge  Good Question (source)
2014-11-14 11:48:54 -0500 received badge  Notable Question (source)
2013-08-23 09:12:52 -0500 commented answer please help me in configure the opencv for eclipse juno in java

@StevenPuttemans I started working on it. It is very labor intensive to write and even modify a tutorial, so it will take time to make it into the repo.

2013-08-21 12:43:21 -0500 commented answer How do I register to opencv-dev?

That Yahoo group was always dreadful to use. I am glad this Q&A site opened. It is also nice to hear that it is going to be closed soon :)

2013-08-21 07:28:00 -0500 answered a question please help me in configure the opencv for eclipse juno in java

Here is a detailed, step by step tutorial on how to use OpenCV with Java+Eclipse: Using OpenCV Java with Eclipse

You can follow it to configure your environment.

2013-05-30 22:02:07 -0500 received badge  Nice Question (source)
2013-05-21 08:42:57 -0500 received badge  Critic (source)
2012-08-28 01:34:11 -0500 commented answer Image shuffle not working

There is also Mat::clone() method. e.g. Mat newImg = img.clone();

2012-08-24 07:04:26 -0500 asked a question FileStorage: can write but can't read Size, Rect, etc.

I am writing Size to a yaml file using FileStorage:

FileStorage fs("info.yml", FileStorage::WRITE);
fs << "gridSize" << Size(31,31);

The file content is after writing:

%YAML:1.0
gridSize: [ 31, 31 ]

I cannot read the Size object again by doing:

Size gridSize;
FileStorage fs("info.yml", FileStorage::READ);
fs["gridSize"] >> gridSize;

Is this a bug? Lack of feature? Or is this completely planned behavior? What is the best way to read OpenCV data structures?

2012-08-09 09:26:18 -0500 answered a question OpenCV with Qt support namedWindow crash

I have found the problem and a workaround.

In OpenCV solution, in opencv_highgui Debug properties, remove QtCore4.dll from the Linker->Input->Additional Dependencies. Recompile OpenCV-Debug. Use the new dll files.

I have also filed a bug report here.

2012-08-08 10:12:31 -0500 commented question OpenCV with Qt support namedWindow crash

I am having the same problem, any update on the situation?

2012-08-05 16:34:52 -0500 commented question Lossless video codecs in OpenCV?

@Kirill When you pass -1, it does not list all of the available codecs.

2012-07-26 02:48:14 -0500 received badge  Student (source)
2012-07-25 13:30:16 -0500 asked a question Lossless video codecs in OpenCV?

Are there any lossless codecs for video that OpenCV support on Windows? If there are any such codecs, what are their 4 character codes like in CV_FOURCC('M','J','P','G')?

2012-07-25 08:45:20 -0500 received badge  Supporter (source)
2012-07-25 08:45:19 -0500 received badge  Scholar (source)
2012-07-25 08:43:48 -0500 commented answer How to read directory with images by VideoCapture?

I already included the answer in my question 1 hour ago :) I don't have the reputation to upvote you but I will accept your answer. There is a bug with VideoCapture though.

2012-07-25 07:24:49 -0500 received badge  Editor (source)
2012-07-16 02:21:58 -0500 answered a question How do I draw irregular contours of MSER regions

To draw outlines, you should set the thickness parameter of drawContours() to 1 (or some other value >0).

int allContours = -1;
int thickness=1;
drawContours(img, contours, allContours, Scalar::all(255), thickness);

If this does not work, can you post how you are calling drawContours()?

PS You can always upload photos to a third party service like imgur.

2012-07-16 02:16:13 -0500 received badge  Popular Question (source)
2012-07-13 06:28:06 -0500 asked a question How to read directory with images by VideoCapture?

I know it is not officially supported yet, but I would like to read images in a directory numbered as 1.png, 2.png ... 137.png using VideoCapture.

While browsing the source code I saw CvCapture_Images class which can read images one by one using a printf like pattern. I can't seem to make it work. I have tried:

VideoCapture cap("c:/fullpath/1.png");

and

VideoCapture cap("c:/fullpath/%d.png");

Neither of them worked, the first one was able to read only 1.png but not the rest of the images. Latter one was not able to open the capture at all.

How can I make VideoCapture work to read images named nicely?

Answer

Because I don't have enough reputation I can't add this as an answer, so here it goes, you can do either:

VideoCapture cap("c:/fullpath/1.png");

OR

VideoCapture cap("c:/fullpath/%1d.png");

the reason it didn't work the first time is that there is a bug with CvCapture_Images [1] where fullpath contains digits the first method fails. The latter method works as long as you specify using %#d format, i.e. don't forget to put at least one digit before d.

See the sammy's alternative answer below.