Ask Your Question

NumesSanguis's profile - activity

2016-04-05 03:15:55 -0600 received badge  Popular Question (source)
2015-04-29 04:19:16 -0600 received badge  Enthusiast
2015-04-22 08:45:08 -0600 commented question Gender classification tutorial Error: matrix is not continuous

The image was indeed empty. I ran the command from build and therefore the .csv didn't properly point to the images. Adding the following helped: ln -s ../resize-gender/ resize-gender

2015-04-22 07:50:19 -0600 asked a question Gender classification tutorial Error: matrix is not continuous

I'm following the Gender classification tutorial: http://docs.opencv.org/2.4.9/modules/...

I put my files in opencv-2.4.9.x-prep/modules/contrib/doc/facerec/src (OpenCV from github)

I make use of a database with the following structure: resize-gender/female/name.pgm

To make a .csv file, I added the following code to "create_csv.py":

with open('gender.csv', 'w') as f:
    a = csv.writer(f, delimiter=',')
    ...
                print "%s%s%d" % (abs_path, SEPARATOR, label)
                a.writerows([["%s%s%d" % (abs_path, SEPARATOR, label)]])

However when I run:

opencv-2.4.9.x-prep/modules/contrib/doc/facerec/src/build$ ./facerec_fisherfaces ../gender.csv ../output/

I get the following error:

OpenCV Error: Image step is wrong (The matrix is not continuous, thus its number of rows can not be changed) in reshape, file /tmp/buildd/ros-hydro-opencv2-2.4.9-2precise-20141231-1923/modules/core/src/matrix.cpp, line 802
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/buildd/ros-hydro-opencv2-2.4.9-2precise-20141231-1923/modules/core/src/matrix.cpp:802: error: (-13) The matrix is not continuous, thus its number of rows can not be changed in function reshape

I found the same error in a question someone else asked (http://stackoverflow.com/questions/21...), but my images are .pgm and I didn't modify anything about the script in the tutorial. So I don't know what is wrong.

Specs:

Ubuntu 12.04
OpenCV 2.4.9
ROS Hydro (Robot Operating System), this is where my OpenCV is installed.
Image dimension: 250x270

Edit The code error is from line 138:

model->train(images, labels);
2015-04-20 06:57:10 -0600 received badge  Editor (source)
2015-04-20 06:13:16 -0600 asked a question Building OpenCV 3.0.0-beta Windows Python 3.4

I wish to get OpenCV working on my Windows 7 x64 for Python 3.4. Even though the OpenCV 3 Alpha page states that there is Python 3 support (http://opencv.org/opencv-3-0-alpha.html), the pre-compiled package only contains opencv/build/python/2.7 and no 3(.4).

So following the answer on http://stackoverflow.com/questions/28..., I'm trying to build OpenCV 3.0.0 from source following the following tutorial: http://docs.opencv.org/doc/tutorials/....

However since this tutorial is a bit outdated, I've some problems following certain steps.

  • The OpenNI link is dead, so I installed KinectSDK-v1.6-Setup.exe (https://www.microsoft.com/en-us/downl...) and OpenNI-Windows-x64-2.2.msi (http://structure.io/openni). Is this good enough?
  • The Qt framework link is dead. I have Visual Studio 2013, so do I need this? or how do I just get the required files without downloading the whole Qt development kit (http://www.qt.io/)?
  • CMake: I got the latest version from OpenCV from Github, but it doesn't have the folders "Source" and "Builds", so what do I select as folders in CMake (3.2.2)? Sorry I'm new to this.

Any help is greatly appreciated (or a link to a compiled Python 3.4 cv2.pyd)

stackoverflow: http://stackoverflow.com/questions/29...

2015-04-17 08:55:50 -0600 received badge  Scholar (source)
2015-04-17 06:29:40 -0600 commented question Gender classification tutorial

Thanks for pointing that out! It seems I was blind indeed :p Now I know that the files are definitely in OpenCV. However it seems my installation with OpenCV in ROS is the problem. Now I know which direction I have to search in, thanks. (If you mention your comment as answer I can select it as the right answer)

2015-04-17 06:13:36 -0600 asked a question Gender classification tutorial

Dear forum members,

I would like to perform gender classification using OpenCV as in the following tutorial: http://docs.opencv.org/modules/contri...

However I find it hard to start. I get the impression that the modules necessary for this should already be in OpenCV (I got version: 2.4.9) however I can not find the files mentioned in the tutorial. (I have to mention that I'm using OpenCV in combination with ROS (Robot Operating System).

On Github I cannot find the files here: https://github.com/Itseez/opencv

However this Github page has some files: https://github.com/kipr/opencv/blob/m...

Am I just being blind or are the files not in OpenCV 2.4.9 and only in 2.4.11 and up?

Thanks in advance!

2014-09-30 05:09:51 -0600 received badge  Supporter (source)
2014-09-30 05:08:24 -0600 commented answer AAM OpenCV C++

@StevenPuttemans the link refers to code which is still written in OpenCV 1 and is last updated (more than) 1 year ago. This post is from 8 months ago, so it's not the code updated for OpenCV 2.4.8+. I'm interested as well, can you link to your code MRDaniel?

2014-09-30 05:08:11 -0600 answered a question AAM OpenCV C++

@StevenPuttemans the link refers to code which is still written in OpenCV 1 and is last updated (more than) 1 year ago. This post is from 8 months ago, so it's not the code updated for OpenCV 2.4.8+. I'm interested as well, can you link to your code MRDaniel?