Skip to main content

All Questions

Tagged with
-3 votes
0 answers
76 views

What's the best/most robust way to check if 2 images are the same or very similar

I have some video recording of my screen where I am drawing some diagrams, but there are a lot of moments where the screen is idle. Because I am using Camtasia, the cursor is not saved directly on the ...
Joan Venge's user avatar
  • 326k
0 votes
1 answer
36 views

centering an image or object in an image using numpy arrays and whatnot

from PIL import Image import numpy as np import matplotlib.pyplot as plt img = Image.open("image.png") pixels = list(img.getdata()) pxl_array = np.array(pixels) print(len(pxl_array)) ...
Abderrahmane Alloubane's user avatar
0 votes
0 answers
41 views

Does the Intensity of color in OpenCV image matter?

Here is a simple code which puts a text value onto a black frame and displays it: frame = np.zeros((50,200,3)) org=(0,45) font=cv2.FONT_HERSHEY_SIMPLEX fontScale=1 fontColor=(1,0,0) ##rgb out_img =...
Allohvk's user avatar
  • 1,161
0 votes
0 answers
46 views

Efficient binning in numpy with fancy indexing

I have a stack of 2D images which I would like to bin into a smaller image with arbitrary pixel boundaries. I have an example below which utilizes bins defined using boolean arrays and fancy indexing,...
Evidlo's user avatar
  • 324
0 votes
0 answers
42 views

Optimize calculation of statistics over rows of a matrix in Python + Numba

I have a code which basically calculates the mean of the channels of each channel of an image. Yet the mean is a robust mean calculated between quantiles and iqnores zero pixels (all channels value is ...
Avi T's user avatar
  • 53
1 vote
2 answers
134 views

How do I find the angle of an ellipse in Python using image analysis?

I am trying to find the angle of the semi major axis of an ellipse with x axis. For this, I will have to find the major axis of an ellipse, get the equation of the major axis and then just arc tan of ...
yahya ashraf's user avatar
2 votes
2 answers
92 views

Why is the image result flipped by 90 degrees?

I am trying to turn all of the white pixels in this image red, but when I run the program the shape is fine but the red pixels are rotated 90 degrees: This is the current code that I am using to do ...
Jaime Manuel Garcia Dominguez's user avatar
0 votes
0 answers
28 views

reduce or remove salt and pepper or noise from manga text segmentation

is there any algorithm that can reduce remove salt and pepper or noise without damaging the text segmentation on this case like using Morphological , blur method or fastNlMeansDenoising? for example ...
Xander's user avatar
  • 19
2 votes
3 answers
164 views

Draw a outline mask based on image shape - Using Canny edge - updated

I would like to draw an outline mask (shape) based on the image shape. I am using opencv-python version 4.9.0.80. So when we have an images like these. We want output like this without images inside. ...
NiRmaL's user avatar
  • 3,176
0 votes
1 answer
30 views

How to shift an odd sized image in Fourier space using numpy

I'm developing a function to shift an image in Fourier space. The function needs to work for even and odd sizes. The code works very well for even sizes, but not for the odd ones. This is what I have ...
Miguel Cárcamo's user avatar
1 vote
3 answers
96 views

Implementing 2D sliding window over np.array without overlaps (tiling, mean pooling)

I'm trying to implement 2D sliding window of cubic shape (k,k), to so I can iterate over a frame (n,m,3) and calculate the mean over the pixel values in each window. I want each iteration, that the ...
gaviezri's user avatar
0 votes
1 answer
76 views

How to detect the exact boundary of a Sudoku using OpenCV when there are multiple external boundaries?

I was trying to extract a sudoku grid using OpenCV by finding the square contour with the largest area. But some sudokus have more than one outer boundary, thus the program detects only the outermost ...
Ben Abraham Biju's user avatar
0 votes
1 answer
41 views

Python: Generating an image using Multiprocessing freezes

In the code below I tried generating a gray-scale image of the Mandelbrot set using multiprocessing. To do that I set up a queue and ordered multiple processes to generate individual "strips"...
some dude's user avatar
4 votes
4 answers
298 views

How to improve color layer mask to have mid tones?

I would like to improve the layer mask that I am creating in Python. Although my mask pretty much hits the targeted color, my main problem with it, is it is doing so in binary, the pixel is either ...
DrakeJest's user avatar
  • 166
0 votes
0 answers
59 views

Opencv with pre-trained model

I'm getting this error: cv2.error: OpenCV(4.6.0) d:\a\opencv-python\opencv-python\opencv\modules\dnn\src\layer_internals.hpp:110: error: (-2:Unspecified error) Can't create layer "NHWC_output&...
Amani's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
118