# ScaleColorImage

Available for color In-Sight vision systems and color-enabled emulators only, ScaleColorImage resamples the pixels in an input image or Region of Interest (ROI) to produce a reduced, enlarged, unrotated or unbent version of a color 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 resampled image in the upper-left corner of the In-Sight spreadsheet.

## ScaleColorImage Inputs

Parameter | Description
--- | ---
Image | This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image Functions.
Fixture A fixture is a coordinate location on the image that keeps the tool in the place determined by the fixture. | Defines the Region of Interest (ROI) relative to a Fixture input or the output of the image coordinate system for the Vision Tools function. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI is rotated or translated in relation to the Fixture. Note: 2D projections use real world units but fixturing with 2D tools requires input in pixel values. When using a 2D projection from a 3D point cloud A point cloud is a 3D structure that consists of the data points collected by a 3D vision system during acquisition. as a Fixture, convert the real world units to pixel values using the TransWorldToPixel function. Note: Angles must be multiplied by -1, due to image space differences. The default setting is (0,0,0), the top leftmost corner of the image.
X | The row offset, in image coordinates.
Y | The column offset, in image coordinates.
Theta | The angle of orientation, in the image coordinate system.
Region | Also known as the Region of Interest (ROI), specifies the region of the image that undergoes image processing; creates a rectangular image region that can be transformed and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's toolbar, the region will automatically be stretched to cover the entire image.
X | The X-offset of the origin, in fixture coordinates.
Y | The Y-offset of the origin, in fixture coordinates.
Width | The dimension along the region's X-axis.
Height | The dimension along the region's Y-axis.
Angle | The orientation, in fixture coordinates.
Curve | The angular deviation between the region's X-axis and the opposing boundary line.
X and Y Scale | Specifies the sample ratio in the X and Y directions of the region.
X Scale | Specifies the ratio (10–1000; default = 50) in the X direction of the region.
Y Scale | Specifies the ratio (10–1000; default = 50) in the Y direction of the region.
Note: Values between 100 and 1000 specify upsampling. For example, if both the X and Y scales are specified as 200, the resampled image will be twice as large as the specified Region.
Display X | Specifies the X coordinate (default = 0) where the rescaled image will be displayed, relative to the upper left-hand corner. Note: Specifying a value of -1 will ensure that the function places the scaled image at the same X coordinate as the input image: In case the image is an acquired image, the Start Row of the function will be used. Therefore, if a ScaleColorImage function is configured with a Display X and Display Y parameter settings of 0,0, and the image was a partial acquisition Acquisition is the process or result of the vision system acquiring a new image., the ScaleColorImage function would display its output above the acquired image. In case the image is an output of another Vision Tool, such as ColorToGreyscaleFilter, the X coordinate that defines the input image will be used. For example, if the ColorToGreyscaleFilter function is defined at the X/Y coordinates of 100,100, the referencing ScaleColorImage function with the -1 parameter setting would display at the X coordinate of 100.
Display Y | Specifies the Y coordinate (default = 0) where the rescaled image will be displayed, relative to the upper left-hand corner.
Show | Specifies which graphical overlays are displayed on top of the image.
Hide all = 0 (default) | The input region boundary and resampled image will be hidden, except when the cell containing the ScaleColorImage function is highlighted in the spreadsheet.
Result graphics only = 1 | The resampled image will be displayed at all times.
Input graphics only = 2 | The input region boundary will be displayed at all times.

## ScaleColorImage Outputs

Returns | An Image data structure containing the processed image, or #ERR if any of the input parameters are invalid.