I used a code at stackoverflow to mask my image that turned into mask but when I want to apply it at line 31 I get a error that I never saw in my life. here is the error File "main.py", line 31, in <module> masked = cv2.bitwise_and(img_to_mask,img_to_mask,mask = img_mask) cv2.error: OpenCV(4.4.0) C:UsersappveyorAppDataLocalTemppip-req-build-6sxsq0tpopencvmodulescoresrcarithm.cpp:250: error: (-215:Assertion ..
Category : opencv
I have an image with some points, and I need to draw the line of best fit on the image. The points would make a polynomial line. This is what I’ve got so far: #The coordinates are filled in earlier (self.lx, self.ly) z = np.polyfit(self.lx, self.ly, 2) lspace = np.linspace(0, 100, 100) draw_x = lspace ..
I’m trying to follow a tuto on youtube where i try to recognize license plate with an image path. I’m using open cv ans easyocr. the code : import cv2 from matplotlib import pyplot as plt import numpy as np import imutils import easyocr img = cv2.imread(‘C:/Users/perri/OneDrive/Bureau/visage_detect/plaque_imma.jpg’) gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) plt.imshow(cv2.cvtColor(gray, cv2.COLOR_BGR2RGB)) The problem ..
I trained a YoloV4 model and used opencv-contrib because openCv does not support YoloV4 yet. You can use it with yolov3. Thee are 2 problems with the code: When the final image is seen using cv2.imshow, it shoes the traingle as Yellow instead of blue. I need to extract that triangle and pass to some ..
I am trying to build face recognition project in mobile apps using flutter. From backend side, I use open cv from python, so there is cv2.VideoCapture(0) to open webcam, the thing that makes me confused is.. is it possible to open camera device from mobile apps using cv2.VideoCapture(0) ? or is there a right way ..
I findout many examples and codes for dlib landmarks for face,eyes,nose etc.. For example https://www.pyimagesearch.com/2017/04/03/facial-landmarks-dlib-opencv-python/ Can I use dlib technique for any other images for landmark dtection? If yes, how can I train it and test it? Source: Python..

I have an image in which there are about 503 chia seeds and 4 black pepper seeds below: I am trying to count both of them. I a familiar with counting one type of object using the size of the seed and divide it by the total area covered by them. This is a simple ..

I’m trying to locate the maze location from a photo. What I’d like to get is the (x,y) points of the corners of the maze. As you could see I applied cv2.Canny() to the picture and got a really nice clean image as a start. So the next step is to locate the maze. I ..
I want to detect objects in an image using Python. I know this is very famous topic. But I don’t want to use OpenCV or any other ML tools if I can do it with standard Python only. So, basically, the image will contain several objects on a whitish colored background. The reason why I’m ..
if x>=x1 and (x+w)<=(x1+w1): if y>=y1 and y+h<= y1+h1: cnts = np.delete(cnts,i,0)#ERROR HERE i=i-1 in delete "size %i" % (obj, axis, N)) IndexError: index -17 is out of bounds for axis 0 with size 13 Data ‘a’ is a np.array, and ‘b’ is array about ‘a’ , to be exactly ‘b’ is a return value ..
Recent Comments