RTMaps Support

Image processing

POP'ART - Image processing algorithm

 

Duration : 10 min

Download the pdf.

If you do not have a webcam, download and use the 30’ webcam database (zip).

 

img1

 

OBJECTIVES

  • Manipulate RTMaps Studio
  • Use image-processing algorithms

 

KEYWORDS

  • RTMaps Studio
  • Algorithms
  • Image Processign
  • Open CV

 

USED COMPONENTS

  • Webcam
  • Viewers
  • Negative
  • Gradients and Edges
  • Threshold
  • Morphology

 

PREREQUISITE

You should have done the “RTMaps Magical Tour” tutorial to know how to launch RTMaps Studio and connect elementary components.

 

 

INSTALL RTMAPS SOFTWARE

If you own any RTMaps Software license, you can download a demo version (30 days) or ask us for a demo version cd. Launch the standard setup procedure and follow the steps. By default, RTMaps is installed in the ProgramFiles\Intempora\RTMaps3.4 folder. Once the installation has successfully completed, you can just launch the RTMaps Studio, either via the desktop icon, or via the start menu off windows ( all programs > Intempora > RTMaps 3.4 > RTMaps Studio).

 

img2

NB. The downloadable version is for windows only. Note that RTMaps is also available under Linux.

 

GET THE IMAGE

If you have a webcam

You will use a webcam as an image sensor. Register the rtmaps_webcam.pck package. A new section in the “component list” window appears with the webcam package. Place a webcam component in your empty diagram. Edit its properties (double click or right click > properties) and choose a RGB Video Format. Most of the components you will try in this tutorial use the RGB format (you will find more explanations about the video format in Red Blobs Detection Tutorial).

 

If you don’t have a webcam

If you do not have a webcam, download and use the 30’ webcam database. Place a player on your empty diagram. Edit its properties (double click or right click > properties), and browse for the “.rec” file in the zip file you have have downloaded (only one output displayed by a green square is associated to the database). Until the end of this tutorial, we will use a webcam as the video source but you can practice and follow this tutorial with the player component and its associated database.

 

img3

 

 

Note : Registering a package allows you to use additional components contained in separated files. After registration, such components become available in the component list and can be used in your diagrams. In the RTMaps Studio toolbar, click on the register package button ( ), or via the menu “Actions > register/unregister package”, then “add…”. Browse for the package file called rtmaps_audio.pck located in …/Intempora/RTMaps3.4/packages. The extension associated to a package is .pck. When registering, a new section appears in the component list with the name of the package.

 

HOW TO CONNECT AND USE VISION ALGORITHMS

Image viewer

Place an image viewer on the diagram and connect the webcam component output to the image viewer input. Run the diagram to check if everything is ok with the video flow. Shutdown and save your diagram. A “.rtd” file is created.

 

Note : Running a diagram is starting the execution of all the components you have placed in your diagram. You just have to click on the button located in the toolbar. You can also use the the menu Action > run. To stop the execution, use the shutdown button in the toolbar or use the menu Actions > Shutdown.

 

The negative component : a simple algorithm

Register the rtmaps_image_processing_miscellaneous.pck package. In the image_processing_miscellaneous section from the component list window, you will find the negative component. Place it on your diagram. Place an image viewer. Connect your webcam component to the negative component and then, the output of the negative component to the image viewer. Run the diagram. The image appears in negative (an image viewer can be hidden by another). Shutdown the diagram.

img44

 

 

Finding gradients and edges in an image

Register the openCV package. Browse for the file called rtmaps_image_processing_open_cv.pck (located in …/Intempora/RTMaps 3.4/packages). The gradients and edges searches for important luminosity variations by comparing every pixel to its neighbors. If luminosity is really different, we can suppose it belongs to an object edge.
Open the rtmaps_ image_processing_openCV.pck section located in the component list and drag&drop a “gradients and edges component” to your diagram. Parametrize it choosing canny in the Type properties, then press the apply button (or enter key).
Connect the gradients and edges image output to a new ImageViewer and run the diagram to see the results. Reorganize the different viewers as you need and check the results. Shutdown the diagram

 

img55

 

Note : Open Computer Vision Library openCV is a well-known open-source image processing library written in C and compatible with Intel® sofware. Detailed information about it can be found on the dedicated section of its official website. The RTMaps_image_processing_openCV.pck package contains RTMaps components that encapsulate some of the main image processing functions from the openCV library.

 

 

THRESHOLD AND MORPHOLOGY

In the same component list (image processing openCV), find and drag on the diagram a Threshold component and a Morphology component. Connect the video from your webcam to the Threshold and then to the Morphology. Use another Image Viewer to see the results. You can test with just one of the component or using the Morphology component before Threshold. You can try to parameterize those components differently. Connect a new image viewer and run the diagram. It’s pop’art in your webcam!

 

 

img66

 

Shutdown the diagram.