Missing constants from cv2 python interface (Bug #3181)


Added by Kyle Schmitt over 11 years ago. Updated over 9 years ago.


Status:Open Start date:2013-07-28
Priority:Normal Due date:
Assignee:Andrey Pavlenko % Done:

0%

Category:python bindings
Target version:2.4.10
Affected version:2.4.0 - 2.4.6 Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

The video related constants (and possibly more), are missing from the cv2 python interface.

According to the docs:

http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture-get

The capture properties such as CV_CAP_PROP_FRAME_WIDTH should be available in the cv2 module, but they are not. They are only available through cv, or cv2.cv.

A snippet from a bpython session:

import cv2
import cv
cv2.VideoCapture(0).get(cv2.CV_CAP_PROP_FRAME_WIDTH)

Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'module' object has no attribute 'CV_CAP_PROP_FRAME_WIDTH'

cv2.VideoCapture(0).get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)

176.0

cv2.VideoCapture(0).get(cv.CV_CAP_PROP_FRAME_WIDTH)

176.0


Associated revisions

Revision 7dd666e4
Added by Alexander Alekhin over 10 years ago

Merge pull request #3181 from akarsakov:ocl_mul_scale_test_fix

History

Updated by Victor Kocheganov over 11 years ago

Hello Kyle Schmitt!

Thank you for reporting the issue and detail description!
Unfortunately our human resources are highly limited and it would be much appreciated if you have time to investigate it by yourself and provide a fix to community (please see http://www.code.opencv.org/projects/opencv/wiki/How_to_contribute for details)!

Thank you in advance,
Victor Kocheganov

  • Category set to python bindings
  • Status changed from New to Open
  • Target version set to 2.4.7
  • Assignee set to Vadim Pisarevsky

Updated by Victor Kocheganov over 11 years ago

  • Assignee changed from Vadim Pisarevsky to Andrey Pavlenko

Updated by abid rahman over 11 years ago

It is already available in master branch.

cv2.CAP_PROP_FRAME_COUNT

Updated by Alexander Smorkalov over 11 years ago

Andrey Pavlenko, you've made some fixes related to wrappers generation for VideoCapture. Is this problem exist in 2.4 right now?

  • Affected version changed from 2.4.0 - 2.4.5 to 2.4.0 - 2.4.6

Updated by Alexander Smorkalov over 11 years ago

  • Target version changed from 2.4.7 to 2.4.8

Updated by Alexander Smorkalov about 11 years ago

  • Target version changed from 2.4.8 to 2.4.9

Updated by Alexander Smorkalov almost 11 years ago

  • Target version changed from 2.4.9 to 2.4.10

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4603

Also available in: Atom PDF