You are here: Start » Technical Issues » Libraries comparison
Libraries comparison
Introduction
The below table summarizes mutually corresponding functions between OpenCV, Halcon and FabImage Library (FIL). Feel free to use this table when porting your program from one library to another. Please note, however, that in most cases the corresponding functions may not give the same results as their implementations are different in details. Quite often also the range of parameters exposed to the user will be different.
Most important general differences are:
- OpenCV does not have any data type for regions, so binary images must be used instead. Halcon has regions with unspecified implementation and which do not have specific outer dimensions. At the same time FabImage Studio provides Region data type which is always RLE-encoded and has specific dimensions (width and height) in the same way as images have. Thus you can consider regions to be more efficiently encoded binary images.
- The representation of multi-channel images is very similar in OpenCV and in FabImage Studio. It is so called interleaved representation, while Halcon focuses on planar images (each channel is represented in a separate memory fragment).
- The three libraries perform spatial image filters differently in areas close to the image borders. In OpenCV one can choose between different methods of extrapolating boundary pixels. Halcon always the boundary pixel is considered repeated beyond the image range. In FabImage Studio, spatial filters are performed by considering only the pixels that are in the image range.
Image Acquisition
FIL provides dedicated support for GenICam and GigE Vision industrial standards, as well as for specific camera brands - using SDK from their manufacturers. See also See also Camera Support.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
VideoCapture::open | grab_image_start | GenTL_StartAcquisition GigEVision_StartAcquisition | Genicam Genicam | |
VideoCapture::release | close_framegrabber | GenTL_StopAcquisition GigEVision_StopAcquisition | Genicam Genicam | |
VideoCapture::grab | grab_image | GenTL_ReceiveImage GigEVision_ReceiveImage | Genicam Genicam | |
– | grab_image_async | GenTL_TryReceiveImage GigEVision_TryReceiveImage | Genicam Genicam |
Image Processing (Part I)
Here is a list of fundamental image transformations available in almost any library.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
imread | read_image | LoadImage | FoundationLite | |
imwrite | write_image | SaveImage | FoundationLite | |
– | gen_image3 | MakeImage | FoundationLite | |
– | gen_image1_extern | MakeImage | FoundationLite | |
– | get_grayval | GetImagePixel | FoundationLite | |
addWeighted | add_image | AddImages | FoundationLite | |
subtract | sub_image | SubtractImages | FoundationLite | |
bitwise_and | paint_gray | ComposeImages | FoundationLite | |
absdiff | abs_diff_image | DifferenceImage | FoundationLite | |
divide | div_image | DivideImages | FoundationLite | |
multiply | mult_image | MultiplyImages | FoundationLite | |
add | scale_image | AddToImage | FoundationLite | |
convertScaleAbs | scale_image | RescalePixels | FoundationLite | |
cvSubRS | invert_image | NegateImage | FoundationLite | |
convertScaleAbs | scale_image | MultiplyImage | FoundationLite | |
max | max_image | MaximumImage | FoundationLite | |
min | min_image | MinimumImage | FoundationLite | |
resize, pyrDown | zoom_image_size | ResizeImage DownsampleImage | FoundationLite FoundationBasic | |
resize | zoom_image_factor | ResizeImage_Relative | FoundationLite | |
warpAffine | rotate_image | RotateImage | FoundationLite | |
warpAffine | affine_trans_image | TranslateImage ShearImage | FoundationLite FoundationLite | |
– | – | TranslatePixels | FoundationLite | |
– | – | TransposeImage | FoundationLite | |
– | crop_rectangle1 | CropImage CropImageToRectangle | FoundationLite FoundationLite | |
flip, transpose | mirror_image | MirrorImage TransposeImage | FoundationLite FoundationLite | |
– | compose3 | MergeChannels | FoundationLite | |
– | rgb1_to_gray | AverageChannels_Weighted | FoundationLite | |
– | rgb3_to_gray | AverageChannels_Weighted | FoundationLite | |
– | decompose3 | SplitChannels | FoundationLite | |
– | access_channel | SplitChannels | FoundationLite | |
cvtColor | trans_from_rgb | RgbToHsv HsvToRgb | FoundationLite FoundationLite | See also many other functions in Image Color Spaces |
– | add_noise_white | AddNoiseToImage | FoundationLite | |
calcHist | gray_histo | ImageHistogram | FoundationBasic | |
– | draw_point | DrawPoint | FoundationLite | |
rectangle | draw_rectangle1_mod | DrawRectangle | FoundationLite | |
circle | draw_circle_mod | DrawCircle | FoundationLite | |
– | paint_region | DrawRegions_MultiColor | FoundationLite | |
– | set_draw | DrawRegion | FoundationLite | |
– | – | JoinImages | FoundationLite | |
– | gen_gauss_pyramid | CreateImagePyramid_Gauss | FoundationBasic | |
– | – | ColorDistanceImage | FoundationPro | |
– | binocular_disparity, binocular_distance | CompareImages ImageCorrelation ImageCorrelationImage | FoundationPro FoundationPro FoundationPro | |
– | – | ExpaintImage_Bornemann ExpaintImage_Telea | FoundationPro FoundationPro |
Image Processing (Part II)
More advanced image processing tools, including spatial filtering and transformations.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
cvSmooth | mean_image | SmoothImage_Mean | FoundationLite | |
cvSmooth | gauss_image | SmoothImage_Gauss | FoundationLite | |
– | gen_gauss_filter | SmoothImage_Gauss_Mask | FoundationLite | |
– | smooth_image | SmoothImage_Deriche SmoothImage_Gauss SmoothImage_Gauss_Mask | FoundationLite FoundationLite FoundationLite | |
cvSmooth | median_image | SmoothImage_Median SmoothImage_Median_Mask | FoundationLite FoundationLite | |
– | midrange_image | SmoothImage_Middle | FoundationLite | |
– | rank_image | SmoothImage_Quantile | FoundationLite | |
– | bilateral_filter | SmoothImage_Bilateral | FoundationPro | |
dilate | gray_dilation | DilateImage | FoundationLite | |
erode | gray_erosion | ErodeImage | FoundationLite | |
close | gray_closing_shape | CloseImage | FoundationLite | |
open | gray_opening_shape | OpenImage | FoundationLite | |
filter2D | convol_image | ConvolveImage | FoundationLite | |
– | derivate_gauss | GradientImage | FoundationLite | |
sobel | sobel_amp | GradientImage_Mask | FoundationLite | |
sobel | sobel_dir | GradientImage_Mask | FoundationLite | |
– | prewitt_amp | GradientImage_Mask | FoundationLite | |
– | prewitt_dir | GradientImage_Mask | FoundationLite | |
– | diff_of_gauss | DifferenceOfGaussians | FoundationBasic | |
– | emphasize | SharpenImage | FoundationLite | |
– | illuminate | NormalizeLocalContrast | FoundationBasic | |
inpaint | inpainting_texture | InpaintImage | FoundationPro | |
– | inpainting_ct | InpaintImage_Bornemann InpaintImage_Telea | FoundationPro FoundationPro | |
threshold | – | ThresholdImage | FoundationLite | |
– | threshold | ThresholdToRegion | FoundationBasic | |
– | hysteresis_threshold | ThresholdImage_Hysteresis | FoundationBasic | |
– | dyn_threshold | ThresholdImage_Dynamic | FoundationLite | |
– | histo_to_thresh | SelectThresholdValue | FoundationBasic | |
watershed | watersheds_threshold | SegmentImage_Watersheds | FoundationBasic | |
normalize | equ_histo_image | EqualizeImageHistogram | FoundationLite | |
LineIterator | – | ImageAlongPath ImageAlongArc | FoundationPro FoundationBasic | |
– | measure_projection | ImageProfileAlongPath | FoundationPro | |
– | tile_images | CutImageIntoTiles | FoundationBasic | |
minMaxLoc | – | ImageMaximum | FoundationLite | |
– | local_max | ImageLocalMaxima | FoundationLite | |
warpAffine | affine_trans_image | CreateAffineTransformMatrix TransformImage | FoundationBasic FoundationLite | |
– | vector_angle_to_rigid | CreateCoordinateSystemFromVector CreateCoordinateSystemFromSegment | FoundationLite FoundationLite | |
– | affine_trans_point_2d | AlignPoint TranslatePoint | FoundationLite FoundationLite | |
– | hom_mat2d_identity | CreateIdentityMatrix | FoundationLite | |
– | hom_mat2d_rotate | CreateAffineTransformMatrix | FoundationBasic | |
– | hom_mat2d_translate | CreateAffineTransformMatrix | FoundationBasic | |
– | affine_trans_pixel | TransformImage | FoundationLite | |
linearPolar | polar_trans_image_ext | ImagePolarTransform | FoundationBasic | |
linearPolar | polar_trans_image_inv | ImageInversePolarTransform | FoundationBasic | |
– | projective_trans_image | TransformImage | FoundationLite | |
LUT | lut_trans | LUTTransformImage | FoundationLite | |
– | fill_interlace | LerpImages | FoundationLite | |
meanStdDev | deviation_image | ImageStandardDeviation | FoundationBasic | |
dft | fft_image | FourierTransform | FoundationPro | |
dft | fft_generic | FourierTransform | FoundationPro | |
– | convol_fft | FourierTransform ConvolveImage | FoundationPro FoundationLite | |
– | gen_highpass | FrequencyDomain_FilterFrequencies | FoundationPro | |
– | gen_lowpass | FrequencyDomain_FilterFrequencies | FoundationPro |
Region Analysis
In the OpenCV context, regions may be represented as binary image masks, but there are no true RLE-encoded regions. See also Region.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
– | gen_circle | CreateCircleRegion | FoundationLite | |
– | – | CreateCrossRegion | FoundationLite | |
– | – | CreateBoxBorderRegion | FoundationLite | |
– | gen_ellipse | CreateEllipseRegion | FoundationLite | |
– | gen_grid_region | CreateGridRegion | FoundationLite | |
– | gen_rectangle2 | CreateBoxRegion | FoundationLite | |
– | gen_region_line | CreateLineRegion | FoundationLite | |
– | gen_region_polygon_filled | CreatePolygonRegion | FoundationLite | |
– | gen_rectangle1 | CreateRectangleRegion | FoundationLite | |
– | gen_region_contour_xld | CreatePathRegion CreatePathBorderRegion | FoundationLite FoundationLite | |
– | – | CreateRectangleBorderRegion | FoundationLite | |
– | – | CreateRingRegion | FoundationLite | |
– | gen_region_line | CreateSegmentRegion | FoundationLite | |
– | difference | RegionDifference | FoundationLite | |
– | intersection | RegionIntersection | FoundationLite | |
– | union2 | RegionUnion | FoundationLite | |
– | symm_difference | RegionSymmetricDifference | FoundationLite | |
– | complement | RegionComplement | FoundationLite | |
– | mirror_region | MirrorRegion ReflectRegion | FoundationBasic FoundationBasic | |
– | transpose_region | TransposeRegion | FoundationBasic | |
– | dilation_rectangle1 | DilateRegion | FoundationBasic | |
– | dilation_circle | DilateRegion | FoundationBasic | |
dilate | dilation1 | DilateRegion_AnyKernel | FoundationBasic | |
dilate | dilation2 | DilateRegion_AnyKernel | FoundationBasic | |
– | erosion_rectangle1 | ErodeRegion | FoundationBasic | |
– | erosion_circle | ErodeRegion | FoundationBasic | |
erode | erosion1 | ErodeRegion_AnyKernel | FoundationBasic | |
erode | erosion2 | ErodeRegion_AnyKernel | FoundationBasic | |
– | – | ErodeRegion_Threshold | FoundationBasic | |
– | closing | CloseRegion_AnyKernel | FoundationBasic | |
– | closing_circle | CloseRegion | FoundationBasic | |
– | closing_rectangle1 | CloseRegion | FoundationBasic | |
– | opening | OpenRegion_AnyKernel | FoundationBasic | |
– | opening_rectangle1 | OpenRegion | FoundationBasic | |
– | opening_circle | OpenRegion | FoundationBasic | |
– | expand_gray | ExpandRegions | FoundationBasic | |
– | – | ThresholdSmoothedRegion_Mean | FoundationBasic | |
– | – | DemarcateRegions | FoundationBasic | |
findContours | morph_skeleton | SkeletonizeRegion | FoundationBasic | |
– | thickening | ThickenRegion | FoundationBasic | |
– | thinning | ThinRegion | FoundationBasic | |
– | pruning | PruneRegion | FoundationBasic | |
– | get_region_contour | RegionContours | FoundationBasic | |
– | fill_up | FillRegionHoles | FoundationBasic | |
– | expand_region | ExpandRegions | FoundationBasic | |
– | move_region | TranslateRegion | FoundationLite | |
– | affine_trans_region | ShearRegion | FoundationBasic | |
– | test_equal_region | TestRegionEqualTo | FoundationBasic | |
– | test_region_point | TestPointInRegion TestPointArrayInRegion | FoundationLite FoundationBasic | |
– | test_subset_region | TestRegionInRegion | FoundationBasic | |
– | – | TestRegionIntersectsWith | FoundationBasic | |
– | – | TestRegionOnBorder | FoundationLite | |
– | select_shape | VerifyRegion | FoundationLite | |
– | select_shape | ClassifyRegions | FoundationBasic | |
– | – | InscribeRegionInRegion | FoundationBasic | |
– | select_shape | GetMaximumRegion GetMaximumRegion_OrNil | FoundationBasic FoundationBasic | |
– | select_shape | GetMinimumRegion GetMinimumRegion_OrNil | FoundationBasic FoundationBasic | |
– | – | GroupPathsByRegions GroupPointsByRegions GroupRegionsByRegions | FoundationBasic FoundationBasic FoundationBasic | |
– | clip_region | TrimRegionToRectangle CropRegion CropRegionToRectangle CropRegionToQuadrangle | FoundationPro FoundationLite FoundationLite FoundationPro | |
– | – | TrimRegionToPolygon | FoundationPro | |
– | zoom_region | ResizeRegion ResizeRegion_Relative DownsampleRegion ShrinkRegionNTimes EnlargeRegionNTimes | FoundationBasic FoundationBasic FoundationBasic FoundationBasic FoundationBasic | |
– | – | AlignRegion | FoundationBasic | |
– | affine_trans_region | RotateRegion | FoundationBasic | |
– | – | UncropRegion | FoundationLite | |
– | gen_region_points | LocationsToRegion | FoundationLite | |
– | get_region_points | RegionToLocations | FoundationLite | |
– | – | RegionCharacteristicPoint | FoundationLite | |
contourArea | area_center | RegionArea RegionMassCenter | FoundationLite FoundationLite | Utility function: area. |
– | area_holes | RegionHoles | FoundationBasic | |
– | circularity | RegionCircularity | FoundationBasic | |
– | convexity | RegionConvexity | FoundationBasic | |
– | diameter_region | RegionDiameter RegionCaliperDiameter | FoundationBasic FoundationBasic | |
– | elliptic_axis | RegionEllipticAxes | FoundationBasic | |
– | orientation_region | RegionOrientation | FoundationBasic | |
moments | region_features | RegionMoment | FoundationBasic | |
– | rectangularity | RegionRectangularity | FoundationBasic | |
– | – | RegionElongation | FoundationBasic | |
– | connect_and_holes | RegionNumberOfHoles | FoundationBasic | |
– | – | RegionMedialAxis | FoundationBasic | |
– | get_region_runs | RegionPerimeterLength | FoundationBasic | |
– | – | RegionProjection | FoundationBasic | |
– | – | RegionHoles_Elastic | FoundationBasic | |
– | connection | SplitRegionIntoBlobs | FoundationBasic | |
– | – | SplitRegionIntoComponents SplitRegionIntoExactlyNComponents | FoundationBasic FoundationBasic | |
– | hit_or_miss | RegionHitAndMissTransform | FoundationBasic | |
– | – | DemarcateRegions | FoundationBasic | |
– | convexity | RegionConvexHull | FoundationBasic | |
– | smallest_rectangle1 | RegionBoundingRectangle | FoundationBasic | |
– | – | RegionBoundingBox | FoundationLite | |
– | smallest_circle | RegionBoundingCircle | FoundationBasic | |
– | – | RegionBoundingParallelogram | FoundationPro | |
– | boundary | RegionBoundaries RegionOuterBoundaries | FoundationBasic FoundationBasic | |
– | inner_circle | RegionInscribedCircle | FoundationBasic | |
– | – | RegionInscribedBox | FoundationBasic | |
– | – | RegionInteriors | FoundationBasic | |
– | – | RemoveBordersFromRegion | FoundationBasic | |
– | – | RemoveRegionBlobs | FoundationBasic | |
– | – | ExtractBlobs_Color ExtractBlobs_Dynamic ExtractBlobs_Intensity | FoundationBasic FoundationBasic FoundationBasic | |
– | select_shape | SelectRegions | FoundationBasic | |
– | sort_region | SortRegions | FoundationBasic | |
– | read_region | LoadRegion | FoundationLite | |
– | write_region | SaveRegion | FoundationLite |
Geometry 2D
Geometrical algorithms are essential in processing results in most computer vision applications. For the full list see Geometry 2D – FIL provides a comprehensive geometry library with many more functions than presented below. FIL also provides simple utility functions described in comments.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
– | angle_ll | AngleBetweenLines AngleBetweenSegments | FoundationLite FoundationLite | Utility functions: angleTurn, angleDiff. |
– | distance_cc_min | PathToPathDistance | FoundationPro | Utility function: distance. |
– | distance_cc | PathToPathDistance PathToPathMaximumDistance | FoundationPro FoundationPro | Utility function: distance. |
– | distance_lc | PathToLineDistance PathToLineDistanceProfile | FoundationBasic FoundationBasic | |
– | distance_lr | RegionContours PathToPathDistance | FoundationBasic FoundationPro | |
– | distance_pc | PathToPointDistance PathToPointDistanceProfile | FoundationBasic FoundationBasic | Utility function: distance. |
– | distance_pl | PointToLineDistance PointToLineDistance_Oriented | FoundationLite FoundationLite | |
– | distance_contours_xld | PathToPathDistanceProfile | FoundationPro | |
– | distance_pp | PointToPointDistance | FoundationLite | Utility function: distance. |
– | distance_pr | PathToPointDistanceProfile RegionContours | FoundationBasic FoundationBasic | |
– | distance_ps | PointToSegmentDistance | FoundationLite | |
– | distance_ss | SegmentToSegmentDistance | FoundationLite | |
– | distance_rr_min | RegionToRegionDistance | FoundationBasic | |
– | intersection_circles | CircleCircleIntersection | FoundationLite | |
– | intersection_line_circle | LineCircleIntersection | FoundationLite | |
– | intersection_contours_xld | PathPathIntersections | FoundationPro | |
– | intersection_line_contour_xld | PathLineIntersections PathSegmentIntersections | FoundationPro FoundationPro | |
– | intersection_lines | LineLineIntersection | FoundationLite | Utility function: intersection. |
– | intersection_segment_line | LineSegmentIntersection | FoundationLite | Utility function: intersection. |
– | intersection_ll | LineLineIntersection SegmentSegmentIntersection | FoundationLite FoundationLite | Utility function: intersection. |
– | intersection_segments | SegmentSegmentIntersection | FoundationLite | Utility function: intersection. |
– | projection_pl | ProjectPointOnLine | FoundationLite | Utility function: project. |
– | line_orientation | LineOrientation SegmentOrientation | FoundationLite FoundationLite | Utility property: Line2D.Orientation. |
– | line_position | SegmentOrientation | FoundationLite | Utility property: Line2D.Orientation. |
convexHull | shape_trans | PointsConvexHull | FoundationLite | |
contourArea | area_center_xld | PolygonArea | FoundationBasic | |
– | draw_nurbs | CreateBicircularCurve DrawPath | FoundationBasic FoundationLite | |
– | smallest_rectangle2 | PathBoundingBox | FoundationLite | |
– | area_center_xld | PathMassCenter | FoundationLite | |
– | length_xld | PathLength | FoundationLite | |
– | circularity_xld | PolygonCircularity | FoundationBasic | |
– | orientation_xld | PolygonOrientation | FoundationBasic | |
– | union_collinear_contours_xld | JoinAdjacentPaths | FoundationPro | |
– | area_center_xld | PolygonMassCenter | FoundationBasic | |
– | – | PolygonRectangularity | FoundationBasic | |
– | circularity_xld | PolygonConvexity | FoundationBasic | |
– | elliptic_axis_xld | PolygonEllipticAxes | FoundationBasic | |
– | – | PolygonElongation | FoundationBasic | |
– | smallest_circle_xld | PolygonInscribedCircle | FoundationBasic | |
– | moments_xld | PolygonMoment | FoundationBasic | |
– | moments_xld | PolygonMoment | FoundationBasic | |
– | test_xld_point | TestPointArrayInPolygon TestPointInPolygon | FoundationBasic FoundationLite | |
– | – | TestPolygonConvex | FoundationBasic | |
– | – | TestPolygonInPolygon | FoundationBasic | |
– | – | PolygonWithNormalizedOrientation | FoundationBasic | |
– | – | FindClosestPoints | FoundationLite |
Path
Here is a list of fundamental paths transformations available in almost any library. For the full list see Path.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
– | close_contours_xld | ClosePath | FoundationLite | |
– | – | AlignPath AlignPathArray | FoundationLite FoundationLite | |
– | – | FitPathToPath | FoundationPro | |
– | affine_trans_contour_xld | InflatePath | FoundationPro | |
– | affine_trans_contour_xld | PathAlongArc PathAlongPath | FoundationBasic FoundationPro | |
– | affine_trans_contour_xld | RotatePath RotatePathArray | FoundationLite FoundationLite | |
– | affine_trans_contour_xld | ReversePath | FoundationLite | |
– | affine_trans_contour_xld | RescalePath RescalePathArray | FoundationLite FoundationLite | |
– | affine_trans_contour_xld | ShiftPath | FoundationBasic | |
– | affine_trans_contour_xld | TranslatePath TranslatePathArray | FoundationLite FoundationLite | |
– | affine_trans_contour_xld | TransposePath | FoundationLite | |
– | – | PathProjectionProfile | FoundationPro | |
– | – | ConvertToEquidistantPath | FoundationBasic | |
– | – | ExtendPath | FoundationBasic | |
– | – | FindLongestSubpath | FoundationPro | |
– | – | FindLongestSubpath | FoundationPro | |
– | – | ReducePath | FoundationBasic | |
– | – | RemovePathSelfIntersections | FoundationPro | |
– | get_lines_xld | SegmentPath | FoundationPro | |
– | get_contour_xld | PathArrayPoints | FoundationLite | |
– | get_contour_angle_xld | PathAverageTurnAngle | FoundationPro | |
– | smallest_rectangle1_xld | PathBoundingBox PathBoundingRectangle | FoundationLite FoundationBasic | |
– | smallest_circle_xld | PathBoundingCircle | FoundationBasic | |
– | – | PathBoundingParallelogram | FoundationPro | |
– | get_contour_attrib_xld | PathCaliperDiameter | FoundationBasic | |
– | diameter_xld | PathDiameter | FoundationLite | |
– | get_lines_xld | PathSegments | FoundationLite | |
convexHull | – | PathConvexHull | FoundationBasic | |
– | – | PathEndpoints | FoundationLite | |
– | test_self_intersection_xld | PathSelfIntersections | FoundationPro | |
– | test_self_intersection_xld | PathSelfIntersections | FoundationPro | |
– | max_parallels_xld | ConcatenatePaths | FoundationLite | |
– | – | SplitPathByLine SplitPathByPath SplitPathBySegment | FoundationBasic FoundationPro FoundationBasic | |
– | smooth_contours_xld | SmoothPath_Gauss SmoothPath_Mean | FoundationPro FoundationPro | |
– | sort_contours_xld | SortPaths | FoundationBasic | |
– | select_contours_xld | SelectClosedPaths SelectOpenPaths SelectInnerPaths SelectOuterPaths | FoundationBasic FoundationBasic FoundationPro FoundationPro | |
– | select_shape_xld | ClassifyPaths GetMaximumPath GetMinimumPath | FoundationBasic FoundationBasic FoundationBasic |
Computer Vision
This section contains higher-level vision tools.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
– | measure_pos | ScanSingleEdge ScanMultipleEdges ScanExactlyNEdges | MetrologyBasic MetrologyBasic MetrologyBasic | See also ScanSingleRidge |
– | measure_pairs | ScanSingleStripe ScanMultipleStripes ScanExactlyNStripes | MetrologyBasic MetrologyBasic MetrologyBasic | |
– | measure_thresh | ScanSingleEdge ScanMultipleEdges ScanExactlyNEdges | MetrologyBasic MetrologyBasic MetrologyBasic | See also ScanSingleRidge |
– | edges_sub_pix | DetectEdges DetectEdges_AsPaths | FoundationLite FoundationBasic | |
– | edges_color_sub_pix | DetectEdges DetectEdges_AsPaths | FoundationLite FoundationBasic | |
– | find_data_code_2d | ReadSingleDataMatrixCode ReadSingleQRCode | Datacodes Datacodes | See also Datacodes |
– | find_bar_code | ReadSingleBarcode | Barcodes | See also: Barcodes |
– | detect_edge_segments | FitSegmentToEdges | MetrologyPro | |
– | fit_line_contour_xld | FitSegmentToPoints | FoundationBasic | |
– | fit_circle_contour_xld | FitCircleToPoints | FoundationBasic | |
– | – | FitPathToRidges | MetrologyPro | |
– | – | FitPathToStripe | MetrologyPro | |
– | – | FitPathToEdges | MetrologyPro | |
– | fit_circle_contour_xld | FitCircleToRidges | MetrologyPro | |
– | fit_circle_contour_xld | FitCircleToEdges | MetrologyPro | |
– | – | FitCircleToStripe | MetrologyPro | |
– | – | FitLineToPoints_LTE FitLineToPoints_M FitLineToPoints_RANSAC FitLineToPoints_TheilSen | FoundationBasic FoundationBasic FoundationBasic FoundationBasic | |
– | – | FitSegmentToPoints FitSegmentToPoints_LTE FitSegmentToPoints_RANSAC FitSegmentToPoints_TheilSen | FoundationBasic FoundationBasic FoundationBasic FoundationBasic | |
matchTemplate | find_ncc_model | LocateSingleObject_NCC LocateMultipleObjects_NCC | MatchingBasic MatchingBasic | |
– | gen_measure_rectangle2 | CreateScanMap | MetrologyBasic | |
– | find_shape_model | LocateSingleObject_Edges1 LocateMultipleObjects_Edges1 | MatchingPro MatchingPro | |
– | create_shape_model | CreateEdgeModel1 | MatchingPro | |
– | write_shape_model | SaveEdgeModel | MatchingPro | |
– | read_shape_model | LoadEdgeModel | MatchingPro | |
– | segment_image_mser | FindMaxStableExtremalRegions | FoundationPro | |
– | auto_threshold | SegmentImage_Color | FoundationPro | |
– | detect_edge_segments | SegmentImage_Edges | FoundationPro | |
– | local_threshold | SegmentImage_Gray | FoundationPro | Methods are very different. |
– | – | SegmentImage_Gray_Linear SegmentImage_Gray_Tiled | FoundationPro FoundationPro | |
– | corner_response | DetectCorners_CornerResponse | FoundationBasic | |
– | – | DetectCorners_Foerstner | FoundationBasic | |
preCornerDetect | points_foerstner | DetectCorners_Foerstner | FoundationBasic | |
– | photometric_stereo | PhotometricStereo_Perform PhotometricStereo_ComputeHeightMap PhotometricStereo_SurfaceCurvature | Photometric Photometric Photometric | |
HoughLines2 | hough_lines | DetectLines | FoundationBasic | |
– | – | DetectLinePeak DetectLinePeak_Gauss | FoundationPro FoundationPro | |
HoughCircles | hough_circles | DetectSingleCircle DetectMultipleCircles | FoundationBasic FoundationBasic | |
– | – | DetectPaths | FoundationBasic | |
– | texture_laws | LawsFilter | FoundationBasic | |
– | – | LinearBinaryPattern | FoundationBasic | |
– | – | LocateSinglePointPattern | FoundationPro | |
– | texture_laws | LawsFilter | FoundationBasic | |
– | trainf_ocr_class_svm | TrainOcr_SVM | OCR | |
– | trainf_ocr_class_mlp | TrainOcr_MLP | OCR | |
– | do_ocr_multi | ReadText | OCR |
Camera Calibration
The three products have quite different approach to calibration functions. OpenCV provides basic distortion correction based on (x, y) transformation maps. Commercial libraries provide highly optimized remapping based on precomputed data, but also focus on coordinate space transformations and image stitching functionalities. For details see Camera Calibration and World Coordinates.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
calibrateCamera | camera_calibration | CalibrateCamera_Pinhole CalibrateCamera_Telecentric | Calibration Calibration | All function could use different methods. |
– | find_caltab | DetectCalibrationGrid_Circles | Calibration | |
– | find_marks_and_pose | GenerateCalibrationPoints | Calibration | |
– | set_origin_pose | ShiftWorldPlane | Calibration | |
– | gen_image_to_world_plane_map | CreateRectificationMap_Advanced | Calibration | |
remap | map_image | RectifyImage | Calibration | OpenCV needs operation to extract final transformation matrix. |
Machine Learning
Fundamental machine learning algorithms include K Nearest Neighbors, Support Vector Machines, Multi-Layer Perceptron and Principal Component Analysis. In the below table we provide just basic algorithms as a starting point for finding what you need.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
CvKNearest::find_nearest | classify_image_class_knn | KNN_Classify | FoundationPro | |
CvSVM::predict | classify_image_class_svm | SVM_ClassifySingle SVM_ClassifyMultiple | FoundationPro FoundationPro | |
CvANN_MLP::predict | classify_image_class_mlp | MLP_Respond | FoundationPro | |
– | gen_principal_comp_trans | ApplyPCATransform ReversePCATransform | FoundationPro FoundationPro | |
– | – | LinearRegression LinearRegression_LTE LinearRegression_M LinearRegression_RANSAC LinearRegression_TheilSen | FoundationBasic FoundationPro FoundationPro FoundationPro FoundationBasic | |
– | – | QuadraticRegression QuadraticRegression_M QuadraticRegression_RANSAC | FoundationBasic FoundationPro FoundationPro | |
– | – | ClusterData_KMeans | FoundationPro | |
– | – | ClusterPoints2D ClusterPoints2D_SingleLink | FoundationPro FoundationPro |
Communication
The below table contains only basic functions. Please refer to detailed documentation for more details.
OpenCV | Halcon | FIL | Module | Comment |
---|---|---|---|---|
– | open_serial | SerialPort_Config | FoundationLite | |
– | read_serial | SerialPort_ReadBuffer | FoundationLite | |
– | write_serial | SerialPort_WriteBuffer | FoundationLite | |
– | open_socket_accept | TcpIp_Accept | FoundationLite | |
– | open_socket_connect | TcpIp_Connect | FoundationLite | |
– | close_socket | TcpIp_Close | FoundationLite | |
– | receive_data | TcpIp_ReadBuffer | FoundationLite | |
– | send_data | TcpIp_WriteBuffer | FoundationLite | |
– | – | Ftp_ReceiveFile | FoundationBasic | |
– | – | Ftp_ReceiveImage | FoundationBasic | |
– | – | Ftp_SendFile | FoundationBasic | |
– | – | Ftp_SendImage | FoundationBasic | |
– | – | Http_SendRequest_GET | FoundationBasic | |
– | – | Http_SendRequest_POST | FoundationBasic | |
– | – | Http_DecodeURL | FoundationBasic | |
– | – | Http_EncodeURL | FoundationBasic |
Previous: Optimizing Image Analysis for Speed | Next: Deep Learning Training API |