Web cam finder half life validating game resources


14-Aug-2017 07:14

One specific improvement that can be made to this webcam based laser range finder is to project a horizontal line rather than a dot onto a target.

The closer to the center of the image, the farther away the object is. To calibrate the system, we will collect a series of measurements where I know the range to the target, as well as the number of pixels the dot is from the center of the image each time.For this code to work, you will need the Video OCX Active X component installed on your computer The code that describes the functions found in the main form is seen below: Private Sub exit_Click() ' only if running... Get Color Image Handle ' result_image = Video OCX_Processed. Enabled = True 'Start capture timer ' Start Capture mode If (Not Video OCX. Display error message and end sub Msg Box Video OCX. Release Matrix To Image Handle (capture_image) End If Video OCX.Get Last Error String, vb OKOnly, "Video OCX Error" End End If End If Else Start. Show capture_image End Sub My complete code for this project is available as a package named Laser at the bottom of this page.The drawback of this of course is the addition of the weight of a second camera.