Skip to content
Advertisement

Tag: python-imaging-library

RGB average of circles

I’m using OpenCV and PIL in Python. I have 96 circles detected with their center coordinates and radios. I need the average RGB from each circles. Each circle has 6000 pixels, so I thinks iterate one to one it is not efficient. How can I extract the average RGB from each circle? I am ready to use any other library

Convert PIL Image to byte array?

I have an image in PIL Image format. I need to convert it to byte array. Now I need the roiImg as a byte array. Answer Thanks everyone for your help. Finally got it resolved!! With this i don’t have to save the cropped image in my hard disc and I’m able to retrieve the byte array from a PIL

PIL and pygame.image

I had opened an image using PIL, as Draw some text on it, as and then saved it as to open it using pygame.image I just want to do it without saving.. Can that be possible? It is taking a lot of time to save and then load(0.12 sec Yes, that is more as I have multiple images which require

Need help implementing flood-fill algorithm

So I’m trying to create a flood fill algorithm and I keep getting a recursion error with this. The algorithm seems to have infinite recursion and I cannot pinpoint why. I have looked all over the internet and I cannot find a solution as it seems like my program is correct according to most sources. There seems to be something

Advertisement