I use Arduino YUN, When i run the command to capture image from the camera which is connected through USB i get this error
"Unable to load font 'sans': libgd was not built with FreeType font support".
Can any one help please?
Plan A: --no-banner
sonnyyu:
fswebcam -i 0 -d v4l2:/dev/video0 --no-banner --jpeg 95 --save test.jpg--jpeg 95 will increase quality to 95%.
Make sure driver installed:
root@Arduino:/mnt/sda1# ls /dev/video0 -al
crw-r--r-- 1 root root 81, 0 Jul 7 07:08 /dev/video0
Test device :root@Arduino:/mnt/sda1# fswebcam -d v4l2:/dev/video0 -i 0 --list-controls
--- Opening v4l2:/dev/video0...
/dev/video0 opened.
Available Controls Current Value Range
------------------ ------------- -----
Brightness 64 (100%) -64 - 64
Contrast 15 (50%) 0 - 30
Saturation 50 (39%) 0 - 127
Hue 0 (50%) -16000 - 16000
White Balance Temperature, Auto True True | False
Gamma 100 (34%) 20 - 250
Power Line Frequency 60 Hz Disabled | 50 Hz | 60 Hz
White Balance Temperature 5000 (59%) 2800 - 6500
Sharpness 35 (35%) 0 - 100
Backlight Compensation 0 0 - 1
Adjusting resolution from 384x288 to 352x288.
--- Capturing frame...
Captured frame in 0.00 seconds.
--- Processing captured image...
There are unsaved changes to the image.
Plan B: Recompile libgd with freetype support if you must have banner support.
sonnyyu:
recompile libgd with freetype support.nano ~/OpenWrt-yun/package/feeds/packages/gd/Makefile
CONFIGURE_ARGS += \
--enable-shared
--enable-static
--disable-rpath
--without-x
--without-fontconfig
--without-freetype
--with-jpeg=$(STAGING_DIR)/usr
--with-png=$(STAGING_DIR)/usr
--without-xpm
--without-iconv
remove " --without-freetype \" then recompile libgd. then remove installed libgd force install new revision one. I have not chance to test it but you should go ahead try it yourself.
I have attached image after using the command u told me to... The image full Green. What could be the cause. The camera seems to be working fine... so?

stefanos90:
I think I found the solution,
the problem was the frames.The camera gives black because it cant take a picture with one frame.
You have to:
1)skip the first frames with the -S 10
2)or take the pictures with more frames -F 10 (range 1-255) 255 is slow
3) or give more power to camera (usb hub)so this can give a normal picture. XD
fswebcam -i 0 -d v4l2:/dev/video0 --jpeg 95 --save test.jpg -S 20 -r 640x480
You need powered usb hub, and skip the first few frames (-S 20).
The Yun's hardware version blow V5 has hardware bug. The powered usb hub is needed.