Guy on Simulink

Simulink & Model-Based Design

Blog Image Processing with Simulink

Seth: A change is coming. As you may have noticed, the title of this blog is no longer a perfectly accurate description of it's content. Sure, the topics discussed are still all related to Simulink and Model-Based Design, but who writes the blog? It is no longer just me. Along with the occasional guest post from various colleagues around MathWorks, Guy Rouleau is a major contributing author. So to reflect that, we are updating the blog name to Guy and Seth on Simulink. Of course, as soon as we update the name, I will also need a new picture.

The making of a new picture

Guy: This week I gave a try at preparing a new picture for the blog. Of course, I did that in Simulink. I am far from being an expert in image processing, but thanks to Simulink I could see my algorithm in beautiful block diagram format. Here is what I did.

The Original Image

To begin, Seth and I agreed on one image:

Original image

Cropping

In Simulink, I started with the Image From File block from the Computer Vision System Toolbox. Then I used the Selector block to crop the image, making it tighter around our face:

Cropping

Cropped image

Shrinking

Then we thought it might be good to be a little closer, so I accepted to loose some shoulder and shrinked the middle section of the image using the Resize block:

Resizing

Resized image

The Colors

Finally, we thought it would be good to to enhance our look. For that, I played with the colors. I processed the three layers of color (red, green and blue, RGB) one by one in a For Each Subsystem:

Color

satured color image

One last resizing to fit 140 pixels width of the blog right pane and we have a new image! If you are interested, you can find the model here.

Now it's your turn: Challenge

Seth: Can you make us look better? If you are interested to take on this challenge, start with one of the high resolution source images here and use any of the MATLAB products to produce a final image for the blog. Of course, bonus points for anyone who processes the images in Simulink and sends us the model. If you are proud of your code, and want to share it, post it on the File Exchange!

Submit your entry before June 1st by sending your work to this address (hint, copy and past this into the MATLAB prompt):

char(cumsum([115 -14 15 -12 -58 66 -1 1 -7 5 -11 ...
5 -7 11 -1 -43 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2]))

Guy and I will do the judging. Winners will get cool MATLAB Central swag!

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.