I noticed that the value I get from
raw = camera.get_camera_information().camera_configuration.calibration_parameters_raw
is inconsistent with the .conf file.
raw.left_cam returns the coefficient of the right camera
raw.right_cam returns the coefficient of the left camera
Could someone confirm that the API has a bug and the parameters from the conf file are valid?
Could this bug affect rectified calibration parameters by initializing values from the incorrect?
Can you verify it the problem persists with the latest ZED SDK v4.0.7?
Please also share the code that you are using so we can easily replicate the behavior and fix the bug.
@nfntn can you record a short SVO with ZED Explorer (15 seconds is OK) and share it with us?
You can send it to support@stereolabs.com.
This will allow us to test the code as if we are using your same camera.
We could not reproduce this problem and we want to be sure it’s not happening only with your device.
I am using HD2K. I have not tried at other resolutions.
I may query the parameters with the default resolution (without passing parameters) or using a lower resolution. Checking the distortion coefficients which are resolution independent, I could check that there was no influence of this parameter.
As I said above, ZED Explorer did display the correct coefficient.
I am a bit stumped about what could the cause be.
Since the left and right struct are contiguous, the only thing I can think of is that my pywrapper binding and the source may have them in different orders but that’s unlikely and this not something I can check.
Hi @nfntn
we tried many possible ways, but we could not replicate your problem in our lab.
Can you please try to delete the conf file and use this Python script?
The SDK will download a new conf file from our server in case the one you initially downloaded is corrupted:
import pyzed.sl as sl
def printDisto(disto):
print("[k1",disto[0],
", \nk2=",disto[1],
", \np1=",disto[2],
", \np2=",disto[3],
", \nk3=",disto[4],
", \nk4=",disto[5],
", \nk5=",disto[6],
", \nk6=",disto[7],
", \ns1=",disto[8],
", \ns2=",disto[9],
", \ns3=",disto[10],
", \ns4=",disto[11],"]")
def main():
# Create a Camera object
camera = sl.Camera()
init = sl.InitParameters()
#init.set_from_svo_file("D:/SVO/svo_invert.svo")
camera.open(init)
raw_calib = camera.get_camera_information().camera_configuration.calibration_parameters_raw
raw_calib_disto_left = raw_calib.left_cam.disto
raw_calib_disto_right = raw_calib.right_cam.disto
print("LEFT -------------")
printDisto(raw_calib_disto_left)
print("RIGHT ------------")
printDisto(raw_calib_disto_right)
# Close the camera
camera.close()
if __name__ == "__main__":
main()
Tested on a second computer, the issue is not present.
The bug may be specific to my computer/installation. It is running a pretty standard OS and configuration but we could discuss in private if you want more details.
We finally found an error source, the values returned depend on how we attach the ZED connector to the camera.
Rotating the connector 180 deg causes us to get inverted values from the API.
Replicated with two different Stereolabs ZED USB connector (right angle and standard).
Replicated with two different cameras.
Replicated with two different computers.
Correction, it seems to be caused by the API detection of whether the camera is flipped upside down.
Flipping the camera causes an inversion of the fields
I can’t understand the connection between the issue and the cause that you just reported, but we are going to test and verify this behavior to understand more about it.
In the end, I don’t know if this should be considered a bug as it seems to be a feature of the API.
Unfortunately, I didn’t realize this feature existed until now so it was really surprising.