2.6.4.10 imgScale(Pro)
Menu Information
Image: Conversion: Image Scale
Brief Information
Rescale image
Additional Information
It is not accessible from script. This feature is for OriginPro only.
X-Function Execution Options
Please refer to the page for additional option switches when accessing the x-function from script
Variables
Image
|
Specifies the input image to be manipulated. The default input is the active image.
|
Available In
|
Specifies the area to apply the new coordinates
Option list
- full:Full Image
- Applies the specified XY coordinates on the edges of the full image to rescale the image
- rec:Rectangle
- Applies the specified XY coordinates on the edges of the selected rectangle area and change the XY coordinates of other areas in the image accordingly.
|
Left
|
Specifies the leftmost X coordinate value in the available area
|
Top
|
Specifies the topmost Y coordinate value in the available area
|
Right
|
Specifies the rightmost X coordinate value in the available area
|
Bottom
|
Specifies the bottommost Y coordinate value in the available area
|
Description
This X-Function applies the new XY coordinate scales either on full image or a selected rectangle area to rescale the image.
If the available area selected is Full Image, given the specified Left and Right values, the minimum X coordinate of the image will be set to Left and the maximum X coordinate will be set to Right. Other X coordinates are reset so that they are linearly spaced between Left and Right. Similarly, given the specified Top and Bottom values, the minimum Y coordinate of the image will be set to Top and the maximum Y coordinate will be set to Bottom. Other Y coordinates are reset so that they are linearly spaced between Top and Bottom.
If the available area is Rectangle, user can select the area by moving and resizing the rectangle object on the image. Given the specified Left, Top, Right and Bottom coordinate values, the XY coordinates of the left, top, right and bottom of the selected area will be reset to these values and other coordinates will also be reset accordingly to keep the coordinates in the selected area linearly spaced. According to the new XY coordinates of the selected area, the XY coordinates of other area on the image will be rearranged. As a result, the input image is rescaled.
Examples
The following example shows how to use this X-Function to rescale the image by specifying the new XY coordinate scales onto the selected rectangle area:
- Create a new matrix and import Flower.jpg under \Samples\Image Processing and Analysis folder into it.
- From the menu, select Matrix: Set Dimension... to open the dialog, user can see the X coordinate scale is from 0 to 931, the Y coordinate scale is from 0 to 793.
- Close the dialog of Set Dimension, select Image: Conversion: Image Scale from the menu to open the imgScale function.
- Set Available in to Rectangle, move and resize the rectangle object on the image, specify the coordinate values, as shown as below:
- Click Apply button to rescale the image. Re-open the dialog of Set Dimension, you will find the XY coordinate scales have been changed.
|
|
The original image
|
The output image
|
Note: OriginPro includes the ability to automatically recalculate the analysis results of the Reset XY coordinate scales operation any time you change the parameters or update your source data. In addition, the settings for this analysis routine can be saved to an analysis theme for use later with similar data.
Related X-Functions
mdim
|