Method for determining position of a laser point applied in a firearm training simulation system using infrared lasers
A method to detect, identify and determine the position of laser points from infrared laser emitters in a firearm training simulation system. The method consists of two steps. This first step combines some common tools such as a camera with a filter switcher and edge and corner detecting algorithms in image processing to provide a fast automatic screen calibrating method. The second step is to detect laser point objects in each frame continuously captured by the camera, and then further process these objects to identify laser shots, filter out noisy objects, and eventually detect simulated shots from different laser emitters and determine the final mapped position of the shot.
1 . A method to detect, identify and determine the position of laser points shot onto a screen from reconfigurable laser emitters in a system that consists of a camera, a projector and a computing device connected to the camera and the projector, wherein the method is performed by the computing device, comprising the step of:
performing a screen mapping step including:
powering on the system;
controlling the camera to operate with a visible light filter by the computing device;
generating a plurality of calibration images and projecting the calibration images onto the screen by the computing device;
capturing the projected calibration images by the camera;
programmatically processing the captured images to determine boundaries of the projected images including corners, edges, and a bounded area by the computing device;
generating a mapping points within the bounded area of the projected image in the captured image to corresponding points in the calibration images;
and storing the mapping and boundary parameters;
performing a laser shot detection step, wherein the laser shot detection step is executable only after successful completion of the screen mapping step, including:
configuring laser emitters to project unique emission patterns based on spatiotemporal patterns characteristic of firearm types and firing modes;
controlling the camera to operate with a visible light filter by the computing device;
programmatically reading an identification table comprising aforementioned unique pattern configurations and identification numbers for a plurality of laser emitters by the computing device;
executing an object detection loop including:
capturing, by the camera, real-time image frames and continuously streaming the frames to the computing device, and
programmatically processing, by the computer device, each captured frame to detect clusters of bright pixels corresponding to potential laser objects and filtering out noise artifacts based on object size,
while, by the computing device in parallel, executing a laser shot detection sequence including:
programmatically calculating, for each detected laser object, a center point using a center-of-mass pixel intensity equation;
programmatically discarding false laser objects based on shape, size, and position relative to the bounded area determined in the screen mapping step;
programmatically storing potential laser objects in a table indexed by frame, shot sequence;
programmatically detecting laser shots by identifying consecutive series of laser objects in close proximity in the table that correspond to valid shot durations defined in the identification table;
programmatically identifying simulated shots by correlating multiple detected laser shots with aforementioned spatiotemporal patterns characteristic of firearm types and firing modes;
and transforming the position of the first detected laser shot in a simulated shot from camera coordinates into corresponding coordinates on the original image using the mapping generated in the screen mapping step, and transmitting the final transformed position to a simulation application to generate a virtual shot in a three-dimensional environment.
2 . The method of claim 1 , wherein the calibration images comprise between one and three images of horizontal stripes, vertical stripes, checkerboard patterns, or randomized patterns with corner markers.
3 . The method of claim 1 , wherein the processing of the captured images includes programmatically adjusting brightness and contrast in response to ambient light conditions, and generating error messages in the events of a predetermined number of failed attempts.
4 . The method of claim 1 , wherein at least a portion of the laser shot detection sequence, in particular the calculation of the center point of laser objects and/or the discarding of false laser objects, is performed by the camera instead of the computing device when the camera possesses image processing capabilities.
5 . The method of claim 1 , wherein the laser emitter is configured to modulate continuous beams into short bursts to form secondary identifiable patterns within said spatiotemporal patterns.
6 . The method of claim 1 , wherein the laser emitter varies output power to adjust laser object size for pattern recognition.