Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1757 Discussions

devcloud intel for edge - opencv bug

Yuri_Zhavoronkov
Beginner
699 Views
Hello! When trying to test the code, I came across an error loading a JPG image via opencv. The image is not loading. (img == None) I got a similar error in jupyter oneApi, but there I updated the opencv-python package via %pip and this error went away. In devcloud intel for edge jupyter I can't update the package because no privileges. Any ideas how to fix the error?
0 Kudos
1 Solution
Hari_B_Intel
Moderator
680 Views

Hi Yuri_Zhavoronkov,

 

Can I know the API you use to load the images?

In Intel® Developer Cloud for the Edge, you can use MatplotLib imshow() to load the images.

Further information can be obtained from OpenCV_Primer_Tutorial under the tutorial section.

 

Sample API to use MatplotLib imshow();

 

import cv2
import matplotlib.pyplot as plt


plt.figure() # create new image for display
plt.title('Loading Image')
imageRGB = cv2.cvtColor(imageBGR,cv2.COLOR_BGR2RGB)
plt.imshow(imageRGB)

 

Hope this information help

 

Thank you

 

 

View solution in original post

0 Kudos
2 Replies
Hari_B_Intel
Moderator
681 Views

Hi Yuri_Zhavoronkov,

 

Can I know the API you use to load the images?

In Intel® Developer Cloud for the Edge, you can use MatplotLib imshow() to load the images.

Further information can be obtained from OpenCV_Primer_Tutorial under the tutorial section.

 

Sample API to use MatplotLib imshow();

 

import cv2
import matplotlib.pyplot as plt


plt.figure() # create new image for display
plt.title('Loading Image')
imageRGB = cv2.cvtColor(imageBGR,cv2.COLOR_BGR2RGB)
plt.imshow(imageRGB)

 

Hope this information help

 

Thank you

 

 

0 Kudos
Hari_B_Intel
Moderator
595 Views

Hi Yuri_Zhavoronkov

 

This thread will no longer be monitored since we have provided a solution. Please submit a new question if you need any additional information from Intel.

0 Kudos
Reply