Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Never written or researched one of these algorithms before but let me have my best guess;
- Divide original image into small chunks of averaged colors (or simply decrease the resolution)
- Load average color of all images into memory
- Pixel by pixel of reduced original image (from step one), match color of pixel to closest match of average color from the list in memory
- Output in full resolution (or, since the image will be made of other images, an even larger resolution, if desired!) -
That is really awesome! Can you put it on GitHub? I'd love to see how you did it.
Edit: Nevermind, you already did. -
K-ASS25456y@filthyranter I have not, for now I didn't make it a package rather just a main function that takes in inputs, I'm waiting on people's thoughts on this to decide if I should take some time to make it a package
-
K-ASS25456y@AlgoRythm so basically, I first have to pre process the photos used to assemble the image, the pre processing part will give me the most frequent three colors in the picture and put it in a Jason file, so in that Jason file the key is rgb and the value is the file name. I didn't use knn for this part, rather I collect all the colors using Python PIL library and reduce by key to find color chunks. Then for reassembling, I cut the pictures into squares and find the rgb value for that chunk, then from the Jason file I mentioned I find the pictures that has the closest rgb value. However depend on the collection of pictures used in pre processing, this result may not be perfect. Then for each chunk I paste the picture. The chunk size can be defined and also how much you want to enlarge the pasted picture. I did. It think of gaussian blur but that seems like a good idea, will do it now.
-
Avyy7506y@AlgoRythm @K-ASS Hoe about some median blur? It's effective to remove those grainy textures
-
K-ASS25456y@AvyChanna in the output image? No, in processing? I have used gaussian blur so a median blur is unnecessary
Related Rants
Wrote some codes that uses your photos to compose an input image. Will post code later. Written in Python though. Also this is my dad. Also I wrote this in Yellowstone cuz I didn't like the view lol.
rant
python
image