Stack Overflow Forums » Opencv
3 FOLLOWERS
Stack Overflow is a public platform building the definitive collection of coding questions & answers. This community is a place to get all your queries solved regarding OpenCV, discuss errors when reshaping the frame to a model input shape, learn how to convert an h264 file to mp4 with OpenCV, talk about the method to remove texts, and more.
Stack Overflow Forums » Opencv
2h ago
i'm working on a MERN Stack project for the university where users can upload pictures of cars, and i want to use opencv to blur out the license plates, thus i need to use a "haarcascades" file to identify the area. here is the relevant code:
const handlePhotosChange = async (e) => {
const { files } = e.target;
const selectedPhotos = Array.from(files);
for (const photo of selectedPhotos) {
const img = new Image();
img.src = URL.createObjectURL(photo);
await new Promise((resolve) => {
img.onload = () => {
resolve ..read more
Stack Overflow Forums » Opencv
11h ago
I have to make a lens/glasses store in which I have to implement the functionality of virtual try on. The user can use his/her device camera and take a picture. After that, the glasses should be attached to his face. I want to make a node js API which takes a picture and after processing it, returns back the picture with glasses. I have an example site at https://lenskart.com/
Can anyone guide how to implement it.
I tried out searching for this but could not find any relevant result ..read more
Stack Overflow Forums » Opencv
14h ago
cv2.ellipse seems to have a mind of its own about which way it interprets start-and end angles. I want to draw a circular arc from 300° to 130° in the clockwise direction, i.e. like this:
with this code:
import numpy as np
import cv2
center = (200, 200) # x,y
axes = (100, 100) # first, second
angle = 0. # clockwise, first axis, starts horizontal
for i in range( 330,130,-1):
image = np.zeros((400, 400, 3)) # creates a black image
image = cv2.ellipse(image, center, axes, angle, 0., 360, (0,0,255))
image = cv2.ellipse(image, center, axes, angle, 330, i, (0,255,0))
cv2.imshow("image", i ..read more
Stack Overflow Forums » Opencv
14h ago
I am doing a project about transferring the image taken from the camera to animation. I want to transfer the body pose movements I detected with Mediapipe to the blender environment as animation. I will make this transfer in bvh format. But how will I calculate the rotation rotations of the desired joints in the bvh file format? With Mediapipe, I can only see the x,y,z coordinates of the joints. Can anyone who has information on this subject help?
hierarchy
ROOT hip
{
OFFSET 0.000000 2.093389 0.000000
CHANNELS 6 Xposition Yposition Zposition Zrotation Yrotation Xrotation
JOINT spi ..read more
Stack Overflow Forums » Opencv
20h ago
I'm writing a C++ code using grpc and opencv. I proceeded with the build with cmake and make. I specified the required library and the path of the so file well. $ cmake -DCMAKE_PREFIX_PATH=$MY_INSTALL_DIR ../.. $ make -j 4 The following error occurs when entering "make -j 4". /usr/bin/ld: /usr/local/lib/libopencv_core.so: undefined reference to `std::condition_variable::wait(std::unique_lockstd::mutex&)@GLIBCXX_3.4.30'
Additionally, if I write a code that only uses opencv and proceed with compilation with g++, it runs well. I don't have a problem adding headers, but I get this error if I o ..read more
Stack Overflow Forums » Opencv
1d ago
I am trying to implement V210 video encoding by writing the encoder by myself in c/c++ and not using any library.
To achieve this, I am trying to see how I can create frame data and then use FFMPEG to put the frames in a video container using this command
ffmpeg -s 1280x720 -f v210 -i frames.bin -c:v copy sample_video.mkv
to create the frames.bin, I am creating a list of blocks based on the specifications that I found above.
The code that I am using to pack YUV to the block is as follows:
#pragma pack (push,1)
class V210Block
{
public:
void Init(uint16_t y[], uint16_t u[], uint16_t v ..read more
Stack Overflow Forums » Opencv
1d ago
I am developing an application for an ARM64-based embedded terminal using Python and OpenCV, bundled with PyInstaller. Despite successful compilation and deployment, the application fails to start on the embedded machine, presenting the following error:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "/tmp/_MEIxxxxx/cv2/qt/plugins"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
The application is compiled in a Docker container on a Mac M1, same ARM64 architecture. Here's what I have tried ..read more
Stack Overflow Forums » Opencv
1d ago
I have a number of different images that have rectangles which I need to identify. These are a mix of coloured and lighter coloured but with a dark dashed line around. Here is an example. These represent tasks that I have created within a task management app.
I want to be able to get a bounding box around each of the rectangles, regardless of whether they are coloured or not. I have taken the following approach:
Greyscale
Threshold
Gaussian blur
Canny edge
Find contours
Find rectangles (check if 4 sides)
This finds Test app 3.
It does not find Test app 4, I believe because the trail of the ..read more
Stack Overflow Forums » Opencv
1d ago
I want to deploy my django project which is face recognition for online transaction on render but it show ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects how could i resolve this ? i try install dilib in local server according to latest python version but notable to deploy
please give me insights to reslove this problem ..read more
Stack Overflow Forums » Opencv
1d ago
I am utilizing OpenCV and Python to located the positions of the 96-well plates in order to automate a detection process. However, I encounter an issue that the camera is builded with a wide angle lens resulting in an image which is not ideal for Hough Transform to detect and locate circles, in this case wells, as the function detects the inside of the wells as a circle. I have include a sample well-image and an image of what was detected by the wells.
This is the original image.
This is the image that is detected by the Hough Transfrom in the OpenCV.
To tackle this issue, I have tried using ..read more