Menu

OpenCV

Dominic Letourneau
Attachments
Canny.jpg (99694 bytes)
Contours.jpg (69227 bytes)
Dilatation.jpg (83806 bytes)
Erosion.jpg (85097 bytes)
FindRedColorHSV.jpg (93796 bytes)
FindRedColorRGB.jpg (84395 bytes)
Gradient.jpg (89972 bytes)
Gray.jpg (80891 bytes)
Line.jpg (32853 bytes)
Rectangle.jpg (35097 bytes)
Smooth.jpg (77128 bytes)
Sobel.jpg (98875 bytes)
Threshold.jpg (87607 bytes)

Description

The plugin OpenCV enable to manage image and video in Flowdesigner. You could perform different operations of treatment of images. After the installation, you could find a new menu in Flowdesigner called FDOpenCV where there is different sub menu.

Required softwares

  • Flowdesigner v0.9.1
  • OpenCV v1.0

Installation

You could download the OpenCV plugin with this command :

 svn co https://flowdesigner.svn.sourceforge.net/svnroot/flowdesigner/trunk/FDOpenCV FDOpenCV

Then, you could install it with this command :

./autogen.sh
make
make install

Image

This sub menu contains many function to manage an image.

CvLoadImage

This block loads an image from the specified file. It returns on output the image associate. The following file formats are supported:

  • Windows bitmaps - BMP, DIB
  • JPEG files - JPEG, JPG, JPE
  • Portable Network Graphics - PNG
  • Portable image format - PBM, PGM, PPM
  • Sun rasters - SR, RAS
  • TIFF files - TIFF, TIF

ISCOLOR: Specifies colorness of the loaded image:

  • if >0, the loaded image is forced to be color 3-channel image;
  • if 0, the loaded image is forced to be grayscale;
  • if <0, the loaded image will be loaded as is (with number of channels depends on the file).

CvSaveImage

This block saves the image in input, to the specified file. The image format is chosen depending on the filename extension, see CvLoadImage.

CvShowImage

This block display the image in input, in a window.

  • WNDOW_TITLE: Name of the widow. Don't forget to use different name to create new windows!
  • FLAGS: If it is set to 1, window size is automatically adjusted to fit the displayed image, while user can not change the window size manually.

CvCreateImage

Create a black image (all the pixel are initialized to 0) with specified:

  • Size: you could specified its width and height
  • Bit depth of image elements: can be one of:
    • IPL_DEPTH_8U - unsigned 8-bit integers
    • IPL_DEPTH_8S - signed 8-bit integers
    • IPL_DEPTH_16U - unsigned 16-bit integers
    • IPL_DEPTH_16S - signed 16-bit integers
    • IPL_DEPTH_32S - signed 32-bit integers
    • IPL_DEPTH_32F - single precision floating-point numbers
    • IPL_DEPTH_64F - double precision floating-point numbers
  • Channels: number of channels per element (pixel). Can be 1, 2, 3 or 4.

Draw

This sub menu contains many function to draw some figures on an image

CvLine

This block draws the line segment between two points in the image. For non-antialiased lines with integer coordinates the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering. LINE_TYPE :

  • 8 - 8-connected line.
  • 4 - 4-connected line.
  • CV_AA - antialiased line.

The color, in input, specified for the line is in RGB.

Example with a black image of size 400x400, line [(50,50);(350,350)] and LINE_TYPE=8 :

800px|

CvRectangle

This block draws simple, thick or filled rectangle two opposite corners.

  • THICKNESS: Thickness of lines that make up the rectangle. Negative values make the function to draw a filled rectangle.
  • LINE_TYPE: Type of the line, see CvLine description
  • SHIFT: Number of fractional bits in the point coordinates.

The color, in input, specified for the rectangle is in RGB.

Example where the small rectangle is filled and the big no :

800px|

Arithmetic, Logic and Comparison

This sub menu contains many function to perform some arithmetic, logic and comparison operation between some images.

CvAdd

This block adds one array to another one:

dst(I)=src1(I)+src2(I)

The images must have the same type and the same size.

CvComp

This block compares the corresponding elements of two images. Both image must have a single channel. The flag CMP_OP specifying the relation between the elements to be checked:

  • CV_CMP_EQ - src1(I) "equal to" src2(I)
  • CV_CMP_GT - src1(I) "greater than" src2(I)
  • CV_CMP_GE - src1(I) "greater or equal" src2(I)
  • CV_CMP_LT - src1(I) "less than" src2(I)
  • CV_CMP_LE - src1(I) "less or equal" src2(I)
  • CV_CMP_NE - src1(I) "not equal to" src2(I)

    dst(I)=src1(I) op src2(I),

where op is '=', '>', '>=', '


Related

FlowDesigner-Wiki: FlowDesigner_0.9.1
FlowDesigner-Wiki: Main_Page

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.