Freeform - The esp8266 ssd1306 OLED freeform setup is now ready. I need to practice soldering more. Even though the freeform circuit is somewhat useable but it is not nearly as beautiful.
If any of you would like to try, I would like to advise you using female header pins as modules holder. You solder the header pins in proper places to the freeform wireframe according to your design. In that way, you will not unintentionally destroy your module boards should mishaps happened. Hopefully, after some more practice, we will produce some nice looking freeforms fit for art exhibitions.
As I mentioned earlier, images taken by the esp32-cam needs to be downsized and converted. We need to change 1600x1200 JPG down to 128x64 PBM. I will do the whole process automatically in the finished product. The code below seems to work OK.
Using python PIL we just need 10 lines of code to get the result we want. I am impressed and I will learn more about PIL. It will come handy for some future projects that I have in my plan.
If any of you would like to try, I would like to advise you using female header pins as modules holder. You solder the header pins in proper places to the freeform wireframe according to your design. In that way, you will not unintentionally destroy your module boards should mishaps happened. Hopefully, after some more practice, we will produce some nice looking freeforms fit for art exhibitions.
As I mentioned earlier, images taken by the esp32-cam needs to be downsized and converted. We need to change 1600x1200 JPG down to 128x64 PBM. I will do the whole process automatically in the finished product. The code below seems to work OK.
#!/usr/bin/python3 from PIL import Image, ImageEnhance foto = Image.open("foto.jpg") # crop foto = foto.crop((0,200,1600,1000)) # convert foto = foto.convert('L') # convert image to monochrome # enhance foto = ImageEnhance.Brightness(foto).enhance(2.0) # 1.0 orig foto = ImageEnhance.Contrast(foto).enhance(2.0) # 1.0 orig foto = ImageEnhance.Sharpness(foto).enhance(1.75) # 1.0 orig , max 2.0 # resize foto = foto.resize((128,64),Image.ANTIALIAS) # final convert foto = foto.convert('1') # convert image to black and white foto.save("foto4oled.pbm", quality=90, optimize=True)This may not be the best way to do the conversion. You can certainly play around with image enhancement sequence order and their parameters. Experiment and you might get a better quality result.
Using python PIL we just need 10 lines of code to get the result we want. I am impressed and I will learn more about PIL. It will come handy for some future projects that I have in my plan.
Comments
Post a Comment