cv2

AttributeError: 'cv2.VideoCapture' object has no attribute 'isOpend'

AttributeError: 'cv2.VideoCapture' object has no attribute 'isOpend' Question: I have a problem using OpenCV with VS Code I checked version of OpenCV and Python, but I don’t know what’s wrong. opencv version is 4.7.0 vscode interpreter is python 3.9.13(‘base’) /opt/anaconda3/bin/python here is condalist opencv-contrib-python 4.7.0.72 pypi_0 pypi opencv-python 4.7.0.72 pypi_0 pypi this is my code …

Total answers: 1

I can't get Opencv aruco to work on raspberry pi

I can't get Opencv aruco to work on raspberry pi Question: I’ve tried to install cv2 on my raspberry pi and when I run just import cv2 in python it executes fine but when I run import cv2.aruco If it’s relevant, I have a raspberry pi 1b (the original one with 2 usb ports not …

Total answers: 2

Reading 7 segment digits of weighing controller

Reading 7 segment digits of weighing controller Question: i am trying to read the 7-segment display of a industrial weighing machine. as there is no serial out port for the machine i have to note down the weight manually. the idea is to use python-computer vision to capture the weight and store it in text …

Total answers: 1

How to enlarge object area on mask

How to enlarge object area on mask Question: I am working on a computer vision project and I need to extract the object from the image with preprocessing so I can eliminate noise and redundant parts in the image. What I am trying to do is multiplying image by a mask that is thresholded image …

Total answers: 1

How to convert the distance between object and camera from pixel for meter?

How to convert the distance between object and camera from pixel for meter? Question: I need to convert the distance between object and camera from pixels to meter/cm frame by frame and then calculate the speed of moving object. In the first frame, the distance of object from camera is 4 meter, and Focal length …

Total answers: 2

Setup.py error when installing dlib on Windows 10 [PYTHON]

Setup.py error when installing dlib on Windows 10 [PYTHON] Question: Whenever I try to install dlib using pip install dlib or pip3 install dlib, I get the following error message error I have already downloaded cmake and cv2, and I have also added cmake bin to the environment variables, I am not sure what else …

Total answers: 1

What does imagej – convolver – normalize kernel do?

What does imagej – convolver – normalize kernel do? Question: The convolver process in imagej has the "normalize kernel" option. I’m curious about what the normalized kernel does and how it can be implemented in Python to cv2 filter2D. Asked By: Tim || Source Answers: From the ImageJ docs: Normalize Kernel causes each coefficient to …

Total answers: 1

Identify uniform colors in pictures in Python

Identify uniform colors in pictures in Python Question: I have a Python code that identifies dark images: import os import glob import cv2 import numpy as np def isbright(image, dim=10, thresh=0.16): # Resize image to 10×10 image = cv2.resize(image, (dim, dim)) # Convert color space to LAB format and extract L channel L, A, B …

Total answers: 2

how to calculate mean of images in dataset

how to calculate mean of images in dataset Question: I Have data set contain 2060 image i want to calculate the mean and then (each image – mean) as normalization num_classes = 10 lable = [0,1,2,3,4,5,6,7,8,9] X_data = [] Y_data = [] size = 100 #mean_sum = np.zeros((100,100)) #std_sum = np.zeros((100,100)) #print(mean_sum.shape) for file in …

Total answers: 1

how to split an array homogene in half of size by taking the triagle?

how to split an array homogene in half of size by taking the triagle? Question: i have this array and i want to split it in the half how i can do it? a = [[0., 15., 19., 18., 17.], [15., 0., 14., 12., 23.], [19., 14., 0., 14., 21.], [18., 12., 14., 0., 14.], …

Total answers: 2