Skip to content

Dewarp fisheye image #747

Discussion options

You must be logged in to vote

Adding other code using the defisheye:

There are other settings or parameters also available which you can try with defisheye 😄

import cv2
from defisheye import Defisheye

# Credentials and camera settings
username = "Vivek"
password = "Kumar"
camera_ip = "195.60.68.14"

# RTSP URL of the fisheye camera
rtsp_port = "554"
stream_path = "axis-media/media.amp?resolution=800x800"  # Updated stream path
rtsp_url = f"rtsp://{username}:{password}@{camera_ip}:{rtsp_port}/{stream_path}"

# Open the video stream
cap = cv2.VideoCapture(rtsp_url)

if not cap.isOpened():
    print("Error: Could not open video stream.")
    exit()

# Read the first frame to determine the resolution
ret, frame = cap.read

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@vivekatoffice
Comment options

Answer selected by vivekatoffice
Comment options

You must be logged in to vote
2 replies
@guidovanschie-nedap
Comment options

@vivekatoffice
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants