6
4. Processing Multiple Images

4. Processing Multiple Images. Processing Multiple Images If a macro requires no user intervention it is possible to set up routines to process multiple

Embed Size (px)

Citation preview

Page 1: 4. Processing Multiple Images. Processing Multiple Images If a macro requires no user intervention it is possible to set up routines to process multiple

4. Processing Multiple Images

Page 2: 4. Processing Multiple Images. Processing Multiple Images If a macro requires no user intervention it is possible to set up routines to process multiple

Processing Multiple Images

• If a macro requires no user intervention it is possible to set up routines to process multiple images, greatly increasing productivity

• Two macros exist to perform these operations:

1. Sequence Processing

2. Batch Processing

Page 3: 4. Processing Multiple Images. Processing Multiple Images If a macro requires no user intervention it is possible to set up routines to process multiple

Sequence Processing

• Multiple images can be easily merged together in Image-Pro to form sequences

• Images in that sequence can be effectively processed and then advanced

• This can all be done by copying our macro code into the following macro

Page 4: 4. Processing Multiple Images. Processing Multiple Images If a macro requires no user intervention it is possible to set up routines to process multiple

Process Sequence Macro

Sub ProcessSeq()    Dim i As Integer    Dim nFrames As Integer        ret = IpSeqGet(SEQ_NUMFRAMES, nFrames)        For i = 0 To nFrames - 1        ret = IpSeqPlay(i)                'process here    Next iEnd Sub

Page 5: 4. Processing Multiple Images. Processing Multiple Images If a macro requires no user intervention it is possible to set up routines to process multiple

Batch Process Macro

• The Batch Process macro is downloadable from our solutions website www.solution-zone.com

• The macro prompts the user to select a folder and then, in turn, opens each image on the folder, processes and then closes

• The macro’s default operation is to duplicate and perform a Sobel filter. By using Ctrl F in the Macro Editor to search for the word Sobel you will find the relevant code to remove

Page 6: 4. Processing Multiple Images. Processing Multiple Images If a macro requires no user intervention it is possible to set up routines to process multiple

Batch Process MacroRemove the following lines and replace with your process code

invImage = IpWsDuplicate()ret = IpFltSobel()ret = IpLutSetAttr(LUT_CONTRAST, -2)

• As an alternative to copying all the code, write “Call” and then the macro name you wish to call.

• The process of calling macros is of great help when trying to test and modify complicated macros – allowing you to test elements individually