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 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 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 50 in both the X Scale and Y Scale fields.

  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 50 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.