Based on contributions by Erik_Endlich.
Cognex In-Sight/VisionPro cameras have a built-in calibration tool that maps pixel coordinates directly to real-world (robot) coordinates without writing any code. This is useful for correcting small camera drift — for example, after someone bumps the camera mount — using four fixed reference points.
What you need
- A Cognex camera already connected and streaming.
- A laptop with In-Sight Explorer.
- A robot to record precise world-point coordinates.
- Four fixed reference points that cannot move — fix them to the table, or tape down a printed sheet with the points marked on it.
Steps
1. Acquire a normal image
Connect the camera to your laptop, then use the image acquisition function (top of the In-Sight Explorer window) to take a normal, unfiltered picture.
2. Make a filtered image
Use the PointFilter function to turn the image black and white so the reference points stand out clearly.
3. Detect the four reference points with Blob tools
Create one Blob tool per corner (bottom-left, bottom-right, top-left, top-right), and restrict each one to a small search area around where that point is expected. This keeps the tool from confusing one corner’s point with another.
Tune the expected blob area (in pixels) tightly around the real dot size — for example, dots around 20 px led to a blob area range of 10-30 px — otherwise the blob may latch onto a boundary line instead of the point.
Repeat this for all four points:
4. Get the robot coordinates for each point
Jog the robot’s TCP exactly onto each reference point and read its pose — for example, with get_actual_pose on a UR robot (check the equivalent command for your own robot). Do this precisely: a small placement error here shifts the entire calibration. Write down and clearly label each point (BL, TL, TR, BR) so you don’t mix them up later.
5. Calibrate with the world points
Open a property sheet Calib function, and in it, bind each blob’s pixel coordinates to its matching robot world coordinate. You can import the pixel values directly from the cells the blob tools write to.
6. Use the calibration
Once calibrated, the Calib function converts any pixel point (for example, the pixel location of a detected workpiece) to real-world robot coordinates you can send to the robot.
Common mistakes
- Mixing up X and Y, or which pixel point belongs to which world point. Double-check every binding in the Calib function before trusting the output.
- Fixed small search areas don’t work for a moving camera. This method assumes the camera only drifts by a small amount (e.g. after a bump). If your camera is mounted on something that moves significantly (like a robot arm), fixed per-corner search areas aren’t reliable — either widen the search areas a lot, or use unique fiducials (e.g. individual data matrix codes) per corner so the software can always tell them apart, regardless of drift.
- This is not a substitute for lens/distortion calibration. It only compensates for small camera position changes relative to the four fixed points, not for lens distortion.
Related
- Choosing a method to convert camera pixels to robot coordinates — choosing a calibration method
- How to calibrate a camera and map pixels to world coordinates with a ChArUco board — ChArUco board + homography (Python/OpenCV alternative)
Rewritten and consolidated (Sept 2026) from the original student how-to’s: How to auto calibrate Cognex camera using fixed worldpoints.







