Skip to content
Advertisement

Tag: image

Remove [255,255,255] entries from list of image RGB values

I reshaped an image (included below) as a list of pixels, and now I want to remove the black ones (with value [255,255,255]). What is an efficient way to do it? I tried using IM[IM != [255,255,255]] and I got a list of values, instead of a list of value triplets. Here is the code I’m using: Answer The issue

How can i save the name of objects in python in specific order?

I am trying to save the name of objects as image in specific order. Like if there are seven objects detected in image and their names are [chair, tv, bed, chair ,bed, chair, chair]. I want that it should be saved as [chair.png, chair1.png, chair2.png, chair3.png, bed.png, bed1.png, tv.png]. No matter what objects comes first but its numbers should remains

A copy of image array not working in python

So I am working on Image Encryption and using a chaotic map for diffusion. So I have been trying to rearrange pixels of an image and made a rearranging code. It works fine for normal arrays but when I use it on image, without any rearranging, just a simple copy, the new array doesn’t make any image, in fact np.array_equal

Save Images with orginal name

I have script to download images from website. But it’s saves name with ‘images1, images2, images3, images4 etc’ I need to save images with orginal name. If the images name 43343.jpg i need to save with 43343.jpg I use beautifulsoup and requests for this case. Sorry my english. It’s not my first language Answer Try replacing this part of your

How to re-direct output path in python

I want to read urls from .txt file in one directory (Root/URLS/Gibiru_urls.txt) and output into another directory (Root/Images/Gibiru_pics). My python file is located in (Root) Answer I was able to re-direct. It was the os.chdir() method I was looking for.

Advertisement