0% found this document useful (0 votes)
158 views6 pages

XG-X TechTip Scaling

This document discusses how to set scaling coefficients in the XG-X machine vision system to convert pixel measurements to real world units. It describes using a known dimension object to calculate scale factors for the X, Y, and length measurements by taking pixel measurements and dividing by the real dimension.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views6 pages

XG-X TechTip Scaling

This document discusses how to set scaling coefficients in the XG-X machine vision system to convert pixel measurements to real world units. It describes using a known dimension object to calculate scale factors for the X, Y, and length measurements by taking pixel measurements and dividing by the real dimension.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

For Reference Only

XG-X Series Tech Tip


Setting Scaling Coefficients
For Reference Only

Setting Scaling Coefficeints in the XG-X


When performing measurements and inspections with the XG-X it is sometimes
beneficial to convert the default pixel units to a real world dimension. This guide will go over
how to set scaling coefficients to convert inspection results to the desired real world unit. In
order to set this up you will need an object of known dimensions - the example below uses the
tick marks from a tape measure. Scale factors can be calculated for the X, Y, and Length
measurements.

 X & Y: applies to any unit result pertaining to positional data


 Length: applies to any result measuring a distance between two points.

X-Direction Measurement:

Start with X-direction scale factor by placing your object of known length in the camera field of
view. For the most accurate scaling:
- ensure your known dimension is lined up as horizontal as possible in relation to the field
of view
- have your known dimension span more than half of the field of view. The shorter the
known dimension the higher the chance there is for compounding error.

Next, go to the flowchart and add an Edge Width tool to give the known dimension in pixel
units. The tool can be added by right clicking on the flowchart > Add > Vision Tools > Edge
Width. You can either register the image or work with the captured image when setting this up.
Go to the Inspect Region setting, and then set your inspection region to get the X direction
measurement you would like to use. Once set, verify that your green edge detection lines fall

2
Machine Vision Technology Keyence Corp. of America XG-X Series Tech Tip
For Reference Only

where your known dimension is. If they are a little off you can either adjust the inspection
region, or you can go into the Condition tab to adjust the edge detection settings. In the
example below, we are taking the 4” measurement from the 3” line to the 7” line. Notice how
the green lines fall directly on those marks.

Setting X-Direction Scale Factor

When the Edge Width tool is set, use the unit result window under the image display to get the
pixel value measurement. In this example, the distance from the two tick marks is 1744.301
pixels. To get the scale coefficient for the X-direction, divide the real dimension by the pixel
dimension (4in/1744.301pix = 0.002293 in/pix). To set the scale factor in the XG-X, go to
Options > Camera Settings > Scaling, then input the value.

Pixel Dimension

3
Machine Vision Technology Keyence Corp. of America XG-X Series Tech Tip
For Reference Only

Setting Y-Direction Scale Factor


Depending on your setup, it may be necessary to individually determine a scale factor for the X
and Y direction. You can perform the same steps above for the Y direction by flipping your
known dimension 90 degrees in the field of view and getting your Y pixel measurement. In the
example below the pixel distance is 1750.132 for the same 4” distance. This gives a Y direction
scale factor of 4in/1750.132pix = 0.002286 in/pix.

Setting Length Scale Factor


You can take your Length scale factor from either the X or Y, it is probably best to choose the
dimension where you will take the most measurements (horizontal or vertical).

Applying Scale Factors to Tools


Once your scale factors are set, you will need to individually turn them ON/OFF in each of the
tools you would like have scaled. This setting can be found under the Parameters tab within
each tool. Once turned on, your tool unit results will be scaled according to the set coefficients.
This process can be carried out with any additional cameras being used in the program. The
image on the next page shows the width measurement of the business card in inches based off
the above scale factors. The Parameters tab on the left shows the setting to disable/enable
scaling from being applied.

*Note: The scale factor coefficients above were calculated based off an example setup, your
calculated coefficients may vary depending on installation, camera resolution, etc.

4
Machine Vision Technology Keyence Corp. of America XG-X Series Tech Tip
For Reference Only

5
Machine Vision Technology Keyence Corp. of America XG-X Series Tech Tip
For Reference Only

CV-X and XG-X Support Resources


www.keyence.com/visionsupport

Resources
Online Support Software Software Activation Firmware Updates
Manual Downloads Technical Guides CAD Files

Direct Vision Expert Support


[email protected]

Email Support 30 min


Average Ticket Response Time *during normal business hours

Immediate Vision Expert Support


1-888-KEYENCE

Phone Support 7 am - 5 pm CST

CV-X Training Videos


www.keyence.com/cvxtrainingvideos

XG-X Training Videos


Online Training www.keyence.com/xgxtrainingvideos

6
Machine Vision Technology Keyence Corp. of America XG-X Series Tech Tip

You might also like