100DaysOfCode: Day 91

Day 91’s project is “color hunter”. Basically, the webpage should do this: you upload/select an image, and it does the “top 10 colors” showing in that image.

My idea is to split the project to two parts:

  1. load (and display) the image
  2. analyze the uploaded image.

So far, I did the first one.

It took a few tries. For example, my original idea is to have the index.html does the load and display. But the only way I could make it work was via javaScript (from here), but even that it took a few tries. I forgot that where I could put my javaScript (eventually put it under <scripts> in <body>), I forgot I needed to load the jQuery framework in the header etc. Those took a while.

But eventually my idea became fully utilizing flask only. So I would have a index html page for the select image and upload, then it will redirect to a different image.html for the display. Then, the next step should be the image “analyze” part.

#TODO next: add the image to a route path (route(“/image” for example), so this handles the submit for the analyzation process. Then use numpy to get the top color. This should be next step.

This entry was posted in 象哥的學習筆記 Study Notes and tagged . Bookmark the permalink.

Leave a Reply