VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums
dear all,
working on image processing using raspberry pi, have installed intex usb web camera on raspberry pi.
have used basic python script of image processing https://www.cl.cam.ac.uk/projects/raspb ... first.html required libraries installed on raspberry pi.
script code:
import imgproc
imgproc import *
# open webcam take pictures
camera = camera(160, 120)
# open viewer window display images
viewer = viewer(160, 120, "the first step")
# take picture camera
img = camera.grabimage()
# display image in viewer
viewer.displayimage(img)
# iterate on each pixel in image
x in range(0, img.width):
for y in range(0, img.height):
# value @ xth column , yth row, place intensities variables
red, green, blue = img[x, y]
# test find colour dominant
if red > green , red > blue:
# red dominant, set pixel red
img[x, y] = 255, 0, 0
elif green > red , green > blue:
img[x, y] = 0, 255, 0
else:
# if red or green isn't dominant, blue must be
img[x, y] = 0, 0, 255
# display image again
viewer.displayimage(img)
# delay 5000 milliseconds give time see changes, exit
waittime(5000)
# end of script
when run script giving error "vidioc_s_fmt error 16, device or resource busy"
installed : $ sudo apt-get install gtk2-engines-pixbuf
working on image processing using raspberry pi, have installed intex usb web camera on raspberry pi.
have used basic python script of image processing https://www.cl.cam.ac.uk/projects/raspb ... first.html required libraries installed on raspberry pi.
script code:
import imgproc
imgproc import *
# open webcam take pictures
camera = camera(160, 120)
# open viewer window display images
viewer = viewer(160, 120, "the first step")
# take picture camera
img = camera.grabimage()
# display image in viewer
viewer.displayimage(img)
# iterate on each pixel in image
x in range(0, img.width):
for y in range(0, img.height):
# value @ xth column , yth row, place intensities variables
red, green, blue = img[x, y]
# test find colour dominant
if red > green , red > blue:
# red dominant, set pixel red
img[x, y] = 255, 0, 0
elif green > red , green > blue:
img[x, y] = 0, 255, 0
else:
# if red or green isn't dominant, blue must be
img[x, y] = 0, 0, 255
# display image again
viewer.displayimage(img)
# delay 5000 milliseconds give time see changes, exit
waittime(5000)
# end of script
when run script giving error "vidioc_s_fmt error 16, device or resource busy"
installed : $ sudo apt-get install gtk2-engines-pixbuf
please me
vidioc_s_fmt error 16, device or resource busy
thank you
vidioc_s_fmt error 16, device or resource busy
thank you
raspberrypi
Comments
Post a Comment