Cheese(https://wiki.gnome.org/Apps/Cheese) is a gnome software for webcams. It has some interesting effects including the "dice" effect. Is there something similar in IM?
I tried looking for something similar in imagemagick to apply on already captured images but did not find it.
Cheese's "dice" effect
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Cheese's "dice" effect
Following your link did not take me to any examples or descriptions of those "interesting effects".
snibgo's IM pages: im.snibgo.com
Re: Cheese's "dice" effect
I think I found some examples on Google images and I would say you will have to write your own Imagemagick code for most of the effects.
Some of the simpler effects are built into Imagemagick; see this page
Some of the simpler effects are built into Imagemagick; see this page
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Cheese's "dice" effect
I do not know what effects are provided by cheese. Perhaps you could provide a link to some examples.
In the meantime, if you are on Linux, Mac OSX, Windows w/Cygwin or Windows 10, see my bash unix imagemagick scripts at the link below.
EDIT: OK, I found some similar examples here http://effectv.sourceforge.net/
In the meantime, if you are on Linux, Mac OSX, Windows w/Cygwin or Windows 10, see my bash unix imagemagick scripts at the link below.
EDIT: OK, I found some similar examples here http://effectv.sourceforge.net/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Cheese's "dice" effect
Here is some Unix-based code to produce the dice effect. It is a bit slow. It took about 15s on my Mac Mini INTEL duo-core vintage 2010.
Input:
I will make a formal script for this shortly.
Input:
Code: Select all
infile="lena.jpg"
inname=`convert "$infile" -format "%t" info:`
dim=16
wh=`convert -ping "$infile" -format "%wx%h" info:`
ww=`echo "$wh" | cut -dx -f1`
hh=`echo "$wh" | cut -dx -f2`
ww=`convert xc: -format "%[fx:$dim*floor($ww/$dim)]" info:`
hh=`convert xc: -format "%[fx:$dim*floor($hh/$dim)]" info:`
numw=$((ww/dim))
numh=$((hh/dim))
num=$((numw*numh))
#echo "numw=$numw; numh=$numh; num=$num;"
convert "$infile" -crop ${ww}x${hh}+0+0 +repage -crop ${dim}x${dim} tmp.miff
(
for ((i=0; i<num; i++)); do
rand=`convert xc: -format "%[fx:round(3*random())]" info:`
angle=$((rand*90))
#echo >&2 "$i; $rand; $angle"
convert tmp.miff[$i] -rotate $angle miff:-
done
) | montage - -tile ${numw}x${numh} -geometry +0+0 "${inname}_dice.jpg"
rm -f tmp.miff
I will make a formal script for this shortly.
Re: Cheese's "dice" effect
Wow, looks great,
Thanks
Thanks
fmw42 wrote:Here is some Unix-based code to produce the dice effect. It is a bit slow. It took about 15s on my Mac Mini INTEL duo-core vintage 2010.
Input:
Code: Select all
infile="lena.jpg" inname=`convert "$infile" -format "%t" info:` dim=16 wh=`convert -ping "$infile" -format "%wx%h" info:` ww=`echo "$wh" | cut -dx -f1` hh=`echo "$wh" | cut -dx -f2` ww=`convert xc: -format "%[fx:$dim*floor($ww/$dim)]" info:` hh=`convert xc: -format "%[fx:$dim*floor($hh/$dim)]" info:` numw=$((ww/dim)) numh=$((hh/dim)) num=$((numw*numh)) #echo "numw=$numw; numh=$numh; num=$num;" convert "$infile" -crop ${ww}x${hh}+0+0 +repage -crop ${dim}x${dim} tmp.miff ( for ((i=0; i<num; i++)); do rand=`convert xc: -format "%[fx:round(3*random())]" info:` angle=$((rand*90)) #echo >&2 "$i; $rand; $angle" convert tmp.miff[$i] -rotate $angle miff:- done ) | montage - -tile ${numw}x${numh} -geometry +0+0 "${inname}_dice.jpg" rm -f tmp.miff
I will make a formal script for this shortly.