Ask Your Question

amie's profile - activity

2019-03-04 22:02:32 -0600 received badge  Popular Question (source)
2017-04-14 10:58:52 -0600 commented question Problem with using ArUco + python

done, issue not resolved

2017-04-14 01:47:50 -0600 asked a question Problem with using ArUco + python

I am trying to use ArUco library with opencv. I have installed OpenCV 3.1 on ubuntu, opencv contrib and compiled both. When I do help(cv2.aruco), the functions are not listed. This is the output -

Help on module cv2.aruco in cv2:

NAME
cv2.aruco


FILE
(built-in)

DATA
DICT_4X4_100 = 1
DICT_4X4_1000 = 3
DICT_4X4_250 = 2
DICT_4X4_50 = 0
DICT_5X5_100 = 5
DICT_5X5_1000 = 7
DICT_5X5_250 = 6
DICT_5X5_50 = 4
DICT_6X6_100 = 9
DICT_6X6_1000 = 11
DICT_6X6_250 = 10
DICT_6X6_50 = 8
DICT_7X7_100 = 13
DICT_7X7_1000 = 15
DICT_7X7_250 = 14
DICT_7X7_50 = 12
DICT_ARUCO_ORIGINAL = 16

Further, if I try using those functions, I hit errors like this -

aruco_dict = aruco.Dictionary_get(aruco.DICT_5X5_250)
AttributeError: 'module' object has no attribute 'Dictionary_get'

How do I generate markers and detect the same in python?

2017-03-25 12:53:18 -0600 commented question Need to read video in MJPEG format using VideoCapture

I need to stream videos from two cameras in parallel. If I stream raw, without compression, CPU is used up.

2017-03-25 12:51:22 -0600 commented question Need to read video in MJPEG format using VideoCapture

I am using Ubuntu 16.04 on Odroid with oCam. Ocamviewer (default viewer of oCam) is streaming with MJPEG. But when I try the same with openCV, I am not successful.

2017-03-25 12:42:13 -0600 received badge  Editor (source)
2017-03-25 12:25:07 -0600 commented question Need to read video in MJPEG format using VideoCapture

I tried the following. Errors follow -

Code:

import cv2

cap1 = cv2.VideoCapture(0) cap1.set(CV_FOURCC('M', 'J', 'P', 'G')) cap1.set(3,320) cap1.set(4,240) cap1.set(5,15)

Error: NameError: name 'CV_FOURCC' is not defined

Code: import cv2

cap1 = cv2.VideoCapture(0) cap1.set(CV_CAP_PROP_FOURCC, ('M', 'J', 'P', 'G')) cap1.set(3,320) cap1.set(4,240) cap1.set(5,15)

Error: NameError: name 'CV_CAP_PROP_FOURCC' is not defined

Code: import cv2

cap1 = cv2.VideoCapture(0) cap1.set(6, ('M', 'J', 'P', 'G')) cap1.set(3,320) cap1.set(4,240) cap1.set(5,15)

Error: TypeError: a float is required

2017-03-25 11:54:18 -0600 asked a question Need to read video in MJPEG format using VideoCapture

I need to read video in MJPG format. I tried the following -

import cv2
cap1 = cv2.VideoCapture(0)
cap1.set(CV_CAP_PROP_FOURCC, ('M', 'J', 'P', 'G'))

It is throwing this error - NameError: name 'CV_CAP_PROP_FOURCC' is not defined

After which I tried -

cap1.set(6, ('M', 'J', 'P', 'G'))

Now, the error is - TypeError: a float is required

How do I capture a video in MJPEG format from the webcam?