Hello everyone, this is the blog in continuation to the musical picasso project. As discussed in the previous blog. I am looking forward to get a single software program that can perform the GUI and image processing stuff altogether with the lights control.

After researching for some time I came across a lot of options to make the GUI for the project:-

1. GUIZERO

I started with this and the package was literally easy to use, however there were not much that can be done on the customization side of the project and using GUIZERO so I stopped the development on the same

 

2. PyQt5

Currently I am using and exploring my ways on this. It has been a fine journey till now and I have learnt and made a bit of progress as well.

 

Next is installing OpenCV for all the image capture and processing related tasks to be performed. Well getting started was not a big of the task however and I found some examples which were relative to what I wanted. I got started and it has been again a good learning curve for the whole thing.

 

Here is what I would be doing:-

1. Making a splashscreen using the PyQt5

2. Initializing the slideshow of the pictures available

3. Show the menu once the key is pressed

4. Capture image using the cam

5. Apply face detection

6. Apply magic wand to cut the face out of the background

7. Use existing image and the captured image and blend them together

 

While making the software side ready for the same I came across a steep learning curve for GUI development, though the image processing using OpenCV was a bit simpler one. Perhaps my approach towards GUI had been wrong in that sense. (I am open to any suggestions as to what to do and how to do).

 

  

 

In the above list of functionalities that are to be designed including the GUI and OpenCV for phase 1, I have been able to only do the splashscreen followed by the slideshow. Note that I have been parellelly working on the image capture and processing part as well that I will discuss later in this blog. Below are the snippets of the splashscreen and the same of a portion of code that deals with slideshow and splashscreen.

I am maintaining a Git Repo if anybody is interested in the same. However currently things are a bit messy in the repo but code snippets work perfectly fine.

 

GitHub Repo for musical picasso :- https://github.com/shwetankv1996/musical_picasso 

 

 

 

{gallery} Musical Picasso Splash Screen

 

Though it had been a difficult learning for me about the GUI design, the project has been moving at a slow pace. I am fully trying to windup the project as soon as possible so as to meet the deadlines and everything. Next step would be to design the welcome screen display followed by a main menu screen where user can select the feature as per required.

Going forward I can add a lot of possible features but for now I would be trying to first hook up everything and finish the first version of the build.

 

OpenCV

OpenCV has been a great tool used by engineers and hobbyists worldwide to make huge developments on computer vision. The package is interesting more due to the huge support on the community as well. I have been doing a bit of work on OpenCV in my past however it was just for a few weeks and then I got into ROS. So the main features of OpenCV that I would be using in this particular project are:-

1. Image Capture

2. Face Detect

3. Image extraction from background

4. Image processing such as blending/ morphing/ multiple shot multiple exposure

 

For those who don't know about multiple shot, it is a photography technique which is used to capture images of the same person with same background at different positions and then post processing these images. Below image would be able to articulate easily about the same.

 

So again I started from the top of Todo list and moving further down. The image capture was a piece of cake and luckily I found HAAR filters built in the OpenCV packages. The HAAR filter helped to detect the face and it is fairly accurate I have to say, though there are some glitches which we can ignore right now. Then I was able to find a grabcut sample available in OpenCV itself which can be used to extract the image from backround just like the magic wand tool in photoshop.

So what I did was I assigned the grabcut function a face detected contour to extract the left over image in order to use it for further processing.

 

Combining all the things and making the changes as per required by using some function calls here and there and I was able to run the sequence of capturing the image and extracting the face right away.

 

Now we just need to blend/ morph the extracted face over the existing one. This is the tricky part since the coordinates need to be matched and then proper scaling needs to be done. However this part is still under development I am working on getting it ready for atleast one demonstration. Once this is fixed we would be ready to use the features.

 

 

{gallery} My Gallery Title

Joker Love.....!!!

 

 

Final words for this blog would be to hope that I get enough time for working on the project because I really want to finish this build as I am able to learn a lot of new things in the phase of development. And it would be cool to have a gadget like this.

The above images are not much I know, but these are just to show about the current status of the software side of the project. I would be hopefully working on the case design this weekend in order to atleast get done with one thing. Would be sharing more updates soon.

 

Blog 3 :- Workflow & Things to accomplish

 

Blog 2:- Materials and unboxing

 

Blog 1: - Musical Pi-casso

 

PiCasso Design Challenge Design Challenges Raspberry Pi