Overexposed image using CV2

1.Which seller did you purchase the product(s) from?
UCTRONICS
2.The Model number of the product(s) you have purchased?
B016712MP - Arducam 12MP IMX477 Pan Tilt Zoom(PTZ) Camera for Raspberry Pi 4/3B+/3 and Jetson Nano, IR-Cut Switchable Camera
3.Which Platform are you using the product(s) on?
Raspberry PI 4
4.Which instruction are you following?
https://www.arducam.com/docs/cameras-for-raspberry-pi/ptz-camera/12mp-imx477-ptz-high-quality-camera/#2-using-the-arducam-ptz-camera-example
5.Has your product ever worked properly?
Yes. Works with the github code using picamera
6.What problems are you experiencing?
Hello, I am able to use picamera in python3 to take a photo, and it seems that it works well. The image looks great.7.What attempts at troubleshooting have you already made?
a handful from this forum
8.How would you like us to help you?
Help me in the right direction

 

 

When I use CV2 only to take photo and save it, I am able to take the photo, but the photo looks overexposed.


import cv2
camera = cv2.VideoCapture(0)
ret, frame = camera.read()
cv2.imwrite("frame-cv2.jpg", frame)
camera.release()

Here is an example of the cv2 image:

Figured out that i had to run

 

focuser.reset(Focuser.OPT_FOCUS)
focuser.reset(Focuser.OPT_ZOOM)

before the code to autofocus.