So the red/blue marker failed when flying over an upward facing light caused all color to be lost. Sensor saturation makes any color based marker unworkable.
There is a glitch prone way to fix the white balance on the webcam. It has to be fixed before capturing the 1st frame. That made the LED white always come out white & the CFL ambient light turn yellow. It was potentially an easy way to separate out the background until you realized CFLs are being superceded by white LEDs.
If the lighting pointed down, the whites couldn't be separated from the CFL & colors were still lost. The webcam can still knock out the color saturation with an ND filter.
Next would be flashing the LED.
If the lighting pointed down, the whites couldn't be separated from the CFL & colors were still lost. The webcam can still knock out the color saturation with an ND filter.
Next would be flashing the LED.
An anti static bag as an ND filter got it down enough to resolve color from LEDs. It actually seemed robust enough to handle different distances.
Without paper
With paper.
The best arrangement has the LEDs in opposing directions & colored paper. The paper adds more coverage. It's really a slight difference. Without paper, it's a lot lighter, but any production version would use paint.
A human looking at this thinks there must be a way to detect the inner red edge & extrapolate a circle.
It's not clear why the color facing out is overwhelmed by the color facing in or why the blue has a red outline. The shape while rotating is completely different than stationary.
A hard edge is required to get an accurate semicircle. So another algorithm emerges. Once again, scan for all the red blobs. Take only blobs with a minimum number of adjacent blue pixels. Take the center of the largest blob as the center of the circle. Test rays from the center. Take all the points where the ray turns from red to blue or off. Extrapolate the circle dimensions & center as with Marcy 1.
A rough experiment could just scan all the red pixels & skip blob detection, but if someone flies in a room full of red LED's, there's going to be a problem.
The worst the camera did. Those red gaps between the blue are also a problem. All roads lead to another board camera.
Various errors
After giving up on actively stabilizing the takeoff attitude, because there's no way to determine attitude with the current camera position, a quick spin up showed she could be made passively stable on the takeoff stand & didn't naturally oscillate in a hover.
So the takeoff attitude is stable on the current stand & below the takeoff power. Before the takeoff, there's a power level at which the attitude is unstable. Then it takes off, but the camera can't see it until it's pretty high.
Her 1st hover was still a Chinese toy, purely manual throttle & no cyclic. The ground based vision was able to track the marker LED in ambient light. All that's needed is functioning camera gimballing & position sensing to finish the flight portion.
Pulling off the takeoff with the current camera position is rough. There's hard coding a starting throttle, then increasing throttle until the period hits a certain range, then instantly stepping it up to a known takeoff power so it doesn't take off faster than the camera can gain a position lock.
There's just tracking the 1st accumulated blob of minimum size. When all 4 sides are in frame, begin calculating position. That only happens after some climbing.
Finally, there's the question of using an alt/az or equatorial camera mount. The camera is in the center of the flying area & can't break contact to flip around. The servos only do 180 deg, necessitating an equatorial mount. An alt/az mount couldn't maintain constant contact if it was orbiting directly overhead.
WEBCAM VS BOARD CAM
A webcam is all but useless & unaffordable. The actual camera would be a board cam, able to stop down enough to knock out all color saturation. The exposure must also be long. It would be much harder to track if there were gaps in the circle.
There are ways to make an IR camera, but you know why those Vicon rooms don't have windows.
The availability of one hung low brand webcams for $3 makes one doubt the viability of $10 board cams. Webcam rolling shutter & scan rate is worse. They're much bigger than the $10 board cams. Webcams continue to have very large circuits, in addition to the camera module. They wouldn't be practical on the aircraft. The 1 hung low brands don't have enough manual control.
A ground cam with 2 USB cables is impractical. To manage the number of USB cables, the leading strategy is a ground IR receiver controlled from an airborne IR transmitter.
The problem is you need to send a compass reading from the ground camera.
A ground cam with 2 USB cables is impractical. To manage the number of USB cables, the leading strategy is a ground IR receiver controlled from an airborne IR transmitter.
The problem is you need to send a compass reading from the ground camera.
DESIGNING AN EQUATORIAL MOUNT
Comments
Interesting.
Have you tried PS3-cams? I think they're called eye-cam and are a pretty good bargain if your looking for computer vision on a budget. Since they are designed to catch the "color balls" they should be a good fit for what you're trying to do I would guess.