Questions tagged [OpenCV] (237)

2
answers

How to implement in python the transfer of "pointer" opencv image to the constructor of another class?

Hello. How to implement in Python such a scheme? p.s Now the transfer of the option (img) in the constructor of class A is not by reference, by value, and when you call the painter no image, because is not stored in the img link class A: def __init__(self, img): self.img = img def show(self): cv2.imshow(self.img) cv2.w...
kayli_Ku asked April 19th 20 at 12:47
0
answer

Why when working with opencv crashes the kernel?

When you run the command: cv2.imshow("camera", img) Jupiter thinks for a long time and throws an error: The kernel appears to have died. It will restart automatically. Work under Linux mint, Python version 3.7.4 In fact, the program as a whole: import cv2 cap = cv2.VideoCapture(0) while True: ret, img = cap.read() cv2...
Delmer.Konopels asked April 18th 20 at 12:52
0
answer

How to work with multithreading in OpenCV?

Hi all, already three hours sitting and can't understand. I need one thread was the capture from camera and another thread display. Anyone have any idea how to do it? It is clear that there will be two functions: ... camera = cv2.VideoCapture(0, cv2.CAP_DSHOW) def read(): while True: result, frame = camera.read() def...
jessy.Johnson asked April 18th 20 at 12:37
1
answer

Why it gives an error when you run the program?

Wrote a simple code: import org.opencv.core.*; public class Main { static { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); //swears on this line } public static void main(String[] args) { System.out.println(Core.VERSION); System.out.println(Core.VERSION_MAJOR); System.out.println(Core.VERSION_MINOR); System.out.println...
emelia12 asked April 18th 20 at 12:23
1
answer

How to superimpose an image on another image(in the center)?

Hi! The problem arose to put one image per second using gocv. The difficulty is that we need to calculate the center "background" image. What I'm doing now: bgImg := gocv.IMRead("bg.jpg", gocv.IMReadColor) inputImg := gocv.IMRead("input.jpg", gocv.IMReadColor) bgHalfWidth := bgImg.Cols() / 2 bgHalfHeight := bgImg.Rows()...
leola42 asked April 16th 20 at 11:03
1
answer

How to accurately determine the center of the pupil of the eye in the photo?

In open cv there are standard methods that allow to identify a person's face in the photo and eyes. haarcascade_eye.xml haarcascade_frontalface_default.xml But this is not enough to determine the center of the pupil, How would You do a more precise definition of the center of the pupil by means of Open CV?
Eladio_Ber asked April 16th 20 at 10:52
2
answers

How to "painting" part of the picture using OpenCV?

Hello! There is this picture: I am using your algorithm to align the images. The rotation can be clockwise and counterclockwise. The center of the image and the center of rotation always converge. The result is: Question: how can I use OpenCV to tile appearing at the corners of the black area (which always 0,0,0) so th...
Eugene.Gutkowski64 asked April 8th 20 at 18:38
1
answer

Books on OpenCV for python and it is desirable in Russian?

Hello. I'm studying machine learning and decided to explore a library like OpenCV. I've been programming in python, so I would like a book at this library for a given language, preferably Russian. But I would be grateful for any books on OpenCV.
rosemary_Turner asked April 8th 20 at 17:47
1
answer

Are there differences in OpenCV for Java and Python?

Start learning in computer vision, an idea is brewing for a small personal project. I want to understand whether there are differences in between the OpenCV implementation for Java and Python. Read in one of the books of the opinion that in Java some of the algorithms are not implemented in the source code since they are pa...
haylee.Anderson asked April 8th 20 at 10:18
2
answers

How to convert a gray image into an array?

Do an experiment. Take the first image from the MNIST database [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
jermaine.Rice asked April 8th 20 at 10:15