Home

ActivBlobFinder User`s Manual

image

Contents

1. Blob Type Blob Shape ThresholdMethod GlobalFixed x M28 Threshold Threshold f hae Gray j Typical Size H ho Pixels r Edit Region of Interest mj m m mj m m 7 Copy Paste Delete Delete All r Select ActivVisionT ool ANTBlobFinderl m Region of Interest Rectanglel 1 1 4 p M3 Locked draw the ROI in the image by pressing 1 select AVTBlobFinder1 the left mouse button and moving the mouse in the combo box edit the ROI by dragging the pick points 2 select a shape for the ROI you can copy paste and delete the selected ROI or delete all ROIs e step through the ROIs of the selected tool 7 lock the selected ROI with these buttons LL Q fea 2 2 5 amp Figure 2 1 Creating region of interest 5 To create second repeat step 2 You can also copy paste and delete the selected ROI or delete all ROIs 6 ROIs can be selected by clicking next to it in the image Alternatively use the two arrow buttons 4 k to step through all the ROIs of the selected tool 7 By checking v Locked you can lock the selected ROI and thus prevent it from acci dental editing Note that AVTBlobFinder also allows to use arbitrary regions as ROIs These ROIs however can only be set via the programming interface of ActivVisionTools
2. An example can be found in the Advanced User s Guide for Activ VisionTools section 3 4 1 2 on page 72 ActivVisionTools 3 2 Your Fast Track to Solutions 12 Using ActivBlobFinder Visual Basic Example 2 2 Inspecting the Image Using C and To get optimal extraction results you should describe the blobs you want to extract as closely as possible In this section we show how to obtain this information by inspecting the image using the inspection tools ActivZoom and ActivLineProfile In the following sections these techniques will then be used to help you extract the blobs you look for Preparation for the following example If you worked on the previous example you may continue using this project At design time add AVTZoom and AVTLineProfile by double clicking Q and fy Otherwise open the project inspectingYblob inspecting vbp Execute the application Run gt Start or via the corresponding button Open AVT ViewFG by clicking into AVIView with the right mouse button and selecting Im age Acquisition in the popup menu Select the image misc pills_01 in the combo box Input File The following steps are visualized in figure 2 2 Q o In the combo box Scaling of AVTZoom you can select the zooming scale When the mouse pointer is inside the displayed image the surrounding part of the image is zoomed and displayed in AVTZoom Furthermore the
3. Global Fixed Threshold Ji m x Blob Type Blob Shape Threshold Method Threshold Center Row Center Column Height Width I Ellipse Rectangle Ellipse v Major Rectangle Extent Ellipse v Minor Rectangle Extent 7 Select KctivisionTool AVTFeatureCalc ROI m Shape Features 0 464 000 23 000 1 352 000 22 000 120 000 2288 Convexity T Contour Length 3 421 000 44 000 25 000 11 217 IT Anisometry IT Area Convex 3 456 000 22 000 21 000 B 5 3 4 478 000 22 000 22 000 Bios Number of Holes Radius Inner Circle IV Enable Update ra re 2 lt 3 select AVTFeatureCalc1 in the combo box 4 select the ROls you are interested in Figure 3 1 Calculating and displaying blob features ActivVisionTools 3 2 Your Fast Track to Solutions 28 Combining ActivBlobFinder with other ActivVisionTools Visual Basic Example 3 2 Evaluating Results Using In the former examples you have employed ActivVisionTools to extract and display blobs and additional features Using ActivDecision you can evaluate these results by formulating condi tions the results have to meet in order to be okay For a detailed description of ActivDecision please consult the User s Manual for ActivDecision We continue with th
4. Global Fixed gt 128 Threshold Threshold 4 Gray x Typical Size 4 y fi 0 Pixels j r Edit Region of Interest vol 2 m 2 m lt r Select ActivVisionT ool ANT LineProfile1 E Region of Interest Line 1 171 S gt Locked r Die Profile 192 ll Ly i 128 T o oe gt E 64 Scaling 400 Gray 38 0 27 55 82 110 137 165 182 E Row 129 Pixel r Gray Values d rra Pixel Row Col 22 118 Gray Value pas Average 137 187 Min Bray fi Deviation 100 359 Max Gray 55 lt V select the zooming scale 5 the vertical line in the profile marks the position of the cursor whose position and gray value is displayed e when the mouse is inside the display the zoomed image part is displayed 6 move the cursor by dragging the line together with gray value and position 9 Figure 2 2 Inspecting the image ActivVisionTools 3 2 Your Fast Track to Solutions 14 Using ActivBlobFinder Visual Basic Example 2 3 Extracting Blobs Using 55 The following sections explain the different methods ActivBlobFinder offers to extract blobs 2 3 1 Extracting Blobs Using Fixed Thresholding As described in chapter on page 1 the simplest and fastest way to extract blobs is to classify pixels as belonging to a blob or to the background by comparing their gray value to a fixed global threshold This method is well suited e g to the bla
5. Visual Basic projects the task is to inspect chips and check the presence of certain elements 31 Analyzing Blobs eee nn 26 3 2 Evaluating Results seess eses ease eneret nn 28 33 Output of Results lt sss cet r YEE SS 30 25 bS xe S Q m gt 4 26 Combining ActivBlobFinder with other ActivVisionTools 3 1 Analyzing Blobs Using zi The previous chapter showed how to extract blobs In fact this is all you can do with ActivBlob Finder To analyze the extracted blobs you need another ActivVisionTool ActivFeatureCalc With this tool you can select various features to be calculated for each blob please refer to the User s Manual for ActivFeatureCalc for detailed information These numeric results can then be further evaluated using ActivDecision as will be described in the following section The task is to extract and analyze the four black squares at the corners of the chip Visual Basic Preparation for the following example Example We recommend to open the project analyzingNblob analyzing vbp as it is al ready setup suitably to extract the squares Execute the application Run gt Start or via the corresponding button Open AVT ViewFG by clicking into AVIView with the right mouse button and selecting Im age Acquisition Load the image chipNchip 02 There is one thing to note on AVTFeatureCalc the master
6. box all Activ VisionTools are listed that have been placed upon the form By default the tools are referenced by the name of the corresponding ActiveX control plus a counter to distin guish between multiple instances of a control on the form In our example there is only one item in the combo box AVTBlobFindert Next select the desired shape of the ROI for example a rectangle To draw the ROI move the mouse in the image while keeping the left mouse button pressed Please experiment at this point with the different shapes The creation of a polygonal ROI lt is more complex By the first mouse movement the first side of the polygon is created You can add a new corner point by clicking on the line with the left mouse button when you drag it by keeping the mouse button pressed new polygon sides are created where you can again add new corner points To delete a corner point drag it onto a neighboring corner point You can now move the ROI by dragging its pick point in the middle By dragging the outer pick points you modify its shape Again please experiment to get familiar with the ROIs Note that for a polygonal ROI the middle point appears at the center of gravity of the ROI and therefore changes whenever the polygon is modified besides it may even lie outside the ROI for concave polygons ActivBlobFinder 2008 04 23 2 1 Specifying Regions of Interest 11 Creating Regions of Interest ni xi
7. continue using this project Otherwise open the project display blob_display vbp and execute it Run gt Start or via the corresponding button Load the image sequence chipNchipi seq and create additional ROIs AVTView FG and AVTViewROI can be opened at run time via a right mouse button click on AVTView The following steps are visualized in figure 4 1 Experiment by choosing different settings for the display parameters and watching the result 9 9 Open AVTViewDisplayModes by clicking on AVTView with the right mouse button selecting Display Modes in the popup menu Change the color of the selected pick point Select another pick point by clicking into its vicinity Change the color of the currently selected ROI Select another ROI by clicking into its vicinity Change the color of the other not selected ROIs of the currently selected tool Change the color of the ROIs of the other not selected tools Select another tool in the combo box ActivVisionTool of AVTViewROI if this box contains more than one item If you use ActivDecision to evaluate results it can mark ROIs evaluated as not okay in a special color Change the LUT look up table that is used to display the image Change the line width or the ROIs or of the blob margin see below Change the color of the blobs in the text box Group I Change the color ActivDecision uses to mark objects evaluated as not okay C
8. darker lighter than the background in our example select Dark Furthermore specify their shape in the combo box Blob Shape in the example Characters Now create a line shaped ROI for AVTLineProfile and place it vertically over a char acter Inspect the gray value profile and determine the local contrast of the characters by moving the cursor over it and measuring the difference of gray values between back ground and character see figure 2 5 Enter this value in the text box beside the slider Contrast 4 Similarly determine the height of a character see figure 2 5 and enter a slightly larger value in the text box beside the slider Typical Height Experiment with different values using the sliders and watch the effect The local thresholding extracts all parts in the ROI which show a local contrast larger than the value you specified The value you specified for the typical height influences the maximum size of the extracted blobs From larger blobs only the border is extracted If you want to extract blobs that are approximately line shaped i e have an almost constant ActivBlobFinder 2008 04 23 2 3 Extracting Blobs 19 1 select the extraction method _ 2 specify the blob type and its shape ia Extracting Blobs Using a Local Threshold Blob Type pk He Blob Shape Threshold Method Local Neighborhood jag Threshold Contrast Gey Typical H
9. gray value at the current position marked with a red box in the zoomed image is displayed in the text box Gray Value The position itself is shown in the text boxes Row and Column To inspect a gray value profile you create the line or arc of inspection using AVTView ROI First select AVTLineProfile1 in the combo box ActivVisionTool Then select a shape and draw the ROI in the image as described in the previous section The gray value profile along that line is displayed automatically Note that in a rectangular ROI the pixel values are averaged perpendicular to the main axis of the rectangle Experiment with different ROIs and watch the resulting gray value profiles For an easier inspection ActivLineProfile provides a cursor which can be moved along the line The position of this cursor is marked by a vertical line in AVTLineProfile and on the corresponding ROI in the image The position itself is displayed in the text box Row Co1 the gray value in the text box Gray Value You can move the cursor by dragging the line with the left mouse button ActivBlobFinder 2008 04 23 2 2 Inspecting the Image 13 3 select AVTLineProfile1 in the combo box 4 select a shape for the ROI and draw it in the image Inspecting the Image Using ActivZoom and ActivLineProfile ni xj Blob Type Dark Blob Shape Any Threshold Method
10. the combo box Blob Shape of AVTBlobFinder Vary offset and ROI and watch what happens ActivVisionTools 3 2 Your Fast Track to Solutions 18 Using ActivBlobFinder 2 3 3 Extracting Blobs Using a Local Threshold Both extraction methods described in the previous sections will fail when pixels cannot be clas sified by their gray value alone This is the case e g when the gray value of the background changes over the image because of a unregular illumination Such a situation is depicted in figure 2 5 see the gray value profile corresponding to the horizontal line However if the blobs differ locally from the background like the characters in the example they still can be extracted using the local thresholding method ulna Preparation for the following example Example If you worked on the previous example you may continue using this project Otherwise open the project extract_local blob_extract_local vbp and exe cute it Run gt Start or via the corresponding button Open AVTViewFG by clicking into AVTView with the right mouse button and selecting Image Acquisition in the popup menu Load the image miscNcharacters 02 If necessary place an ROI over the lower line of characters The following steps are visualized in figure 2 5 T Select Local Neighborhood in the combo box Threshold Method 2 In combo box Blob select whether blobs to be extracted are
11. the left mouse button Otherwise open the project usermodes blob_usermodes vbp Execute the application and load the image sequence chip chip1 seq The following steps are visualized in figure 4 2 not shown AVTBlobFinder D Open AVTViewExecute and AVTViewConfigExec by clicking on AVTView with the right mouse button and selecting Execution and Execution Parameters 2 Switch between the two execution modes via AVTViewExecute s combo box Mode 3 To execute one cycle press Single With the other two buttons you can let the appli cation run continuously and stop it again By default AVTViewExecuteSimple starts and stops an application how to change its behavior to a single step button is described in the User s Manual for Activ View section 3 4 on page 34 4 For each of the two execution modes you can choose what is to be displayed by checking the corresponding boxes in AVTViewConfigExec Furthermore you can specify if images can be dragged to the image window and whether ROIs can be modified in the two modes by default this is disabled in the application mode to prevent you from accidentially moving or deleting an ROI 5 In AVTViewStatus an icon indicates the current execution mode of the application ActivBlobFinder 2008 04 23 4 2 Configuring the Two Execution Modes 37 1 open the sub tools via the context menu of AVTView 2 switch between the two modes 3 execute a
12. to gray values well over 200 4 Now experiment with different thresholds by using the slider Threshold or by specify ing a value in the text field beside it In figure 2 3 the threshold is too low therefore the pill boundaries are not extracted ActivBlobFinder 2008 04 23 2 3 Extracting Blobs 15 1 select the extraction method 2 specify the blob type 3 get a suitable threshold from the line profile 4 set the threshold text box or slider Extracting Blobs Using a Fixed Global Threshold m ni xj Blob Type Dark x al Blob Shape Any y Threshold Method Global Fixed 40 Threshold Threshold 4 40 Typical Size 4 10 Pixels m Line Profile 255 r Gray Values Row Col 35 117 Gray Value Average fi 34 603 Min Gray 5 Deviation 96 905 Gray 255 Blob Type Inside Range Blob Shape FT Threshold Global Fixed Min Max 79 Threshold E T Threshold Wi cy E Threshold Max 1 145 Gray 5 use two thresholds to extract the boundaries lt Figure 2 3 Using a fixed global threshold To get a first taste of the automatic thresholding described in the following chapter select Global Auto in the combo box Threshold Method The computed threshold is displayed in the text box Threshold beside the combo box If you se
13. tool of ActivFeatureCalc This ActiveX control does not have a graphical user interface thus it is represented by its icon at design time and invisible at run time If you forget to add it to the form and only add the support tools they are disabled and do not calculate any features The following steps are visualized in figure 3 1 D While experimenting with parameters for the blob extraction itself it is useful to switch off the update of results in AVTDataView via the corresponding check box to speed up the processing 2 You can select features to be calculated by checking their box 3 To view the results calculated by ActivFeatureCalc in ActivDataView you first have to tell ActivDataView whose results to display by selecting the corresponding tool name in the combo box ActivVisionTool If there is only one tool as in our example it is selected automatically 4 Automatically a list of the ROIs of AVTFeatureCalc1 appears below Select the ROIs whose results you want to examine by checking their box Their results are then dis played in a table the columns corresponding to the selected features As you can see the dark blob in the middle of the chip can be distinguished clearly from the four squares ActivBlobFinder 2008 04 23 3 1 Analyzing Blobs 27 0 switch off updating 2 select features to be calculated while experimenting with parameters Analyzing Blobs Using ActivFeatureCalc
14. 23 2 4 Processing Extracted Blobs 21 1 combine extracted blobs into single one 2 specify an minimum and maximum size 3 inspect pixel values measure lengths sizes by counting pixels ojx im Processing Extracted Blobs Scaling 400 7 Gray Value ias 122 Pixel Column 293 Pixel E Fill Gaps Blob Dark z i a Fill Holes lt 0 Blob Shape Threshold Method Local Neighborhood 190 hreshold Fill Indentation 4 o Contrast so Gray in Size Blobs F Typical Size 1 so Pixels 5 default value 6 filling gaps gap width ca 6 pixels gt set parameter to 7 Figure 2 6 Processing blobs We continue with the example on the next double page ActivVisionTools 3 2 Your Fast Track to Solutions iL re co 2 lt 22 Using ActivBlobFinder Processing Extracted Blobs continued The following steps are visualized in figure 2 7 To close holes measure their size area and enter a slightly larger value in the text box beside the slider Fill Holes Using the slider Eliminate Bulge you can remove bulges from the contour The value specified for this parameter corresponds to the width of a bulge Note that large values can ha
15. User s Manual Acri SLOBFINDER You Name It We Find It Microsoft Windows Windows NT Windows 2000 Windows XP Visual Basic Microsoft NET Visual C Visual C and ActiveX are either trademarks or registered trademarks of Microsoft Corporation All other nationally and internationally recognized trademarks and tradenames are hereby rec ognized EC Copyright 2000 2008 by MVTec Software GmbH M nchen Germany mvrec software GmbH Edition 1 November 2000 ActivVisionTools 1 0 Edition 2 Februar 2001 ActivVisionTools 1 2 Edition 3 April 2001 ActivVisionTools 1 3 Edition 4 September 2001 ActivVisionTools 2 0 Edition 5 November 2002 ActivVisionTools 2 1 Edition 6 January 2005 ActivVisionTools 3 0 Edition 7 February 2006 ActivVisionTools 3 1 Edition 8 May 2008 ActivVisionTools 3 2 All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise without prior written permission of the publisher More information about ActivVisionTools can be found at http www activ vision tools com How to Read This Manual This manual explains how to use ActivBlobFinder to extract the blobs objects you look for from images It describes the functionality of ActivBlobFinder and its cooperation with other ActivVisionTools with Visual Basic examples Before reading this manual we recomm
16. able Update IV Fit Cell Size IV Substitute Default Unit Pixel baer eee m x AVTFeatueCalc RO Object Min Max Interpretation Operation Rectanglel 1 AVTFeatureCalcl Objects ROI 4 10000 Number Min Good Objects ROI 4 4 Number B Bad Objects ROI 0 0 Number None Major Extent 20 000 25 000 Number Inside Minor Extent 18 000 23 000 Number Inside Rectanglel 1 Major Extent Default Default Default Default Minor Extent Default Default Default Default IV Fit Cell Size TT Substitute Default Unit Pixel 6 check this box to show the used parameters 5 specify default conditions Figure 3 2 Formulating conditions to evaluate results squares are missing 5 In the example application all squares should meet the same condition Instead of spec ifying the same conditions for each object you can specify default conditions using AVTDecisionViewDefaults Defaults can be set per tool or per ROI ROI defaults override tool defaults and individual conditions override defaults 6 If you v Substitute Default the entries marked Default are substituted by their actual content ra re 2 lt ActivVisionTools 3 2 Your Fast Track to Solutions 30 Combining ActivBlobFinder with other ActivVisionTools Visual Basic Example 3 3 Output of Results Using Using ActivFile you can write the res
17. ated Figure 3 2 shows suitable conditions for the example task Those features which meet their condition appear in green the others in red If at least one feature is not okay the whole object ROI or tool is evaluated as not okay as well Analogously the overall evaluation of application which is visualized by AVT Decision depends on the tool evaluations Step through the image sequence and examine the evaluations In some of the images an additional blob is extracted which does not meet the condition in other images the ActivBlobFinder 2008 04 23 3 2 Evaluating Results 29 open the support tools via the 3 formulate conditions for objects ROIs context menu right mouse click or tools 2 first enable the update of results 4 the evaluations are displayed immediately i Evaluationg Results Using ActivDecision Of x Se vDe m x Passeo Ci AV TFeatureCalcl boo RO Object Name Operation Tool Features AVTFeatureCalc1 Objects Tool Number None B Rectangle1_1 Good Objects Tool Number None Features Bad Objects Tool Number None Good ROls Number None poe Bad ROls Number Max Object 2 Objects RO Number gt Min Good Objects ROI 4 Number Object 3 Bad Objects ROI Number None Object 4 i Major Extent 23 000 20 000 25 000 Number Inside inor Extent 22 000 18 000 23 000 Number Inside IV En
18. bs gt osa on ee ee 5 te ee ee ee es 14 2 3 1 Extracting Blobs Using Fixed Thresholding 14 2 3 2 Extracting Blobs Using Automatic Thresholding 16 2 3 3 Extracting Blobs Using a Local Threshold 18 Processing Extracted 5 20 bS xe S Q m gt 4 10 Using ActivBlobFinder Visual Basic Example 2 1 Specifying Regions of Interest Using 5 ActivBlobFinder lets you choose between different shapes of ROIs e g arbitrarily oriented rectangles or ellipses You create an ROI using AVIViewROI which is a support tool of Ac tiv View Preparation for the following example Open the project roisYblob rois vbp Alternatively create a new project and place the following tools on the form in parentheses the icon you have to double click with the left mouse button AVTView _ AVTViewROI ftri and AVT BlobFinder 25 Execution the application Run gt Start or via the corresponding button Open AVTViewFG by clicking into AVTView with the right mouse button and selecting Im age Acquisition in the popup menu Select the image misc pills_01 in the combo box Input File The following steps are visualized in figure 2 1 First you have to tell AVTViewROI to create an ROI for ActivBlobFinder by selecting the corresponding entry in the combo box ActivVisionTool In this
19. c 7 iL 2 m 2 lt Se Object Id Area Center Center Column Width Major Extent Minor Extent Compactness Contour Length o 411 000 37 954 533 384 38 000 paca 000 38 348 24582 9 448 220 894 1379 000 94 784 404 008 148 000 17 000 48 526 10165 2398 118 497 383000 116847 409165 48 000 18000 48 677 10174 2768 116 912 385 000 138306 415813 48000 17 000 49 587 10027 3123 122912 403 000 148 203 215045 45 000 20 000 46 977 10577 2558 113 841 1388 000 160791 422219 148 000 18 000 48 827 110 148 12 831 1117 497 413 000 170283 220620 48 000 20 000 49587 10 439 2751 113497 427 495 48 000 18 nnn 49 203 2701 116 ActivFeatureCalc Unit Pixel Acti ActivDataView Figure 1 3 The sub tools of ActivBlobFinder together with suitable other tools ActivVisionTools 3 2 Your Fast Track to Solutions 8 About ActivBlobFinder ActivBlobFinder 2008 04 23 Chapter 2 Using ActivBlobFinder This chapter will explain how to use ActivBlobFinder to extract different types of blobs and to further process the blobs Furthermore it shows how to use the inspection tools ActivZoom and ActivLineProfile to determine suitable parameters for the extraction and the processing of blobs 2 1 2 2 2 3 2 4 Specifying Regions of Interest 10 Inspecting the Image eee ee ee ee ee ee ee es 12 Extracting Blo
20. ck and white images that stem from setups with a so called rear illumination In such a setup objects are placed on a transparent surface between light source and camera in the resulting image the objects correspond to dark blobs on a light background see e g figure 2 3 ActivBlobFinder also allows to use two thresholds Preparation for the following example If you worked on the previous example you may continue using this project At design time remove AVTZoom and AVIViewROI Otherwise open the project extract_fixed blob_extract_fixed vbp Execute the application and load the image misc pills_01 If necessary create some ROIs AVTViewROI can be opened via the right mouse button menu of AVT View The following steps are visualized in figure 2 3 T Select Global Fixed in the combo box Threshold Method 2 In combo box Blob select whether blobs to be extracted are darker lighter than the background in our example select Dark 5 default value for threshold is suited to this image the blobs corresponding to the pills in the image are already extracted without any action on your part To take a closer look at what s happening create a line shaped ROI for AVTLineProfile as described in the previous chapter and place it over some of the pills As you can see now the blobs have a gray value of about 30 40 while the background corresponds
21. ction methods co optimized for different blob shapes and background How to use AVTBlobFinder is described in more detail in section 2 3 on page 14 aos AVTBlobFinderProcess is a support tool of ActivBlobFinder It allows to further process ER extracted blobs e g fill holes How to use AVTBlobFinderProcess is described in section 2 4 on page 20 ActivBlobFinder 2008 04 23 1 2 The Sub Tools of ActivBlobFinder ActivView The Sub Tools of ActivBlobFinder oo C2 AVTBlobFinder m Basic Features IV Area IV Center Row IV Center Column IV Height IV Width Orientation 360 IT Ellipse Rectangle r Extent Major Radius Ellipse V Major Rectangle Extent Minor Radius Ellipse IV Minor Rectangle Extent OF AVTBlobFinderProcess Blob Light x Blob Shape Any Threshold Method Local Neighborhood po Threshold Contrast 3 m Mil Typical Size aff faa Pixels xti Fill Gaps Fill Holes Eliminate Bulge Fill Indentation Min Size Blobs Max Size Blobs NL 5 el dP ip 3l ifr xl Combine to Single Region Shape Features IV Compactness Convexity Anisometry Bulkiness Number of Holes Circularity IV Contour Length Area Convex Radius Outer Circle Radius Inner Circle Select ActivVisionT ool AVTFeatureCal
22. e 1 1 b because there will not be a second dominating gray value Therefore there exists a second variant of this method which is optimized for extracting characters This method only determines the dominating gray value corresponding to the background relative to this gray value you can then specify the actual threshold Local Thresholding Global thresholding is a very fast method however it will fail when pixels cannot be classified by their gray value alone like for example in figure 1 1 c Here the gray value of characters to be extracted indicated by the vertical line in the gray value ActivBlobFinder 2008 04 23 1 1 Introducing ActivBlobFinder original image gray value profile along line 255 m 192 128 64 0 255 192 128 64 0 LL Ke 9 a gt 255 x Figure 1 1 When to use which thresholding method a global threshold b automatic thresh old for characters c local threshold profile lies in between values corresponding to different parts of the background Thus it is impossible to find a suitable global threshold in this case However the characters differ locally from the background To extract such blobs ActivBlobFinder therefore provides a method that ActivVisionTools 3 2 Your Fast Track to Solutions 4 About ActivBlobFinder uses a local threshold corresponding to the difference in gray values between a blob and its local background togethe
23. e example task of checking chips for the presence of the four black squares To be accepted as a square the major extent of a blob has to lie between 20 and 25 the minor extent between 18 and 23 Preparation for the following example If you worked on the previous example you may continue using this project At design time add AVTDecision to the form by double clicking EH with the left mouse button You may delete AVTDataView and AVTFeatureCalcBasic they can be opened via the right mouse button of AVTBlobFinder Otherwise open the project decisionsYblob decisions vbp Execute the application and load the image sequence chip chip1 seq The following steps are visualized in figure 3 2 not shown AVIView and AVTBlobFinder The main functionality of ActivDecision is presented by its support tools which can be opened via clicking on AVTDecision with the right mouse button The master tool displays the overall evaluation of the application To view the current feature and evaluation results check v Enable Update in AVT DecisionViewResults ActivDecision lets you compare the value of an individual object ROI or tool feature with two boundary values a minimum and a maximum value You can formulate con ditions for features by specifying values in the columns Min and Max and selecting a comparison mode in the column Operation If you select None the feature is not evalu
24. e following with an image sequence containing two images of a bar code under different illumination Basic Preparation for the following example Example If you worked on the previous example you may continue using this project Otherwise open the project extract_auto blob_extract_auto vbp and execute it Run gt Start or via the corresponding button Open AVTViewFG by clicking into AVTView with the right mouse button and se lecting Image Acquisition in the popup menu Select the image sequence bar code barcode2 seq in the combo box Input File If necessary create an ROI and place it over the bar code The following steps are visualized in figure 2 4 Select Global Auto in the combo box Threshold Method 2 In combo box Blob select whether blobs to be extracted are darker lighter than the background in our example select Dark 3 Automatically a suitable threshold is computed and displayed in the text box Thresh old If AVTBlobFinder failed to determine a threshold the value defaults to 128 and is marked in red Experiment by modifying the ROI 4 You can modify the threshold by specifying an offset with the slider Offset or by specifying a value in the text box beside it Note that the offset is valid for all ROIs whereas AVTBlobFinder computes a suit able threshold for each ROI separately The text box Threshold displays the actual thr
25. eCalc1 E AVTFeatureCalc1 Tool ROI Object Name okay Value Min Max Interpretation peration El Rectangle 1 AVTFeatureCalc1 Objects ool LE E O 0 ip ni Good Object Good Dbi amp cts Tool m Li LI Hm Bad Objects BadObject Tool D L D i Good ROIs Li i Li Bad ROIs Fk M L M v Rectangle 1 Objects ROI M wv o Good Objects ROI NY Bad Objects I 1 el Good Objects Major Extent Li iL Minor Extent M Bad Objects Major Extent v Vv mi Vv e Ip Minor Extent Ww a y 2 7 navigate through the results select the output data Figure 3 3 Customizing log files In the right part of D ialogOutputDataSelect choose the output data by checking the corresponding boxes You may output different items depending on the evaluation of an object By clicking on the column labels with the right mouse button you can check or uncheck all boxes in the column similarly you can check or uncheck whole rows or all rows of a certain tool If you now step through the image sequence by clicking Single in AVIViewFG the log file is created Figure 3 4 shows part of an example log file ActivVisionTools 3 2 Your Fast Track to Solutions 32 Combining ActivBlobFinder with other ActivVisionTools 09 12 04 18 57 58 AVTFeatureCalci yes Bad ROIs yes 0 O Max Rectanglel 1 yes Objec
26. eight 2 Pies contrast Gray Value f 32 Min Gray po Max Gray 77 3 inspect the line profile to get the 4 measure the typical height and local contrast of your blobs enter a slightly larger value 192 128 Figure 2 5 Using local threshold iL re co 2 lt width select Lines in the combo box Blob Shape and enter a value slightly larger than their width in the text box beside the slider now labelled Typical Width If the blobs do not resemble lines or characters select Any and specify their maximum extent ActivVisionTools 3 2 Your Fast Track to Solutions 20 Using ActivBlobFinder Visual Basic Example 2 4 Processing Extracted Blobs Using T Using AVTBlobFinderProcess you can process the extracted blobs further e g fill up holes or smooth their contour Suitable parameters can again be determined using an inspection tool in this case ActivZoom Preparation for the following example If you worked on the previous example you may continue using this project At design time delete AVTLineProfile and add AVTBlobFinderProcess and AVT Zoom by double clicking 98 and Q Otherwise open the project processing blob_processing vbp Execute the application Run gt Start or via the corresponding button Open AVT ViewFG by clicking into AVIView with the right mouse button a
27. end to read the manual Getting Started with Activ VisionTools which introduces the basic concepts of ActivVisionTools and the User s Manual for ActivView to learn how to load and display images To follow the examples actively first install and configure ActivVisionTools as described in the manual Getting Started with Activ VisionTools For each example in this manual there is a corresponding Visual Basic project these projects can be found in the subdirectory exam ples manuals activblobfinder of the ActivVisionTools base directory you selected dur ing the installation default C Program Files MVTec ActivVisionTools Of course you can also create your own Visual Basic projects from scratch We recommend to create a private copy of the example projects because by experimenting with the projects you also change their state which is then automatically stored in the so called description files extension dsc by ActivVisionTools Of course you can restore the state of a project by retrieving the corresponding description file from the CD About ActivBlobFinder 1 1 Introducing ActivBlobFinder 12 The Sub Tools of ActivBlobFinder Using ActivBlobFinder 2 1 Specifying Regions of Interest 2 2 Inspechng the Image oO 2 3 Extracting Blobs 2 624528 4 om s 2 4 Processing Extracted Blobs Combining ActivBlobFinder with other ActivVisionTool
28. eshold i e computed threshold plus offset for the active ROI ActivBlobFinder 2008 04 23 2 3 Extracting Blobs 17 2 specify the blob type Extracting Blobs Using the Automatic Global Threshold loj x D select the extraction method Blob Shape Threshold Method Offset ARE Pikes Typical Size r Line Profile 255 192 128 64 0 0 72 108 145 181 217 Gray Values 1 Row Cal 306 295 Gray Value 62 Average 151 323 Min Gray Bi Deviation 96 488 Max Gray 55 2 adapt the threshold by specifying an offset 3 the threshold is computed automatically Figure 2 4 Using automatic thresholding Now step through the image sequence by clicking Single in AVTViewFG The threshold will be adapted automatically For a closer look at what s happening create a line shaped ROI for AVTLineProfile and inspect the gray value profile LL Q fea 2 2 lt As described in chapter 1 on page 1 a slightly different method is used when characters are to be extracted It only determines the dominating gray value corresponding to the background leaving it to you to determine a suitable offset To experiment with this method select the image misc characters_01 in the combo box Input File and place an ROI over some of the characters Then select Characters in
29. fer from the background Nev ertheless all the methods described in the following have something in common They are based upon specifying a so called threshold pixels on one side of the threshold are classified as belonging to the background on the other side they belong to a blob Global Thresholding The simplest method is to classify pixels according to their gray value In the example depicted in figure 1 1 a blobs correspond to the dark parts low gray values on a light background high gray values In such a case you can easily choose a threshold so that all pixels belonging to blobs lie below this threshold This method can be called global thresholding as one threshold is applied globally i e for all pixels Global thresholding can also be applied using two thresholds extracting either the gray values inside or outside the thresholds as the objects Automatic Thresholding If the gray values corresponding to the blobs or the background vary from image to image it may be impossible to find one threshold suitable for all images For such cases ActivBlobFinder provides a method that automatically determines a suitable threshold for each image The underlying assumption is that two gray values dominate in the image the gray value of the background and that of the blobs The threshold is then set in the middle of these two values The automatic thresholding method as described above may fail when extracting thin characters as in figur
30. hange the color used for highlighting objects if you click on them in ActivDataView or in the tree of ActivDecision Change the way the extracted blobs are displayed filled or margin only ActivBlobFinder 2008 04 23 4 1 Adapting the Display of Results 35 1 open AVTViewDisplayModes via click AVTView with the right mouse button Adapting the Display of ROIs and Blobs amp NNNM WA Activ iewDisplayModes SOU Y 2 Z S N r Display Region of Interest r Display Results ActiveRO X Group Error ROI a Red Group II Selected Tool m Yellow Green si GE Blob Type Blob Shape Threshold Method Global Fixed Threshold 20 Pixels Threshold Typical Size xl Y Inactive Tools Gray Selected Special Magenta Display Pick Point 2Pires Yellow Margin M Line Width Or m Display Image LUT E draut Text Backgfound _ Text Blue El MS Sang Serif 12pt Contrasting Contours color of the selected pick point color of the different types of ROIs look up table for image display line width of the ROls or of the contour of the blobs SE 9 ABl sel Dar
31. ivBlobFinder can identify the corresponding gray value and find a suitable threshold as described above Results The results of ActivBlobFinder are just the extracted blobs i e the corresponding regions in the image These blobs can then be analyzed using other ActivVisionTools For example you can use ActivFeatureCalc to calculate various shape features for each blob The re sults of ActivFeatureCalc can then be further evaluated using ActivDecision before you output them via ActivFile ActivSerial or ActivDigitalIO furthermore you can access results via the programming interface see the User s Manual for ActivFeatureCalc for more information ActivBlobFinder 2008 04 23 1 1 Introducing ActivBlobFinder 5 b after filling gaps after filling holes LL Q fea 2 2 lt d after removing bulges after filling indentations Figure 1 2 Further processing of blobs a default extraction b filling gaps Cc filling holes d removing bulges e filling indentations ActivVisionTools 3 2 Your Fast Track to Solutions 6 About ActivBlobFinder 1 2 The Sub Tools of ActivBlobFinder Beside its master tool ActivBlobFinder provides one support tool In figure 1 3 they are de picted together with other ActivVisionTools that you will use in a typical ActivBlobFinder ap plication oo AVTBlobFinder is the master tool of ActivBlobFinder It provides multiple extra
32. ix csv which can be used as an input to Microsoft Excel Furthermore you can select a delimiter In the same dialog you can limit the size of the log file in form of the number of cycles that are to be recorded A cycle corresponds to one processing cycle from image input to the evaluation and output of results If you use this option ActivFile creates two log files and switches between them thus assuring that you can always access at least the results of the last N cycles N being the specified number of cycles By pressing Estimate you can let ActivFile estimate the size of one cycle Note that you must first select the output data in order to get meaningful results In the left part of DialogOutputDataSelect you can navigate through the result hi erarchy similarly to ActivDecision ActivBlobFinder 2008 04 23 3 3 Output of Results 31 1 select the name of the log file 2 select file format and delimiter 2 check to enable writing 5 limit the file to a number of cycles 3 click to open the dialogs 6 estimate the file size for one cycle Writing Results to a Log File Ami Options m Limitations IV Limit File Size IV Enable Writing rv Qutput Data Selection r General Object IV Date and Time Name Name Name Tags IV okay IV okay okay Path JAVTFeatur
33. k color of the blobs color of objects that are not okay color of selected objects drawing mode for the blobs Figure 4 1 Adapting the display of ROls and results o iL 2 m 2 lt ActivVisionTools 3 2 Your Fast Track to Solutions 36 Tips amp Tricks 4 2 Configuring the Two Execution Modes Via and FEJ B In an ActivVisionTools application you can switch between two execution modes the config uration mode and the application mode The former should be used to setup and configure an application the latter to run it ActivView s support tools AVTViewExecute and AVTView ConfigExec allow you to switch between the two modes and to customize the behavior of an ActivVisionTools application in the two execution modes e g display live images only in the configuration mode to setup your application but then switch it off in the application mode to speed up the application A third sub tool AVTViewExecuteSimple provides a single button to start stop the application With the help of AVTViewStatus another support tool of Activ View you can inspect the current status of your application isual Basi cd ade Preparation for the following example Example If you worked on the previous example you may continue using this project At design time add AVTViewExecuteSimple and AVTViewStatus to the form by double clicking the icons and with
34. lect Global Fixed Min Max in the combo box Threshold Method you can work with two thresholds a lower and upper one In the combo box Blob Type you can now specify whether the gray values inside or outside the two thresholds correspond to the objects Figure 2 3 shows how to extract the boundaries of the pills this way Note that all ROIs share the selected threshold s To use different thresholds for different ROIs you must create multiple instances of AVTBlobFinder ActivVisionTools 3 2 Your Fast Track to Solutions 16 Using ActivBlobFinder 2 3 2 Extracting Blobs Using Automatic Thresholding ActivBlobFinder provides a method that automatically determines a suitable threshold for a region of interest by analyzing its content As described in chapter on page 1 the underlying assumption is that two gray values dominate in the image the gray value of the background and that of the blobs This has two implications First ROIs must be placed with care they must contain enough background and foreground to fulfill the assumption Secondly for each new image ActivBlobFinder will analyze the content of ROIs again if the content does not change this will waste processing time In such a case it might be better to let ActivBlobFinder determine the threshold once and then use it as a fixed threshold On the other hand automatic thresholding is very useful if the illumination changes from image to image This will be illustrated in th
35. ly e g the failure to connect to an image acquisition device If AVTViewStatus is not added to an application error messages are displayed in popup dialogs More information about AVTViewStatus e g how to modify its appearance can be found in the User s Manual for Activ View section 3 3 on page 32 LL Q fea 2 2 5 amp ActivVisionTools 3 2 Your Fast Track to Solutions
36. nd selecting Im age Acquisition in the popup menu Load the image misc characters_03 If necessary place an ROI over the characters The following steps are visualized in figure 2 6 Please note that the purpose of the example is to demonstrate the processing capabilities not to show how to extract the characters DEO You can combine all extracted blobs into single one by checking v Combine to Single Region This can be useful e g to calculate features like the overall area You can discard blobs by specifying a minimum and or maximum size The default value for the maximum size 100001 signals that the there is no upper boundary for the size To inspect a part of the image point the mouse at it In AVTZoom you can then inspect the gray value of single pixels text box Gray Value or measure lengths or areas by counting pixels in the display or by consulting the position displayed in the text boxes Row and Column In AVTBlobFinderProcess you can change parameters via the sliders or by entering values in the corresponding text boxes To reset parameters to their default value click k I a To fill gaps between blobs measure their width and enter a slightly larger value in the text box beside the slider Fill Gaps Note that by closing a gap blobs are fused into a single blob As a side effect holes that are smaller than the specified width are closed as well ActivBlobFinder 2008 04
37. r with information about the expected size of the blobs Further Processing In some cases the extracted blobs may not correspond exactly to the parts of the image you wanted to extract As for example shown in figure 1 2 a the extracted blobs may have holes or a ragged contour Therefore ActivBlobFinder allows you to process extracted blobs further i e modify their shape Such operations are also called morphological operations Figure 1 2b shows the result of filling gaps The two blobs corresponding to the lowest pin and to the arrow now form one blob As a side effect the contours were smoothed and the holes filled Another operation allows you to fill holes up to a given size without any other effect on the shape of the blobs compare figure 1 2 c to figure 1 2 a You may also remove bulges from the contour of a blob see figure 1 2 d or the reverse operation fill indentations see figure 1 2 e A note on the latter This operation is very similar to filling gaps The difference is that the filling of indentations is limited to the blobs themselves this means that gaps between blobs are not closed compare figure 1 2 e to figure 1 2 b The Role of ROIs When using ActivBlobFinder regions of interest have to be placed with care On the one hand they should of course be as small as possible to speed up image processing However when ap plying automatic thresholding an ROI must contain enough background so that Act
38. s 3 Amalyning Blos 4 2 ee ro 3 2 Evaluating Results ee es 3 3 Outputof Results o e ee cee mx ea es Tips amp Tricks 4 1 Adapting the Display of Results 4 2 Configuring the Two Execution Modes Contents Chapter 1 About ActivBlobFinder This chapter will introduce you to the features and the basic concepts of ActivBlobFinder It gives an overview about ActivBlobFinder s master tool and its support tools which are de scribed in more detail in chapter 2 on page 9 11 Introducing 12 Sub Tools of ActivBlobFinder bS xe S Q m gt 4 2 About ActivBlobFinder 1 1 Introducing ActivBlobFinder With the help of ActivBlobFinder you can extract so called blobs from images Generally speaking a blob is a region in the image whose pixels differ in some way from the surrounding part of the image A blob can have any shape and may even contain holes Extracted blobs can be called the foreground of an image the rest the background ActivBlobFinder offers multiple methods for extracting blobs ranging from very fast and simple ones to methods that extract blobs even from a difficult background Moreover it allows to process extracted blobs further e g to fill holes The Different Extraction Methods How to extract blobs of course depends on the way the blobs dif
39. single cycle or start stop the application 2 select what is to be displayed and whether ROls can be edited IV Display Results IT Display ROIs IV Display Error Results Allow ROI editing Allow Drag amp Drop xj Configuration Mode IV Display Image IV Display Results 4 IV Display ROIs IV Display Error Results 1 537 ms Loading file chip 02 IV Allow Drag amp Drop IV Allow ROI editing 5 current execution mode 6 processing time or speed 7 space for messages Figure 4 2 Customizing and switching between the two execution modes In the mode the application does not perform any processing and waits for your interaction If you start the continuous mode the cogwheels rotate any interaction on your part is stored in the event queue and processed after the current cycle is finished If the cursor gets busy the Activ VisionTools have started a particularly time consuming operation e g connecting to an image acquisition device Any interaction on your part is then deferred to the end of this operation AVTViewStatus also shows the number of processed cycles and the time needed for the last processing cycle AVTViewStatus display two types of messages Informative messages describe e g what the application is doing while it is busy while error messages indicate errors that prevent the application from working correct
40. ts ROI yes 5 4 gt Min Good Objects ROI yes 4 4 Max yes Major Extent yes 24 000000 Minor Extent yes 23 000000 1 yes Major Extent yes 23 000000 Minor Extent yes 21 000000 2 no Major Extent no 45 000000 20 000000 25 000000 Inside Minor Extent no 26 000000 18 000000 23 000000 Inside 3 yes Major Extent yes 23 000000 Minor Extent yes 22 000000 4 yes Major Extent yes 22 656562 Minor Extent yes 22 229080 09 12 04 18 57 59 AVTFeatureCalci Bad ROIs no 1 0 Max Rectanglel 1 no Objects no 0 4 gt Min Good Objects ROI no 0 4 Max Figure 3 4 Part of an example log file ActivBlobFinder 2008 04 23 Chapter 4 Tips amp Tricks This chapter contains additional information that facilitates working with ActivBlobFinder e g how to modify the graphical display of results and how to customize the appearance of an Activ BlobFinder application in the two execution modes 41 Adapting the Display of Results 34 4 2 Configuring the Two Execution 36 33 bS xe S Q m gt 4 34 Tips amp Tricks Visual Basic Example 4 1 Adapting the Display of Results Using a You can adapt the way results and ROIs are displayed using AVTViewDisplayModes which is a support tool of ActivView Preparation for the following example If you worked on the example in the previous chapter you may
41. ults and the evaluations to a log file How to access results and evaluations via the programming interface is described in the User s Manual for ActivFeatureCalc section 4 2 on page 34 how to output them via a serial interface or a digi tal I O board in the User s Manual for ActivSerial and the User s Manual for ActivDigitallO respectively Preparation for the following example If you worked on the previous example you may continue using this project At design time add AVTOutputFile by double clicking Ll Otherwise open the project output Yblob output vbp Execute the application and load the image sequence chip chip1 seq The following steps are visualized in figure 3 3 not shown AVIView AVTBlobFinder AVT Decision o By clicking on Select you can open a file selector box to choose a file name for the log file which will then appear in the text field beside the button By pressing Clear File you can clear the content of the selected file By checking v Enable Writing you enable the writing mode You can open the ActivFile s two dialogs DialogFileOptions and Dialog utput DataSelect by clicking File Options Selection respectively In DialogFileOptions you can choose between two file formats Standard text files suffix txt and the so called comma separated values suff
42. ve dramatic effects e g remove whole parts of a blob If a blob has a hole bulges are removed from the inner contour as well Complementary to removing bulges you can also fill indentations on the contour via the slider Fill Indentation This operation is similar to filling gaps with one difference Gaps between blobs are not closed i e blobs are not fused at this stage Note that blobs can be differentiated easily if displayed with alternating colors see section 4 1 on page 34 Note that all ROIs share the selected parameter values To apply different processing steps in different ROIs you must create multiple instances of AVTBlobFinder ActivBlobFinder 2008 04 23 2 4 Processing Extracted Blobs 23 D filling holes size area of hole ca 20 pixels gt set parameter to 21 removing bulges width ca 6 pixels gt set parameter to 7 9 filling indentations gap width 6 pixels gt set parameter to 7 Figure 2 7 Processing blobs cont ra re co 2 ActivVisionTools 3 2 Your Fast Track to Solutions 24 Using ActivBlobFinder ActivBlobFinder 2008 04 23 Chapter 3 Combining ActivBlobFinder with other ActivVisionTools While the previous chapter explained how to extract the blobs you look for this chapter fo cuses on how to further analyze them and how to evaluate and output the results using other ActivVisionTools In the corresponding example

Download Pdf Manuals

image

Related Search

Related Contents

ECR 5500  English WEEE Warning Message FCC STATEMENT  Origin Storage 320GB 2.5" SATA  Current user manual for the ABTIS 1000 series systems.  Jump-N-Carry®  Généralités - produktinfo.conrad.com  English Français Español Deutsch Italiano Installation  企業ホームページの利用実態調査  PS400 Digital Visualizer Manual del usuario  Remote Data Manager DAServer User`s Guide  

Copyright © All rights reserved.
Failed to retrieve file