![]() |
frc_camera not working but labview does
We can lock on and track the target with labview, but when we try to use kevin's code (frc_camera.zip)with the same configuration values it doesn't work properly. It continually searches for the target, and always returns a confidence value of 0. Here are the configuration values that we used.
#define AGC_DEFAULT 19 // Automatic Gain Control Register [0/0x00] #define BLU_DEFAULT 128 // Blue Gain Control Register [128/0x80] #define RED_DEFAULT 128 // Red Gain Control Register [128/0x80] #define SAT_DEFAULT 128 // Saturation Control Register [128/0x80] #define BRT_DEFAULT 2 // Brightness Control Register [128/0x80] #define AEC_DEFAULT 3 // Automatic Exposure Control Register [127/0x7F] #define COMA_DEFAULT 32 // Common Control A Register [36/0x24] #define COMB_DEFAULT 32 // Common Control B Register [1/0x01] #define COMI_DEFAULT 128 // Common Control I Register [0/0x00] #define EHSH_DEFAULT 128 // Frame Rate Adjust Register 1 [0/0x00] #define EHSL_DEFAULT 32 // Frame Rate Adjust Register 2 [0/0x00] #define COMJ_DEFAULT 132 Any help would be appreciated. |
Re: frc_camera not working but labview does
Make sure the color spaces match. Kevin's code uses YCrCb. I don't know what LABView uses.
|
Re: frc_camera not working but labview does
We had the exact same problem. Kevin's code DOES use the YCrCb colorspace. You can either recalibrate in that colorspace or change the camera's color space. In the frc_camera_s.zip program, the revelvant constant is in camera.h. Set COMA_DEFAULT to 40 to use RGB with no auto white balance.
|
Re: frc_camera not working but labview does
Quote:
1. Camera would start the search sequence, looking for targer. 2. First pan sweep wouldn't see it. Camera swings back to the left to start second sweep. 3. While the camera is sweeping back, the camera sees the target, but since it is in the middle of sweeping back to start the next scan, it loses lock on it and has to restart scanning. Making some minor tweaks to the target tracking code fixed this for us. It also helps to make sure the camera is calibrated correctly. |
Re: frc_camera not working but labview does
We have it calibrated in the right colorspace, but after further thought we think it is the direction the server tries to adjust itself when it is tracking that is backwards. Right when the red tracking light goes on, it moves away from the target. We tried flipping the jumpers, but since it is being controlled from the code we have to do it there... I was wondering if doing something like this would work...
Code:
in tracking.c |
Re: frc_camera not working but labview does
Quote:
Now open tracking.h and read the comments between lines 60 and 65. (This is for the Bells and Whistles version). The same configurations are available in the simple version as well. |
Re: frc_camera not working but labview does
Quote:
|
Re: frc_camera not working but labview does
Code:
// If your camera suddenly moves away from the target once |
| All times are GMT -5. The time now is 19:16. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi