All Questions
50 questions
3
votes
2
answers
100
views
Video Frame-by-Frame Deraining with MFDNet
After checking the repository of MFDNet, single image rain streaks removal with the provided model is given in test.py. I am trying to modify the code to process frame-by-frame rain streaks removal in ...
4
votes
1
answer
168
views
4
votes
2
answers
177
views
NumPy script to convert BGR to HSL and back
This is a NumPy script that converts BGR arrays to HSL arrays and back, without using OpenCV. Input and output values are arrays of 3 dimensions with values ranging from 0 to 1, the shape of the ...
2
votes
1
answer
795
views
Matching corresponding masks of objects between 2 images
Here is a program that processes 2 grayscale images. Both represent the position of objects, in the form of multiple masks per image. Each mask is a shape with one color delimiting it, with 0 (or ...
7
votes
1
answer
942
views
Create an image made of many circles
I have written some Python code for creating an image made of lots of circles. It works, but I wonder if it could be made faster, shorter or more pythonic somehow.
Example image (took 28 seconds):
<...
1
vote
1
answer
89
views
Update image pixels based on different criteria
Problem statement: Assume a high resolution (> 3000 x 3000) image is given as input. The image pixels can be classified into one of the three categories namely text, background and drawing. There ...
1
vote
1
answer
58
views
Correcting coordinates of an image with polynomial root in python
I want to optimize this for loop for correcting coordinates of an image, it takes too long which is not suited for my system. I have done some profiling, the numpy roots is taking most of the time (...
2
votes
0
answers
557
views
Multi-threaded image convolution/pooling-python
This multi-threaded code takes an array of 3d images and applies the convolution function with padding, stride, pad values .. as parameters and same applies for creating pooling layers. I need ...
6
votes
2
answers
326
views
Compressing large jpeg images
I'm working with thousands of large image files in a regularly updated library. The following script does the job (on average reduces my file size ~95%) but costs me around 25 seconds to compress one ...
2
votes
0
answers
61
views
Generate Black and White confidence map masks for joints, same as OpenPose/Convolutional Pose Machines
Attached below is my code for generating the confidence maps for the joint locations, it is in the same vein as the maps generated for the paper Convolutional Pose Machines and OpenPose. I am ...
5
votes
1
answer
88
views
Read/write data structure + byte
I am writing a program to compress an image using Huffman encoding, and I need to write the data structure and the byte file. After that, I have to read/decode it. I realize that my read and write is ...
5
votes
2
answers
153
views
Python image combiner reading writing
I am writing a simple script that will combine two images at a pixel level, selecting every other pixel from one image, and the other pixels from a second image.
...
1
vote
1
answer
316
views
Add watermark to images
Recently, I started reading image processing via opencv library in python.
I create a minio object storage and upload some photos into it. After that, I wrote a program which reads every image in ...
2
votes
1
answer
649
views
Image Processing - Comparing 2 images and Ranking Similarity
My code compares 2 images of any shape/dimension and ranks them in order of similarity. It starts with reading from a CSV file with columns image1, image2 which contain absolute paths and then ...
10
votes
1
answer
4k
views
Bilinear image interpolation
I have written a bilinear interpolant, which is working moderately well except that is painfuly slow. How can rewrite the code to make it faster? Using opencv directly isn't a valid answer.
...