frondeur | 15 Jul 11:01 2012
Picon

OpenCV unhandled exception at reference

Hi,

I'm trying to access opencv from visual studio 2010 but getting unhandled
exception in kernel32.dll. I've a class which encapsulates the functionality
of featureextractor. when only object is created for that class i get the
error.

class VFDExtractor_GPU : public VFDExtractor
{
private:
	cv::gpu::SURF_GPU surf;
	std::vector<float> descs_aux;
	cv::gpu::GpuMat im;
    cv::gpu::GpuMat kps;
    cv::gpu::GpuMat descrs;
public:
  	VFDExtractor_GPU();

     	void detectKpts(std::vector<cv::KeyPoint>& keypoints,cv::Mat&
descriptors,std::vector<float>& descrs_aux);
};

And the abstract class VFDExtractor is following

<code>
class VFDExtractor
{
protected:
    cv::Mat im;
public:
(Continue reading)

adeeshauom | 13 Jul 13:50 2012
Picon

MPEG video decoding and find the quantization value used for the video

Hi,
I want to get the quantization scale used in a MPEG video. I know that OpenCV can decode MPEG videos and give
the frame as a image. But I want to know the decoding part that is using for decoding the video. Can anyone
told me how can I find the quantization value or what is the class(code) that OpenCv is using for decode the
MPEG video.
Thanks in advance.

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com
Prakhar Mohan | 13 Jul 08:47 2012
Picon

Porting from Python to c++



import cv2
import numpy as np

img
= cv2.imread('sofqn.jpg')
gray
= cv2.imread('sofqn.jpg',0)

kernel
= cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(10,10))
gray
= cv2.dilate(gray,kernel)

thresh
= cv2.adaptiveThreshold(gray,255,0,1,11,2)

cont
,hier = cv2.findContours(thresh,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)
max_area
= -1
best_cnt
= None
for cnt in cont:
    area
= cv2.contourArea(cnt)
   
if area > max_area:
        max_area
= area
        best_cnt
= cnt

cv2
.drawContours(img,[best_cnt],0,[0,255,0],2)Can someone please port the code from python to c++? I need the data types and everything. Thanks.Best RegardsPrakhar div>


__._,_.___


Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
marcellbarbacena | 13 Jul 08:48 2012
Picon

Error running python sample (peoplededect.py from python2)

Hi,

I'm receiving the following error when running the sample peoplededect.py from python2. Am I doing
something wrong?

C:\Users\Marcell\Downloads\opencv\samples\python2>c:\Python27\python.exe peopled
etect.py a.avi

USAGE: peopledetect.py <image_names> ...

Press any key to continue, ESC to stop.

a.avi  - OpenCV Error: Assertion failed (s >= 0) in unknown function, file C:\sl
ave\WinInstallerMegaPack\src\opencv\modules\core\src\matrix.cpp, line 115

Traceback (most recent call last):
  File "peopledetect.py", line 41, in <module>
    found, w = hog.detectMultiScale(img, winStride=(8,8), padding=(32,32), scale
=1.05)
cv2.error: C:\slave\WinInstallerMegaPack\src\opencv\modules\core\src\matrix.cpp:
115: error: (-215) s >= 0

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com
a_reed88 | 13 Jul 02:39 2012

Beginner: Load Image Tutorial - Grey (NULL) image.

Hello,

I am a complete and utter noob, to both OpenCV and coding in general. I recently got OpenCV 2.4.2 working in
VS2010 and ran the first 'display image' tutorial from "Learning Open CV"/Various other websites but I
cannot get the sample image to display. The code will compile and execute to the point of displaying the
image window but the content is 'NULL' and appears as a grey square. Needless to say I am clueless on how to
fix the issue. I would greatly appreciate any help to get me back on the right path before the frustration
kills the curiosity.

I am running CV 2.4.2 on Windows 7 in VS2010.

// OpenCVTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>

int _tmain(int argc, char** argv )
{
    IplImage *img = cvLoadImage("D:\sample.JPG");
	//if(img == NULL) { std::cout << "You're Screwed!" << std::endl; }
    cvNamedWindow("Example", CV_WINDOW_AUTOSIZE );
    cvShowImage("Example",img);

    cvWaitKey(0);
    cvDestroyWindow("Example");
    cvReleaseImage(&img);

    return 0;
}

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com
tannum E Mursalin | 12 Jul 22:11 2012
Picon

pthreads and opencv help



Need urgent help on thread: the goal here is the separtemask will take each image and separate different contours and for each contour in the image it will call handleobject thread. So every for loop will call the handeobject thread. However, object index variable needs to be passed in each thread. But only last value of objectndex is passed, this is becuase the speratemask function loops and repalces the value of obj.objindx and only the last value of obj.objindx is
passed to all the threads. Is there anyway to pass each objectindex
value in handleobject. The code runs fine if we uncomment the pthread_join(tid[objectIndex],NULL); but it will not give a parralel pr ogram
void separateMask(IplImage *maskImg)
{
for(r = contours; r != NULL; r = r->h_next){
cvSet(objectMaskImg, cvScalarAll(0), NULL);
CvScalar externalColor = cvScalarAll(0xff);
CvScalar holeColor = cvScalarAll(0x00);
int maxLevel = -1;
int thinkness = CV_FILLED;
int lineType = 8; /* 8-connected */
cvDrawContours(objectMaskImg, r, externalColor, holeColor, maxLevel, thinkness, lineType, cvPoint(0,0));;
obj.objectMaskImg1[objectIndex]=(IplImage *) malloc(sizeof(IplImage));
obj.objectMaskImg1[objectIndex]=objectMaskImg;
obj.objindx=objectIndex;
obj.intensityOut1=intensityOut;
obj.tasOut1=tasOut;
pthread_create(&tid[objectIndex],NULL,handleObject,(void *)&obj);
//pthread_join(tid[objectIndex],NULL);
printf("objectindx %d\n",obj.objindx);
objectIndex++;
}
// cvReleaseImage(&objectMaskImg);
//cvReleaseMemStorage(&storage);
printf("Exitng Separatemask\n");
}

void* handleObject(void *arg)
{
int i, j;
handle *hndl;
hndl=(handle *) malloc(sizeof(handle));
hndl=(handle*)arg;
pthread_mutex_t lock=PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock(&lock);
IplImage *pImg;
float statistics_ratio[3][9];
pthread_t tid3;
tas3 tas2;
pImg = cvLoadImage("image.tif", CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH);
if(pImg == NULL){
fprintf(stderr, "Fail to load image %s\n", "tiff file");
return ;
}
tas2.pImg1=pImg;
printf("tst%d\n",hndl->objindx);
tas2.x=hndl->objindx;
tas2.objectMaskImg1=hndl->objectMaskImg1[tas2.x];
tas2.statistics_ratio[3][9]=statistics_ratio[3][9];
double mean = average_intensity(pImg, tas2.objectMaskImg1);
int total = total_white(pImg, tas2.objectMaskImg1);
pthread_mutex_unlock(&lock);
printf("Exiting handle object thread_ id %d\n\n", pthread_self());
}


__._,_.___

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
allanlbarbosa | 12 Jul 19:20 2012
Picon

Eye Blink Detector

Hello everyone! I have a project and want OpenCV to detect the blink eyes of the user. I made an eye detected by
"haarcascade_mcs_eyepair_big.xml." This function detects the two eyes together. That done, I divided
the image into two parts, one with the right eye and another with the left. I performed a filter to move to
grayscale and I'm trying to perform a binarization image to detect when the eyes are open or closed. I'm
trying to detect the white of the eye through the binarization but even with the eye closed binarization is
shown in a white part. I believe this has to do with the threshold used. nother was my attempt to detect the
iris through the detection of circles, but the eye has to be very open to it to detect, this solution was
somewhat assertive. Unless there is a way to get n
 on-integer circles, or something. I believe the best way would be to perform the binarization, catching
the eye open as the white around the iris, determine how the rest black.

Does anyone have any suggestions on how I can do to detect if the eye is open or closed accurately?

Thank for any help!

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com
dinesh_rock619 | 12 Jul 06:44 2012
Picon

problem in video processing


hi all 

i need one clarification regarding the video processing. i tried simple video processing on every frame of
avi file and try to display the processed frame . i got inverted frame . it means the top left corner data of
original frame is appearing at bottom right corner in processed frame..when i run same code on single
image , .jpg file. it run correctly. no inversion appeared in case of single image ..why inversion
happening in case of video...same problem is also mention at 

http://stackoverflow.com/questions/3329019/unable-to-create-save-output-avi-file-in-opencv

..please suggest something.

with regards

dinesh meena
INDIA

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com
B0mb3r | 12 Jul 11:37 2012
Picon

setx function does not exist for winxp

Hi,

I want to set the environment variable with 'setx -m OPENCV_DIR D:\OpenCV\Build\Install'

I manage to do this on my laptop which is running on win7, but I can't do it on my school pc which runs on winxp.

Anyone knows how to do it for winxp?

Thanks in advance!

Regards,
Weiliang

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com
julien lengrand-lambert | 11 Jul 21:59 2012
Picon

Weird behaviour using writeFrame in Opencv



Hi all, 

I have a small problem using the video creation capability of OpenCV. 

For the same images, I get a weird output depending on the output size I want.

Here is an example of the results I can get : 
http://www.youtube.com/watch?v=1wm8VjyfdyA&feature=youtu.be


I tried with several different sets of images, and on different computers. 
It seems to run fine on Windows, and I have problems with the Opencv that ships in Ubuntu packages (current 2.3.1-7).

As the problem is not reproductible on my windows, I guess its was either fixed in the 2.4 or specific to Linux. 

Here is a (python) test code that highlight the problem : 


import os
import cv

in_dir = "../data/inputs/sample-test"
out = "output.avi"


# loading images, create Guys and store it into guys
frameSize = (652, 498)
#frameSize = (453, 325)
fourcc = cv.CV_FOURCC('F', 'M', 'P', '4')
my_video = cv.CreateVideoWriter(out, 
                              fourcc, 
                              15, 
                              frameSize,
                              1)

for root, _, files in os.walk(in_dir):
    for a_file in files:
        guy_source = os.path.join(in_dir, a_file)
        print guy_source
        image = cv.LoadImage(guy_source)

        small_im = cv.CreateImage(frameSize, 
                                  image.depth ,
                                  image.nChannels)        
        cv.Resize(image, small_im, cv.CV_INTER_LINEAR)
        cv.WriteFrame(my_video, small_im)

print "Finished !"



My concern is that depending on the output size, the video is fine (652, 498 is ok for example).
The behaviour is the same whatever codec I use. 


If not a fix, I´d like some more information about the reason for this bug. 
As I want to ship for Ubuntu, I´d better use their packaging system and keep the 2.3 for some time. 

So I would like to know how I can wisely solve the problem, by choosing educated sizes.


Any information is welcome

Thx !


__._,_.___

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___
bong | 11 Jul 04:24 2012
Picon

OPEN CV and andriod

is it possible to make a mobile object recognition system using opencv and android.

please advise me on how to do it.

i am making a thesis and my title would be

Object recognition system for visually impaired people using android and opencv

please help me

------------------------------------

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
   Read on the web (read posts on the web only)Or Unsubscribe by mailing OpenCV-unsubscribe <at> yahoogroups.com

Gmane