All Questions
Tagged with image-processing python-imaging-library
1,099 questions
1
vote
3
answers
78
views
How does a Palette work in Python Imaging Library?
Suppose I have an RGB888 image (= 8 bit per color) in which the color of each pixel evenly encodes a (raw) data byte.
Scheme:
Channel red encodes Bit 7:6
(R: 0-63 = 0b00, 64-127 = 0b01, 128-191 = 0b10,...
1
vote
2
answers
82
views
Remove circular white pixels after thresholding
I would like to remove the circle surrounding the retinal blood vessels to keep only the interior.
This is the source image where I applied segmentation. I want to remove the large white circle.
...
0
votes
0
answers
72
views
Insert a new frame in the end of animated WEBP
I have a JPEG image I and a transform function F which has some state S. Every N minutes function's state changes and after that F is applied to my image I. So for the K'th change we have output image ...
0
votes
0
answers
42
views
I'm trying to augment images and annotations by rotating, but the classes I set are misaligned afterwards
I have classified the images into A, B, and C. Each has been assigned a class: Acircle for A, Bcircle for B, and Ccircle for C.
Image A has a nearly perfect circular shape.
Image B is close to ...
0
votes
1
answer
158
views
Convert Image under UV Light to RGB?
I have an Image (banknotes) as a dataset that is under UV Light. I want to image process it back to RGB again in order to detect which banknote is it (if it is 20, 50, 100 and so on bill)
Since this ...
-3
votes
1
answer
103
views
Need to resample or resize images in python
I have two images, want to resize these images as should be same imagedata(circles/text) with exact same pixel location of both images. The distance between objects should also be same of both images....
1
vote
1
answer
362
views
Interpolation when rotating an image in python
I'm very confused and looking more for an explanation, because I can't seem to find it on the internet.
So I want to create a simple gif of an rectangle that rotates around its center in python. The ...
0
votes
1
answer
102
views
How can I specifically change or replace the HUE for the color red?
My script is not working as I expected. Is there anything wrong with my code?
from PIL import Image
import colorsys
def change_red_to_blue_hsl(image_path, output_path):
img = Image.open(...
0
votes
0
answers
31
views
image padding affects my image with grayscale background
I am working on a Python code to make a group of images (white background with black content) of equal size by adding white pixels (padding). But when running the code, a gray background appears as ...
1
vote
1
answer
192
views
Python PIL renders broken Bengali Characters on railway.app
I am trying to make an image renderer using python and Pillow (9.4.0) in which I have to put Bengali characters in the image. I was using ImageFont to do that and was using layout_engine=ImageFont....
1
vote
1
answer
809
views
Python Image Blur Effect
I am working on a project which should blur the background of the image, I have used pixellib, mask r-cnn and deeplabv3 but the results are not satisfactory, the main problem I think lies in the image ...
0
votes
1
answer
224
views
Python pillow library text align center
Am trying to make the text align center but it doens't work as I expected.
Expected output: https://imgur.com/5HU7TBv.jpg (photoshop)
My output: https://i.imgur.com/2jpgNr6.png (python code)
from PIL ...
0
votes
1
answer
58
views
How to rotate a section of an image by iteration
Goal
I'm trying to rotate a masked section of an image. For instance if I have a mask that is circular with inner radius of 30 and outer radius of 50 then my aim is to rotate the masked image by some ...
0
votes
0
answers
144
views
Visual editor for PIL?
Is there a way to visually edit images and generate Pillow code that will correspond to those edits, ala recording a macro? I'm interested in creating Pillow code that will do different image ...
0
votes
2
answers
182
views
PNG cropping increases file size
I have a set of PNG 240x240px images (~1Gb of images) for training a classification algorithm and I need to crop the bottom 26px (resulting in 240x214px) from those images, which contain some number ...