Paint By Number https://marie.knight.domains 2022 Senior Capstone Project Tue, 19 Apr 2022 19:24:17 +0000 en hourly 1 https://wordpress.org/?v=5.9.3 Some Last Minute Troubles https://marie.knight.domains/blog_posts/some-last-minute-troubles/ https://marie.knight.domains/blog_posts/some-last-minute-troubles/#respond Tue, 19 Apr 2022 19:24:17 +0000 https://marie.knight.domains/?p=147 Presentations are coming up soon, and I’m sadly dealing with some last minute problems. I’m working on making the program run faster and I’m running into all sorts of small problems as I’m going. I’m still only working on adjusting the first function and encountering a lot of strange problems. The thing I’m worried most about is finishing this whole process and my program still not running any faster, because I could have been spending this time to work on other things, but I feel like I’ve learned a lot through this adjustment and understand my own project even better. If for some reason I can’t get this method to work in time for presentations, I can just go back to the previous, working version I have saved.

]]>
https://marie.knight.domains/blog_posts/some-last-minute-troubles/feed/ 0
Progress Has been Made! https://marie.knight.domains/blog_posts/progress-has-been-made/ https://marie.knight.domains/blog_posts/progress-has-been-made/#respond Tue, 05 Apr 2022 21:18:39 +0000 https://marie.knight.domains/?p=143 I have finally been able to get my paint by number to look like the actual photo uploaded! I consider this a great success, though, in order to achieve this, my program takes a very long time to run. Since most of my requirements for the original assignments have been met, so I have time to try different things and make it more efficient. I met with Dr. Pankratz yesterday and he gave me a suggestion that will help me reduce the amount of for loops in my code. I hope to implement it this weekend.

]]>
https://marie.knight.domains/blog_posts/progress-has-been-made/feed/ 0
Updates from the previous week https://marie.knight.domains/blog_posts/updates-from-the-previous-week/ https://marie.knight.domains/blog_posts/updates-from-the-previous-week/#respond Tue, 29 Mar 2022 01:57:55 +0000 https://marie.knight.domains/?p=139 After meeting with the CS professors on Thursday, I had two goals to work toward. The first was making the paint by number more accurate by using HSV colors instead of RGB, and the second was making my paint by number generation faster by only looking at half of the pixels of the picture.

I was able to implement both of these things over the past couple of days. The HSV coloring (can be seen in the screen shot below) didn’t really work. I actually believe the the color detection is worse now, which is upsetting, so I’m going to be changing it back to RGB soon.

Looking at only half of the pixels in my image did work quite nicely. I timed how long it took to process an image on level medium before and after the change and was able to reduce the time by over 50%.

This leads me to my problem. To make the colors more accurate, I am going to need to run kMeans (my edge detection algorithm that looks at every other pixel now) twice, meaning it will be back to looking at the full number of pixels. I think I’m going tor try and reduce it down to looking at every third pixel so the process doesn’t go back to it’s previous speed.

This is something I would hope will all be sorted out by the beginning of next week. I really want to get save and print implemented quickly so I can start exploring with other things, such as replacing colors in the palette, or having the user be able to click on regions to color them in.

]]>
https://marie.knight.domains/blog_posts/updates-from-the-previous-week/feed/ 0
Spring Break Update https://marie.knight.domains/blog_posts/spring-break-update/ https://marie.knight.domains/blog_posts/spring-break-update/#respond Mon, 21 Mar 2022 16:25:35 +0000 https://marie.knight.domains/?p=132 I was able to take a break and relax over spring break, but I’m happy to say I also made some progress on my project. The first thing I tackled was the outline and the numbers in the regions of my photo. To do this, I went through a matrix that was generated by kMeans that held which palette color each pixel was closest to, and found where the pixels next to one another weren’t the same. This is where the on-line came from. For the numbers, I searched the best place within each colored region to put the number and held all those positions in an array. This is the end result of these two things:

With this taken care of, I gave myself a little time to play around with the HTML and fix some minor things. The page isn’t complete, but I think it looks much better than it did before:

]]>
https://marie.knight.domains/blog_posts/spring-break-update/feed/ 0
How things are going https://marie.knight.domains/blog_posts/how-things-are-going/ https://marie.knight.domains/blog_posts/how-things-are-going/#respond Sun, 06 Mar 2022 20:02:49 +0000 https://marie.knight.domains/?p=129 This week, I met with Dr. Pankratz and I got an idea on how to go about organizing the pixels in the image into groups based on the palette colors. I implemented this using KMeans, and I am now trying to create an out line using this information rather than my edge detection script. It makes me a little sad to not use the edge detection script, since I spent so much time on it, but I feel like this way will be simpler and in the end provide a better result.

Here is an article explaining KMeans and it’s implementation I found:

https://medium.com/geekculture/implementing-k-means-clustering-from-scratch-in-javascript-13d71fbcb31e

]]>
https://marie.knight.domains/blog_posts/how-things-are-going/feed/ 0
Brief Update https://marie.knight.domains/blog_posts/brief-update/ https://marie.knight.domains/blog_posts/brief-update/#respond Sun, 06 Mar 2022 19:58:21 +0000 https://marie.knight.domains/?p=127 (This post is from 2/27. I accidentally saved as a draft instead of posting)

Not much has changed visually in my project over the last week, but I have been working on the code. I recently was looking at similar projects online and seeing how they tried to incorporate their number of palette colors into their edge detection and tried to implement methods into my own project. Over the past week, I spent a lot of time debugging this code and working on it, and I was finally able to get it to run completely today.

The other project I’ve been looking at: https://github.com/daniel-munro/pbnify

]]>
https://marie.knight.domains/blog_posts/brief-update/feed/ 0
Just an update on where I’m at https://marie.knight.domains/blog_posts/just-an-update-on-where-im-at/ https://marie.knight.domains/blog_posts/just-an-update-on-where-im-at/#respond Tue, 22 Feb 2022 23:35:43 +0000 https://marie.knight.domains/?p=121 Lately, I’ve been working with a lot of code that I don’t completely understand, so I think I’m going to take a step back the next couple of days and go through it more slowly. I’m really thankful I started my project when I did, and have put so much time into it already because I feel like I can take this time to deepen my understanding without falling behind or panicking. There are also some small things I have to work on (resizing the uploaded image and moving the palette to somewhere on the screen where I like it, and changing the button colors so it is obvious which one is clicked) so if I’m feeling anxious about not seeing any immediate improvements as I’m going back over code, I can take some time to work on those things.

]]>
https://marie.knight.domains/blog_posts/just-an-update-on-where-im-at/feed/ 0
Palette and Levels https://marie.knight.domains/blog_posts/palette-and-levels/ https://marie.knight.domains/blog_posts/palette-and-levels/#respond Thu, 17 Feb 2022 19:36:09 +0000 https://marie.knight.domains/?p=116 Yesterday, I met with Dr. McVey and we solved some problems I was having with my palette and it now seems to be working! It’s not completely done, and there’s still some things I would like to change about it, but it feels good to see it working.

I think I’m at the point where I can move on to other things and come back later to make improvements. What I would eventually like to do is transfer the onclick listener that triggers the EyeDropper to these canvases, so if the user would like to repick a certain color, they can just click on it in the canvas and over write it. This has some difficulties that I haven’t fully thought out yet (I will need to know which canvas they’ve clicked on so it replaces the color in that one and doesn’t just fill a new canvas with color) but I’ll look into it more soon.

Today, input three buttons for easy, medium, and hard, and have them limiting the number of colors a user can choose for their picture. If a user tries to pick more than the level allows, an alert box informs them of the error.

]]>
https://marie.knight.domains/blog_posts/palette-and-levels/feed/ 0
Eye Dropper Success! https://marie.knight.domains/blog_posts/eye-dropper-success/ https://marie.knight.domains/blog_posts/eye-dropper-success/#respond Sat, 12 Feb 2022 00:58:19 +0000 https://marie.knight.domains/?p=108 It’s not completely done, but I was able to get an instance of the eye dropper working today. Now I just need to take the value the eye dropper grabs and put in in the canvases to display my palette colors!

This is the website I used to find code on how to implement the eye dropper: https://dev.to/madsstoumann/introducing-the-eyedropper-api-14d7

]]>
https://marie.knight.domains/blog_posts/eye-dropper-success/feed/ 0
A plan for the upcoming days (weeks?) https://marie.knight.domains/blog_posts/a-plan-for-the-upcoming-days-weeks/ https://marie.knight.domains/blog_posts/a-plan-for-the-upcoming-days-weeks/#respond Wed, 09 Feb 2022 16:51:06 +0000 https://marie.knight.domains/?p=101 I have a plan for the next couple of days that I want to record before I forget. First (hopefully today) I want to add another button to my home screen that launches a script that pastes my uploaded image to a canvas. Then, from here, I want to set up the palette and be able to choose colors directly from my image that I’ll be able to use to color the paint by number. Next, I want to work a little more on my edge detection and try to make it so the photo is less textured. I think this will be important for when I’m trying to put in numbers for paint colors.

I’m not sure how long this will take me, and after this, the really big parts of my project remaining are coloring the picture, having the option to save the picture, and making the website look nice.

]]>
https://marie.knight.domains/blog_posts/a-plan-for-the-upcoming-days-weeks/feed/ 0