computer-vision Questions
12
I encounter a RunTimeError while I am trying to run the code in my machine's CPU instead of GPU. The code is originally from this GitHub project - IBD: Interpretable Basis Decomposition for Visual ...
Claytor asked 29/5, 2019 at 21:54
7
I have a line of code here that uses the python binding for opencv:
cv2.rectangle(img, (box[1], box[0]), (box[3], box[2]), (255,0,0), 4)
This draws a red rectangle on image img of thickness 4.
...
Assured asked 1/11, 2014 at 15:47
1
For some reason that I cannot understand, the open cv function cv2.moments returns a dictionary with all zero values for the contour I am providing.
Here is a MWE:
contour = [[[271, 67]],
[[274, 6...
Mercuri asked 15/6, 2020 at 16:2
3
Solved
I am attempting to understand more about computer vision models, and I'm trying to do some exploring of how they work. In an attempt to understand how to interpret feature vectors more I'm trying t...
Flannelette asked 23/8, 2020 at 21:11
7
I am new to Python OpenCV. I have read some documents and answers here but I am unable to figure out what the following code means:
if (self.array_alpha is None):
self.array_alpha = np.array([1.2...
Magnetism asked 3/9, 2016 at 14:30
7
Solved
Shamelessly jumping on the bandwagon :-)
Inspired by How do I find Waldo with Mathematica and the followup How to find Waldo with R, as a new python user I'd love to see how this could be done. It...
Josephinajosephine asked 13/1, 2012 at 11:28
1
I am currently trying to detect the edge of a prism shape materials and find the angle of that shape.
I have an original image like this:
I wrote a Python program that detects the edge between bur...
Deandra asked 19/5, 2023 at 1:56
4
Solved
I have downloaded the ImageNet dataset via this pytorch api by setting download=True. But I cannot iterate through the dataloader.
The error says "'DataLoader' object does not support indexing"
t...
Greegree asked 1/7, 2019 at 15:27
1
Solved
MATLAB solutions are available elsewhere on the internet, but there is need for the open-source python based solution.
Starter code to create a blank image with a white line.
import cv2
import nump...
Trichocyst asked 17/4, 2023 at 22:47
2
I'm trying to count the number of a group of crickets(insect). I will use the image processing method, by openCV library. This will provide more accuracy practice, when the farmers sell their crick...
Dorladorlisa asked 21/7, 2021 at 17:15
3
Solved
When I am running the command from cv2.ximgproc import guidedFilter, I am getting an error: ModuleNotFoundError: No module named 'cv2.ximgproc'
I searched the Internet for possible reasons, and I...
Brasserie asked 13/5, 2020 at 23:22
4
Solved
Currently, I am working on an OCR project where I need to read the text off of a label (see example images below). I am running into issues with the image skew and I need help fixing the image skew...
Bestraddle asked 16/9, 2019 at 21:28
3
Solved
I was trying to replicate this camera calibration code.
When I run my script, the calibration process won't stop for about 30 minutes (I expected the intrinsic camera matrix for the output). What ...
Consensus asked 28/6, 2018 at 0:59
8
Solved
I have a numpy array like this:
x = np.array([[1,2,3],[4,5,6],[7,8,9]])
I need to create a function let's call it "neighbors" with the following input parameter:
x: a numpy 2d array
(i,j): th...
Caravette asked 12/6, 2012 at 12:34
2
Solved
I would like to do something similar to np.clip on PyTorch tensors on a 2D array. More specifically, I would like to clip each column in a specific range of value (column-dependent). For example, i...
Nowicki asked 17/2, 2019 at 21:52
3
Solved
I need to sum all the elements in a matrix. I used the function
sum(sum(A));
in matlab. Where A is a matrix of size 300*360.
I want to implement the same function in OpenCV. I used something ...
Barnaba asked 19/2, 2014 at 8:24
2
Solved
I use code from here to train a model to predict printed style number from 0 to 9:
idx_to_class = {0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "...
Levant asked 22/10, 2019 at 3:53
1
I am working on a project where there is board and camera on top of it. The objective is to identify students who are looking at the board and also identify the location of their sight (on th...
Elodea asked 20/10, 2018 at 2:55
5
Solved
Suppose I have got the face euler angles (pitch, yaw, roll). How can draw the 3D Coordinate Axes which show the face pose?
Here is an example from here:
Haplosis asked 13/5, 2015 at 6:43
6
Solved
When photographing a sheet of paper (e.g. with phone camera), I get the following result (left image) (jpg download here). The desired result (processed manually with an image editing software) is ...
Nowhither asked 5/7, 2019 at 15:10
4
Solved
I want to make a script for detecting and reading QR codes from photos. I would like to use PyZbar for that, but I have a problem with some errors.
I'm working in google colaboratory
!sudo apt inst...
Monarchal asked 2/8, 2020 at 15:20
3
Solved
I am using pytorch-1.5 to do some gan test. My code is very simple gan code which just fit the sin(x) function:
import torch
import torch.nn as nn
import numpy as np
import matplotlib.pyplot as pl...
Lubbock asked 28/5, 2020 at 9:47
10
I'm trying to read frames from a hevc(h265) .avi video in opencv-python (python3, latest version) but keeps throwing
OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\videoio\src\cap_image...
Natalyanataniel asked 4/12, 2019 at 3:18
4
Solved
I've gone through the official doc. I'm having a hard time understanding what this function is used for and how it works. Can someone explain this in layman's terms?
Michalemichalski asked 29/12, 2018 at 18:14
3
Solved
I am using Perceptual hashing technique to find near-duplicate and exact-duplicate images. The code is working perfectly for finding exact-duplicate images. However, finding near-duplicate and slig...
Clymer asked 17/3, 2022 at 14:32
© 2022 - 2024 — McMap. All rights reserved.