I’ve been working on my master thersis for 7 months using opencv-python library. In all of my work I compiled eveything on CPU. However, i Already have a 1070-8GB Nvidia graphic card and i just want to make use of this card. I made a quick search and came to the output that i need ..
I have some images ,array size of 128,128,3 . now I want to join two or three images such a way that the images overlap 30 pixels from first image and 30 pixels from second image. lets say (img1.right-30pixel)+(img2left-30pixel) . Then normalize the image by 2. so it will give me a new concatenated image ..
the following code plays a given video file on a tkinter window: from tkinter import * from PIL import ImageTk, Image import cv2 root = Tk() main_label = Label(root) main_label.grid() # Capture from camera cap = cv2.VideoCapture("video.mp4") # function for video streaming def video_stream(): ret, frame = cap.read() cv2image = cv2.cvtColor(frame, cv2.COLOR_BGR2RGBA) img = Image.fromarray(cv2image) ..
I am currently working on my Nvidia Jetson Nano 4GB following this guide. I try to install tensorflow but a few moments later I have THAT 2500lines error: ‘python version don’t match your environment’ . Okay, I want to see my actual version and I have a different answer for each request. What should I ..
I was thinking of creating a shape matching program in Python using OpenCV2 where I have to give the input in a Paint-like console and it will be read by cv2.imread. But all I found on the internet was air canvas which is not exactly the thing I was looking for, rather a simpler version ..
I am trying to detect human hand pose using OpenPose just like given in this video https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/.github/media/pose_face_hands.gif for hand part. I have downloaded the caffe model and prototxt file. Below is my code to implement the model. import cv2 import numpy as np import matplotlib.pyplot as plt %matplotlib inline frame = cv2.imread("6.jpg") frame_rgb=cv2.cvtColor(frame,cv2.COLOR_BGR2RGB) plt.imshow(frame_rgb) threshold ..
I am attempting to find the area inside an arbitrarily-shaped closed curve plotted in python (example image below). So far, I have tried to use both the alphashape and polygon methods to acheive this, but both have failed. I am now attempting to use OpenCV and the floodfill method to count the number of pixels ..
Here is the description of my question I have lots of circle like contours in a video all of them are moving but one of them is a ball and i want to detect that My approach As it is a ball and under no external force so i believe it should follow a parabolic ..
#error: im not able to convert my images from bgr to rgb images =  path = ‘E:subjectsAIFace-Mask-Detection-masterwithout-mask-detections’ listimages=os.listdir(path) encode_list =  for img in listimages: images.append(img) img = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY) encode = face_recognition.face_encodings(img) encode_list.append(encode) print(images) #encodeListKnown= find_encoding(images) #print(len(encodeListKnown)) Source: Python..
I keep getting an error when running the code below import cv2 import urllib3 as urllib import requests import numpy as np url = "https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwallup.net%2Fwp-content%2Fuploads%2F2016%2F03%2F10%2F343179-landscape-nature.jpg" r = requests.get(url) imgar = np.array(bytearray(r.text,’utf-8′),dtype=np.uint8) img = cv2.imdecode(imgar,-1) cv2.imshow(‘img’,img) cv2.waitKey() Error: cv2.imshow(‘img’,img) cv2.error: OpenCV(4.5.1) C:UsersappveyorAppDataLocalTemppip-req-build-kh7iq4w7opencvmoduleshighguisrcwindow.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘cv::imshow’ This error keeps happening no ..