@@ -763,7 +763,7 @@ def download_frame(self,frame):
763763 if self .use_gpu_decode :
764764 frame = frame .download ()
765765 frame = cv2 .cvtColor (frame , cv2 .COLOR_BGRA2BGR )
766- if self .device == "Ascend " :
766+ if self .device == "ascend " :
767767 frame = self ._dvpp .jpege (frame )
768768 frame = frame .jpeg_to_cv2 ()
769769 return frame
@@ -823,7 +823,7 @@ def open_gpu_capture(self):
823823 Exit (0 )
824824
825825 def opencv_cpu_capture (self ):
826- if self .device == "Ascend " :
826+ if self .device == "ascend " :
827827 from acllite import videocapture
828828 import acl
829829 ret = acl .rt .set_device (0 )
@@ -833,7 +833,7 @@ def opencv_cpu_capture(self):
833833 self .capture = cv2 .VideoCapture (self .video_path )
834834 self .JadeLog .INFO ("相机类型为:{},使用CPU解码,准备打开相机" .format (self .camera_type ))
835835
836- if self .device == "Ascend " :
836+ if self .device == "ascend " :
837837 ret ,frame = self .capture .read ()
838838 if ret == 0 and frame is not None :
839839 self .reopen_times = 0
@@ -877,7 +877,7 @@ def capture_reader(self):
877877 ret , frame = self .capture .nextFrame ()
878878 else :
879879 ret , frame = self .capture .read ()
880- if self .device == "Ascend " :
880+ if self .device == "ascend " :
881881 if ret == 0 :
882882 ret = True
883883 else :
@@ -902,7 +902,7 @@ def capture_reader(self):
902902 time .sleep (self .camera_reopen_times )
903903
904904 def run (self ):
905- if self .device == "Ascend " :
905+ if self .device == "ascend " :
906906 import acl
907907 from acllite .acllite_imageproc import AclLiteImageProc
908908 ret = acl .rt .set_device (0 )
0 commit comments