ScaleImage

Re-samples the pixels in an input image or region of interest (ROI) to produce a reduced, enlarged, unrotated, or unbent version of the image. The function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. displays the re-sampled image in the upper-left corner of the In-Sight Spreadsheet spreadsheet.

ScaleImage Example

In this example, the object in the input image is a bottle. The purpose of this example is to scale the size of the bottle to 50%.

  1. Insert the function into the In-Sight Spreadsheet spreadsheet.

  2. Define the ROI by double-clicking on Region in the property sheet, which disappears to reveal the red ROI box overlaid on the image.

  3. Move or resize the box using the cursor.

  4. Click OK on the Job A job is a user-configured program in In-Sight Spreadsheet consisting of functions and designed for specific applications. You can create and edit jobs using the In-Sight Spreadsheet interface, and load them on a vision system for deployment in a live environment. Edit toolbar to confirm the selection and return to the property sheet. (The selection can also be confirmed by pressing the Enter key or by double-clicking within the ROI.)

  5. Type 7.071 in both the X Scale and Y Scale fields.

    Note: The scale value is calculated by finding the desired percentage, 0.5 in this example, multiplying it by 100, and taking the square root of this value. The scale value is 7.071.
  6. Accept the default settings of the other parameters and click OK in the property sheet to complete the configuration for this example and apply the function to the input image. The example shows a 50% scaled image of the bottle.

  7. Use ScaleImage to "unbend" or "unrotate" objects, which can make it easier to reference other tools to the processed output image. In this example, the object is a slightly curved segment, which is shown with the Overlay removed (achieved by clicking Overlay on the View menu). The segment is also scaled to 50% in size, so that both the input image and output image can easily fit in the same view.

  8. After inserting the function, define the ROI and specify 7.071 in both the X Scale and Y Scale fields in the property sheet (described earlier in the bottle example).

  9. Incrementally change the values in the Angle and Curve fields under the Region parameter until the object is straight.

  10. Accept the default settings of the other parameters and click OK in the property sheet to complete the configuration for this example and apply the function to the input image. The example shows an image of the bent object in the middle and the smaller and "unbent" version in the upper-left corner. In this example, an angle of 17.390 and a curve of -36.389 were needed to straighten the curved segment.