How can I make an object that follows a route?

I have a red point where I can move around and a blank background that I can edit as I want. My goal is to move this point according to the route I will draw on the background.I can take my center …

multi-threading, what is wrong with my code

I was trying to make faster my frames in opencv, it was so slow using it normal, so I decided to ask it here Make faster videocapture opencv the answer was to use multi threading to make it faster, so …

Is there any possible way to get findout extreme points exactly on static image in python?

I need to findout extreme points of a image(cloth). I have tried with https://www.geeksforgeeks.org/find-co-ordinates-of-contours-using-opencv-python/ but i need to findout like this, But the current …

Line detection issue – OpenCV in Python

I have written the following script with which I aim to detect lines in Gazebo (a simulation environment): #!/usr/bin/env python # rospy for the subscriber import rospy # ROS Image message from …

camera suddenly close when i run the code

I am trying to make a color detection from the default camera using python, to do this I am using OpenCV and NumPy. My program suddenly closes the camera. This is code I’m trying to run: import cv2 …

How to compare first frame to other frame of video opencv python

import cv2 cap = cv2.VideoCapture(input_path) count = 0 n=0 while True: ret, frame = cap.read() if ret: # You can do processing on this frame variabqle roi = frame[343:…

Opencv-Overlay a Video on Webcam

Guys I am having problem on overlaying my video to webcam. I can open webcam without any issues or errors but my video is not being showed. I am trying to play my video in specific x-y coordinates.I …

Turning an Open CV frame into a Base64 encoded JPEG

I want to take a frame from an Open CV webcam stream, produce a JPEG thumbnail and then encode it as Base64 (It will then be sent as an MQTT message, but this is not the problem). My Python “…

OPENCV – !ssize.empty()

THIS IS MY CODE: import cv2 as cv import numpy as np cap = cv.VideoCapture(0) imgTarget = cv.imread(‘photosTargetImage.jpg’) #bu resmimiz Vid = cv.VideoCapture(‘photosvideo.mp4’) detection = False …

OpenCV – Detect points along a curve

I need to detect the points along these curves, in particular I need the position on the image of one of the two points starting from the left: I tried to detect Hough Points like that: import cv2 …