Main > Lightguns |
Diy Laser Light Gun. |
<< < (10/14) > >> |
Howard_Casto:
Was it hard to remove the IR filter? I haven't attempted it yet. I'm just wondering how much IR light the green lasers put off because the image quality of the ps eye is surprisingly poor. It's quick in terms of frame rate, but there's all kinds of static.... blocking out visible light and just tracking ir would really improve accuracy. Assuming I can sort out the drivers the wide lens is probably good enough for me to be able to get good tracking with a minimum of distortion. My idea for the system as a whole is this.... A 3d printed lens cap with a visible light filter installed could be removed for calibration. To calibrate the eye would just take a pic and the user could click on the corners.... that'd give me the screen bounds and I could draw a trapezoid with them. I can then scan the image one pixel at a time for that trapezoid's color to determine the start and stop points for each row and column and save those values as offsets and multipliers. The leftmost pixel in a row and the topmost pixel in a column are the offsets and the rightmost and bottommost minus those values converted to a percentage of the screen are the multipliers. Then when you play replace the lens cap and the dot's position would be applied to the array to determine the position on the screen with distortion removed. Alternatively the user could "paint" the corners by firing at them with a visible laser that also has ir. Either would work, I just need to know the corners. So long as the camera isn't moved, it'd never have to be calibrated again. It might be prudent to do a 4:3 calibration for 16:9 monitors but that could be calculated from the 16:9 corners. |
Howard_Casto:
I ran across this: https://www.walmart.com/ip/Universal-AR-Gun-Smart-Pistol-Bluetooth-Game-Handle-Controllers-W-Phone-Stand-3D-AR-Games-Gun-For-Smartphones/981944364 For people with limited DIY skills it'd be an ideal shell for a basic gun. The trigger is actually a Bluetooth controller, so it's wireless. Drill out the front to slide a laser pointer in, rig it to stay on and you are good to go. |
SammyWI:
--- Quote from: Howard_Casto on May 19, 2019, 08:27:32 pm ---Was it hard to remove the IR filter? --- End quote --- It's been a while but IIRC it was a PITA. And on top of that you have to add some kind of shim behind the lens mount to get things to focus. That was why I put on a new lens with the focus adjustment built in. I had another one where I just guessed on adding a shim and the picture was a little out of focus but still worked OK for laser detection. I've also done some testing with filters. Photographic gel films work well. I ordered this pack from Amazon and it has worked well (plus cheap!). https://smile.amazon.com/gp/product/B00QN48X0Q/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1 Two red plus two blue filters work well as a visible light filter for IR laser use. For a visible red laser, adding a red filter can help. |
Howard_Casto:
I might give it a shot anyway, I need to get the drivers working before I do anything... might be able to do something decent with visible light, at least enough for testing. In terms of filters I saw one link on amazon for custom filters... 2 for $10 or something like that. In the description it said you could contact them to get it made for a specific spectrum. In theory one could check the tech specs of two different colored lasers, get filters made for them and then put the opposite filter in two cameras... so camera 1 can't see laser 2 and vice versa. The more I think about it, the more a stationary camera makes sense. Screen location doesn't have to be calculated which decreases processing time. It's just getting the damn lasers and camera to cooperate. |
SammyWI:
Well I tried the PS3 eye again, this time with the Code Laboratories driver. On the good side: it did work and seemed to detect lasers well (using Win 10). On the bad side it still locks up on me. Instead of just freezing the input picture it will go into kind of a static (poor reception) kind of thing. I have read that it takes a lot of USB bandwidth so I may try again with everything else unplugged from that USB bus. The other big issue is I couldn't find a good way to change camera settings (brightness, contrast, etc) and that is pretty critical for getting rid of false positives. Maybe with a visible light filter and IR laser it would be OK. Looking at filters some more I learned something new (to me). Most photographic IR filters actually block visible light (for taking IR photos). If you want to block IR you need to look for an IR cut off filter. And knowing is half the battle. ;) |
Navigation |
Message Index |
Next page |
Previous page |