human-man | 1 Jul 02:14 2012
Picon

Converting PIL image to OpenCV image

Hello,

(I'm working with OpenCV in Python 2.7 on Windows.)

I had luck to convert a PIL image to an OpenCV image with the algorithm 
on http://opencv.willowgarage.com/documentation/python/cookbook.html 
(topic "PIL Image to OpenCV"):

pil_image = Image.open('Image.jpg').convert('RGB')
cv_image = cv.CreateImageHeader(pil_image.size, cv.IPL_DEPTH_8U, 3)
data = pil_image.tostring()
cv.SetData(cv_image, data)

However, I could only save the resulting image with cv.SaveImage, not 
cv2.imwrite. The latter raised the exception: TypeError: <unknown> is 
not a numpy array.

Also, with the resulting image, I could not work with cv2.VideoWriter() 
and video_writer.write. Instead I had to use cv.CreateVideoWriter and 
cv.WriteFrame.

Further the RGB source is treated as BGR, so I have to convert it. This 
is not stated in the cook book (see URL above). So this is an 
unsatisfyingly unclear situation.

Is there a cv2 version to convert a PIL image to a OpenCV image? Or is 
there lacking support for the task?

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

(Continue reading)

human-man | 1 Jul 15:03 2012
Picon

Converting PIL image to OpenCV image

Hello,

(I'm working with OpenCV in Python 2.7 on Windows.)

I had luck to convert a PIL image to an OpenCV image with the algorithm on
http://opencv.willowgarage.com/documentation/python/cookbook.html (topic
"PIL Image to OpenCV"):

pil_image = Image.open('Image.jpg').convert('RGB')
cv_image = cv.CreateImageHeader(pil_image.size, cv.IPL_DEPTH_8U, 3)
data = pil_image.tostring()
cv.SetData(cv_image, data)

However, I could only save the resulting image with cv.SaveImage, not
cv2.imwrite. The latter raised the exception: TypeError: <unknown> is not a
numpy array.

Also, with the resulting image, I could not work with cv2.VideoWriter() and
video_writer.write. Instead I had to use cv.CreateVideoWriter and
cv.WriteFrame.

Further the RGB source is treated as BGR, so I have to convert it. This is
not stated in the cook book (see URL above). So this is an unsatisfyingly
unclear situation.

Is there a cv2 version to convert a PIL image to a OpenCV image? Or is there
lacking support for the task?

--
View this message in context: http://opencv-users.1802565.n2.nabble.com/Converting-PIL-image-to-OpenCV-image-tp7580733.html
(Continue reading)

fuli | 30 Jun 16:47 2012

how to rectify an arbitrary Quadrilateral to a rectangle

Hi All,

I have an arbitrary quadrilateral get from an image ROI, I want to rectify
it to a rectangle, but don't lose any contect in the quadrilateral, like the
images below, the first image contains an ROI, which is an arbitrary
quadrilateral, the second image is the processed image, as you see, the
contents did not lost, but the image was stretched, anyone knows how to do
this?
http://opencv-users.1802565.n2.nabble.com/file/n7580730/before.png 
http://opencv-users.1802565.n2.nabble.com/file/n7580730/after.png 

--
View this message in context: http://opencv-users.1802565.n2.nabble.com/how-to-rectify-an-arbitrary-Quadrilateral-to-a-rectangle-tp7580730.html
Sent from the opencv-users mailing list archive at Nabble.com.

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

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
aamir | 30 Jun 21:34 2012
Picon

Source Code for Dimensionality reduction of an image using PCA in OpenCV

Dear All,

I need the code for dimensionality reduction of an image using PCA in OpenCV urgently.I am new to open CV and
after trying a lot I am unable to write the code for the above stated task.Please provide me the code so that i
can see what my mistake was.

Waiting for your kind response.
Regards
Aamir 

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

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
artur.lugmayr | 29 Jun 16:31 2012
Picon
Picon

2 WEEKS LEFT - 5th Nokia Ubimedia MindTrek Award Competition - 6.000 Euros Award Sum

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

            The 6th Nokia Ubimedia MindTrek Awards Competition - NUMA2012

                 Submission DEADLINE 15th July on: http://www.numa.fi 

                 Call for the best UBIMEDIA, PERVASIVE, AMBIENT MEDIA
                  ... products, services, applications, concepts...

      Check out previous years' entries on: http://www.ambientmediaassociation.org

                         The total AWARD SUM: 6.000? 

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

NUMA2012 seeks for novel ways to combine ubiquitous computing to media. We are 
looking for disruptive artistic visions as well as clever near-to-market 
solutions off the beaten tracks! This includes any range of innovative ubimedia, 
pervasive, or ambient products and services. The Nokia Ubimedia MindTrek Awards 
is a highly interdisciplinary competition and we invite Designers, Computer 
Scientists, Artists, Economists and Engineers to take a stand on one of the 
following questions with their entries:

// What is the aesthetic experience opened up by the rise of ubiquitous and ambient media?
// What constitutes the specific intelligence that drives future media environments?
// How will location- and context-aware media services change our social life?
// How will our future lives look like in the era of ubiquitous computation?
// How can society as a whole benefit from these advanced technologies?

Valid competition entries include:
(Continue reading)

artur.lugmayr | 29 Jun 16:28 2012
Picon
Picon

|| ACADEMIC MINDTREK || LAST CALL: 3rd June || Last CfP || * HCI * Social Media * Digital Games * Open Source * Media Management * Ambient Media *

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

            The 6th Nokia Ubimedia MindTrek Awards Competition - NUMA2012

                 Submission DEADLINE 15th July on: http://www.numa.fi 

                 Call for the best UBIMEDIA, PERVASIVE, AMBIENT MEDIA
                  ... products, services, applications, concepts...

      Check out previous years' entries on: http://www.ambientmediaassociation.org

                         The total AWARD SUM: 6.000? 

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

NUMA2012 seeks for novel ways to combine ubiquitous computing to media. We are 
looking for disruptive artistic visions as well as clever near-to-market 
solutions off the beaten tracks! This includes any range of innovative ubimedia, 
pervasive, or ambient products and services. The Nokia Ubimedia MindTrek Awards 
is a highly interdisciplinary competition and we invite Designers, Computer 
Scientists, Artists, Economists and Engineers to take a stand on one of the 
following questions with their entries:

// What is the aesthetic experience opened up by the rise of ubiquitous and ambient media?
// What constitutes the specific intelligence that drives future media environments?
// How will location- and context-aware media services change our social life?
// How will our future lives look like in the era of ubiquitous computation?
// How can society as a whole benefit from these advanced technologies?

Valid competition entries include:
(Continue reading)

antony_eml | 29 Jun 15:28 2012
Picon

opencv 2.4.1 build error

Hi, when I build opencv-2.4.1, I get this error
---------------------------------------------------
...
[ 76%] Built target opencv_test_legacy
[ 76%] Built target opencv_photo
[ 77%] Built target opencv_perf_photo
[ 77%] Built target opencv_test_photo
[ 77%] Generating pyopencv_generated_funcs.h, pyopencv_generated_func_tab.h,
pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_const_reg.h
Traceback (most recent call last):
  File "/home/RnD/libs/OpenCV-2.4.1/modules/python/src2/gen2.py", line 1, in ?
    import hdr_parser, sys, re, os, cStringIO
  File "/home/RnD/libs/OpenCV-2.4.1/modules/python/src2/hdr_parser.py", line 630
    decl[1] = ": " + ", ".join([b if "::" in b else self.get_dotted_name(b).replace(".","::") for b in bases])
                                   ^
SyntaxError: invalid syntax
make[2]: *** [modules/python/pyopencv_generated_funcs.h] Error 1
make[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2
make: *** [all] Error 2

-------------------
My Python Version 2.4.3 

how can I fix this problem?

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

Change settings: http://www.yahoogroups.com/mygroups, select
   Get Emails (get all posts)
   Daily Digest (one summary email per day)
(Continue reading)

antony_eml | 29 Jun 15:39 2012
Picon

opencv 2.4.1 build error

[ 77%] Built target opencv_test_photo
[ 77%] Generating pyopencv_generated_funcs.h, pyopencv_generated_func_tab.h,
pyopencv_generated_types.h, pyopencv_generated_type_reg.h, pyopencv_generated_const_reg.h
Traceback (most recent call last):
  File "/home/RnD/libs/OpenCV-2.4.1/modules/python/src2/gen2.py", line 1, in ?
    import hdr_parser, sys, re, os, cStringIO
  File "/home/RnD/libs/OpenCV-2.4.1/modules/python/src2/hdr_parser.py", line 630
    decl[1] = ": " + ", ".join([b if "::" in b else self.get_dotted_name(b).replace(".","::") for b in bases])
                                   ^
SyntaxError: invalid syntax
make[2]: *** [modules/python/pyopencv_generated_funcs.h] Error 1
make[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2
make: *** [all] Error 2
===============================================
how can I fix this 

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

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
Alex | 29 Jun 14:47 2012
Picon

Library Backwards Compatibility?



Hi everyone,

I was trying to follow a tutorial on haartraining here , but I am stuck on the "Create Training Samples". The mergevec executable gives me the error "error while loading shared libraries: libml.so.2.1: cannot open shared object file: No such file or directory". I checked my library, and the libml.so is version 4 so it appears as "libml.so.4.1". Is there any way to get the mergevec to recognize the new library?

Thanks


__._,_.___

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

__,_._,___
Kevin Keraudren | 2 Jul 13:19 2012
Picon

Cascade detection: scaling the image, recomputing integral image

Hi,

In the paper from Viola and Jones (2001), it is written:
"Scaling is achieved by scaling the detector itself, rather than scaling 
the image."

But this does not seem to be the case in OpenCV.

Looking at:
OpenCV-2.4.0/modules/objdetect/src/cascadedetect.cpp

CascadeClassifier::detectMultiScale

does a for loop on all possible scales with:
resize( grayImage, scaledImage, scaledImageSize, 0, 0, CV_INTER_LINEAR );

and a call to:
CascadeClassifier::detectSingleScale

which begins with a:
featureEvaluator->setImage( image, data.origWinSize )

thus computing the integral image for all the scaled image.

What is the reason for scaling the image instead of the features? Is the 
speed loss small enough?

Thanks for your information,

Kind regards,

Kevin

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

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
pattern | 2 Jul 09:03 2012
Picon

Error in convexityDefects

Hi there,

I am trying to calculate the convexity defects using:

vector<Vec4i> defects;
for (int i = 0; i < contours.size(); i++)
{ 
  convexityDefects(Mat(contours[i]), hull[i], defects[i]);
}

but, I am getting this error:

"OpenCV Error: Assertion failed (hull.checkVector(1, CV_32S) > 2) in unknown function.

Any idea or hint is greatly appreciated.

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

Gmane