Hi all, While running program it's breaking every time ,but it's not throwing any error then I installed event viewer and find out exception occurring in opencv.
Faulting application name: python.exe, version: 3.7.150.1013, time stamp: 0x5b331a30
Faulting module name: opencv_world410.dll, version: 4.1.0.0, time stamp: 0x5cb59387
Exception code: 0xc0000094
Fault offset: 0x0000000003e16857
Faulting process id: 0x2970
Faulting application start time: 0x01d5ebdb86a8d3c4
Faulting application path: C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe
Faulting module path: C:\Users\Admin\Downloads\install\x64\vc15\bin\opencv_world410.dll
Report Id: d11f5c97-f4a1-4fdb-89b2-8bbdfaf1e0fe
I used the opencv with cuda built
and the functions I'm using (opencv) are Remap,resize,undistort.This code runs in while loop
import cv2
import random
import numpy as np
np_zero = np.float32(np.random.randint(2, 200, size =(640, 480)))
K=np.array([[3528.8238233303578, 0.0, 1896.057963692419], [0.0, 3560.253850219697, 949.5032468663909], [0.0, 0.0, 1.0]])
D=np.array([[0.699564792566421], [-0.9597137933330322], [0.9269878560500789], [1.5974705131747455]])
self.map1, self.map2
DIM1 = [[640,480],[1920,1080],[3840,2160],[4096,2160],[4280,3080]]
DIM = [4096,2160]
#print("Scale", tmpK)
print("Opencv Fisheye Initialize")
while True:
scale = random.choice(DIM1)[0] / DIM[0]
tmpK = K * scale
map1,map2 = cv2.fisheye.initUndistortRectifyMap(tmpK, D, np.eye(3), tmpK, tuple(self.DIM), tuple(DIM), cv2.CV_32FC1)
self.map1 = self.map1.astype(np.float32)
self.map2 = self.map2.astype(np.float32)
self.map1 = cv2.cuda_GpuMat(self.map1)
self.map2 = cv2.cuda_GpuMat(self.map2)
rawImg = cv2.cuda.remap(rawImg, self.map1,self.map2,interpolation=cv2.INTER_LINEAR,borderMode=cv2.BORDER_CONSTANT)
map1 = map1.astype(np.float32)
map2 = map2.astype(np.float32)
print("Opencv GPUMAT Fisheye Initialize")
print("Map 1 : ",map1)
print("Map 2 : ",map2)
#print("Error occured")
map1 = cv2.cuda_GpuMat(map1)
print("Opencv GPUMAT Fisheye map1")
map2 = cv2.cuda_GpuMat(map2)
print("Opencv GPUMAT Fisheye map2")
mp = (map1.type(),map2.type())
print("Done init 0")