Category "opencv"

Fitting a contour inside another contour using OpenCV

The idea is to have a rectangular contour, searching for the points of intersection with the triangle one (as shown in the image below) and then move the recta

Mask a part of the face using MediaPipe - python

I want to mask the cheek, but this mask should have curved edges and not be sharp. I drew the mask using the landmark keys: right_cheek = [330, 350, 411, 376, 3

Access pixel value of mask using opencv

I got a problem where I need to access pixels of a opencv Mat image container. I use opencv inRange function to create a mask. In that mask I need to check the

Quantify longest axis and width of irregular shapes within a single image

Original question I have about 80-100 images such as (A). Each image is composed of shapes that were filled with black color after marking the outline in ImageJ

How to convert a hex string to an image vector

I am making an API that reads an image as a hex string. I need to convert the hex string to an image vector like what you would get from: img = cv2.imread('abc.

OpenCV get pixels on an ellipse

I'm trying to get the pixels of an ellipse from an image. For example, I draw an ellipse on a random image (sample geeksforgeeks code): import cv2 path = r'C:\U

Vector point std::vector<cv::Point>

I am trying to draw a trajectory on an image and saving these trajectory points as std::vector<cv::Point> trajectoryPoint and I would like to access the

Python Opencv how to improve SIFT output?

train_image = 'train_image location' sift = cv2.SIFT_create() gray = cv2.cvtColor(train_image, cv2.COLOR_BGR2GRAY) (kp, descs)

ERROR: Could not find a version that satisfies the requirement python-opencv

I am trying to install the opencv python library. This is the command I ran: pip install python-opencv I got this error: ERROR: Could not find a version that s

Image masking by coordinate or changing binary image pixel to black based on the the coordinate

I have this binary image and i want to remove the objects (convert all the white pixel to black ) that are above the (x, y) coordinate. This is the inital binar

How to calibrate an image without a chess board using a map?

I'm learning OpenCV and I have this project where I have to do some analysis on football players in a game. To do so I first need to get their position on the f

distance between concentric circle at various angles using opencv

im using the below code to detect concentric circles and measure distance at various angles. outer circle matrix shape is zero and im getting error - valueerro

How to remove the background from an image

I want to remove the background, and draw the outline of the box shown in the image(there are multiple such images with a similar background) . I tried multipl

Serving local webcam video stream to web with "multipart mixed replace" HTTP response

This article shows how to stream a local webcam to the browser with Python + Flask + OpenCV + multipart HTTP response. After launching the following self-contai

How to load video in OpenCV (Java)

I'm trying to load a video file in OpenCV Java, and have narrowed down my issue to the following code: import org.opencv.core.Core; import org.opencv.videoio.Vi

Python Remap function returns not an image

I have a problem with the code. There is no compile error, but the result does not give a corrected image. Could someone please explain me where is my error. I

Use hardware Trigger in Baumer neoAPI python SDK

I want to use Hardware Trigger in Baumer camera with neoAPI SDK. I found continuous mode in example but no documentation available for hardware trigger. import

How to pass a video return from JavaScript to python backend in Django view for OpenCV

I want to do certain tasks and the processes are as follows: 1. Access the camera of the user to get the video-frames from them. 2. Process the video frames fro

Crop colour image according to OTSU threshold

I have a colour image which I have sucessfully applied the OTSU thresholding method on its greyscale form to obtain the outline of the biscuit: Original Colour

OpenCV: My camera opens but it won't return any frames

I am working with OpenCV to record some videos. I have this very simple test code that records a 20 seconds video: import cv2 import os import time base_dir =