ImageMagick, RMagick, OpenCV, ffmpeg, objectdetectを入れた

急に画像を触りたくなったので。
インストール手順をメモしておく

# yum –enablerepo=remi,rpmforge,epel,centosplus install ffmpeg ffmpeg-devel

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
ffmpeg-devel            i386       0.5-2.el5.rf     rpmforge          2.6 M
Updating:
alsa-lib                i386       1.0.17-1.el5     base              412 k
freetype                i386       2.2.1-21.el5_3   updates           310 k
Installing for dependencies:
SDL                     i386       1.2.10-8.el5     base              233 k
SDL-devel               i386       1.2.10-8.el5     base              643 k
a52dec                  i386       0.7.4-8.el5.rf   rpmforge           78 k
a52dec-devel            i386       0.7.4-8.el5.rf   rpmforge           23 k
alsa-lib-devel          i386       1.0.17-1.el5     base              1.4 M
amrnb                   i386       7.0.0.2-1.el5.rf  rpmforge          237 k
amrwb                   i386       7.0.0.3-1.el5.rf  rpmforge          190 k
cppunit                 i386       1.12.0-4.el5.1   epel              187 k
dirac                   i386       1.0.2-1.el5.rf   rpmforge          2.9 M
faac                    i386       1.26-1.el5.rf    rpmforge          151 k
faac-devel              i386       1.26-1.el5.rf    rpmforge          5.6 k
faad2                   i386       2.6.1-1.el5.rf   rpmforge          329 k
faad2-devel             i386       2.6.1-1.el5.rf   rpmforge          6.4 k
ffmpeg                  i386       0.5-2.el5.rf     rpmforge          2.5 M
ffmpeg-libpostproc      i386       0.5-2.el5.rf     rpmforge           40 k
freetype-devel          i386       2.2.1-21.el5_3   updates           146 k
imlib2                  i386       1.4.0-1.el5.rf   rpmforge          947 k
imlib2-devel            i386       1.4.0-1.el5.rf   rpmforge          160 k
lame                    i386       3.98.2-1.el5.rf  rpmforge          569 k
lame-devel              i386       3.98.2-1.el5.rf  rpmforge           21 k
libICE-devel            i386       1.0.1-2.1        base               13 k
libSM-devel             i386       1.0.1-3.1        base              9.4 k
libXext-devel           i386       1.0.1-2.1        base               57 k
libXrandr-devel         i386       1.1.1-3.1        base               14 k
libXrender-devel        i386       0.9.1-3.1        base              8.8 k
libXt-devel             i386       1.0.2-3.1.fc6    base              332 k
libid3tag               i386       0.15.1b-5.el5    epel               45 k
libogg                  i386       2:1.1.3-3.el5    base               19 k
libtheora               i386       1.0alpha7-1      base              708 k
mesa-libGLU             i386       6.5.1-7.7.el5    base              227 k
mesa-libGLU-devel       i386       6.5.1-7.7.el5    base               91 k
x264                    i386       0.0.0-0.4.20090708.el5.rf
rpmforge          898 k
x264-devel              i386       0.0.0-0.4.20090708.el5.rf
rpmforge          299 k
xvidcore                i386       1.2.2-1.el5.rf   rpmforge          511 k
xvidcore-devel          i386       1.2.2-1.el5.rf   rpmforge          141 k

Transaction Summary
=============================================================================
Install     36 Package(s)
Update       2 Package(s)
Remove       0 Package(s)

Total download size: 17 M
Is this ok [y/N]: y

ガツン

# yum –enablerepo=remi,rpmforge,epel,centosplus install gtk2-devel libpng-devel libjpeg-devel libtiff-devel

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
gtk2-devel              i386       2.10.4-20.el5    base              2.8 M
libjpeg-devel           i386       6b-37            base              105 k
libtiff-devel           i386       3.8.2-7.el5_3.4  updates           465 k
Updating:
glib2                   i386       2.12.3-4.el5_3.1  updates           674 k
libpng                  i386       2:1.2.10-7.1.el5_3.2  updates
     241 k
libtiff                 i386       3.8.2-7.el5_3.4  updates           306 k
Installing for dependencies:
atk-devel               i386       1.12.2-1.fc6     base              126 k
cairo-devel             i386       1.2.4-5.el5      base              131 k
fontconfig-devel        i386       2.4.1-7.el5      base              168 k
glib2-devel             i386       2.12.3-4.el5_3.1  updates           1.2 M
libXcursor-devel        i386       1.1.7-1.1        base               14 k
libXfixes-devel         i386       4.0.1-2.1        base              9.4 k
libXft-devel            i386       2.1.10-1.1       base               16 k
libXi-devel             i386       1.0.1-3.1        base               52 k
libXinerama-devel       i386       1.0.1-2.1        base              5.1 k
libpng-devel            i386       2:1.2.10-7.1.el5_3.2  updates
     181 k
pango-devel             i386       1.14.9-5.el5.centos  updates           274 k

Transaction Summary
=============================================================================
Install     14 Package(s)
Update       3 Package(s)
Remove       0 Package(s)

Total download size: 6.8 M
Is this ok [y/N]: y

ガツン

# yum –enablerepo=remi,rpmforge,epel,centosplus install opencv opencv-devel

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
opencv-devel            i386       1.0.0-3.el5      epel              4.4 M
Installing for dependencies:
opencv                  i386       1.0.0-3.el5      epel              2.5 M

Transaction Summary
=============================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 6.9 M
Is this ok [y/N]: y

# yum –enablerepo=remi,rpmforge,epel,centosplus install ImageMagick
ImageMagick-devel

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
ImageMagick-devel       i386       6.2.8.0-4.el5_1.1  base               75 k
Installing for dependencies:
ImageMagick             i386       6.2.8.0-4.el5_1.1  base              3.3 M
bzip2-devel             i386       1.0.3-4.el5_2    base               38 k
ghostscript             i386       8.15.2-9.4.el5_3.7  updates           5.9 M
ghostscript-devel       i386       8.15.2-9.4.el5_3.7  updates            40 k
ghostscript-fonts       noarch     5.50-13.1.1      base              801 k
lcms                    i386       1.18-0.1.beta1.el5_3.2  updates
       176 k
lcms-devel              i386       1.18-0.1.beta1.el5_3.2  updates
       156 k
libcroco                i386       0.6.1-2.1        base              127 k
libgsf                  i386       1.14.1-6.1       base              116 k
librsvg2                i386       2.16.1-1.el5     base              178 k
libwmf                  i386       0.2.8.4-10.2     updates           834 k
urw-fonts               noarch     2.3-6.1.1        base              4.5 M

Transaction Summary
=============================================================================
Install     13 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 16 M
Is this ok [y/N]: y

ガツン

# convert –vesrion
Version: ImageMagick 6.2.8 04/17/08 Q16
file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

$ sudo gem list rmagick -r

*** REMOTE GEMS ***

rmagick (2.12.2)
rmagick4j (0.3.7)

$ sudo gem install rmagick
Building native extensions.  This could take a while…
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5… yes
checking for gcc… yes
checking for Magick-config… yes
checking for ImageMagick version >= 6.3.5… no
Can’t install RMagick 2.12.2. You must have ImageMagick 6.3.5 or later.

はい
remiにImageMagick2 6.5.5.6-1てのがあって、これがImageMagickのより新しいバージョンぽいので
入れてみる

# yum –enablerepo=remi,rpmforge,epel,centosplus install ImageMagick2
ImageMagick2-devel

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
ImageMagick2-devel      i386       6.5.5.6-1.el5.remi  remi               87 k
Installing for dependencies:
ImageMagick2            i386       6.5.5.6-1.el5.remi  remi              2.0 M
jasper-devel            i386       1.900.1-9.el5    epel              379 k
jasper-libs             i386       1.900.1-9.el5    epel              152 k

Transaction Summary
=============================================================================
Install      4 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 2.6 M
Is this ok [y/N]: y

Transaction Check Error:
  file /usr/bin/Magick-config from install of
ImageMagick2-devel-6.5.5.6-1.el5.remi conflicts with file from package
ImageMagick-devel-6.2.8.0-4.el5_1.1
  file /usr/bin/Wand-config from install of
ImageMagick2-devel-6.5.5.6-1.el5.remi conflicts with file from package
ImageMagick-devel-6.2.8.0-4.el5_1.1
  file /usr/lib/pkgconfig/ImageMagick.pc from install of
ImageMagick2-devel-6.5.5.6-1.el5.remi conflicts with file from package
ImageMagick-devel-6.2.8.0-4.el5_1.1
  file /usr/lib/pkgconfig/Wand.pc from install of
ImageMagick2-devel-6.5.5.6-1.el5.remi conflicts with file from package
ImageMagick-devel-6.2.8.0-4.el5_1.1
  file /usr/share/man/man1/Magick-config.1.gz from install of
ImageMagick2-devel-6.5.5.6-1.el5.remi conflicts with file from package
ImageMagick-devel-6.2.8.0-4.el5_1.1
  file /usr/share/man/man1/Wand-config.1.gz from install of
ImageMagick2-devel-6.5.5.6-1.el5.remi conflicts with file from package
ImageMagick-devel-6.2.8.0-4.el5_1.1

Error Summary
————-

はい
消す

# yum remove ImageMagick ImageMagick-devel

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Removing:
ImageMagick             i386       6.2.8.0-4.el5_1.1  installed          11 M
ImageMagick-devel       i386       6.2.8.0-4.el5_1.1  installed         312 k

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       2 Package(s)

Is this ok [y/N]: y

# yum –enablerepo=remi,rpmforge,epel,centosplus install ImageMagick2
ImageMagick2-devel

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
ImageMagick2-devel      i386       6.5.5.6-1.el5.remi  remi               87 k
Installing for dependencies:
ImageMagick2            i386       6.5.5.6-1.el5.remi  remi              2.0 M
jasper-devel            i386       1.900.1-9.el5    epel              379 k
jasper-libs             i386       1.900.1-9.el5    epel              152 k

Transaction Summary
=============================================================================
Install      4 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 2.6 M
Is this ok [y/N]: y

入った
remiへの依存度がまたひとつ増した

# convert –help
-bash: convert: command not found

convertがない

$ sudo gem list rmagick –both

*** LOCAL GEMS ***

*** REMOTE GEMS ***

rmagick (2.12.2)
rmagick4j (0.3.7)

$ sudo gem install rmagick
Building native extensions.  This could take a while…
Successfully installed rmagick-2.12.2
1 gem installed
Installing ri documentation for rmagick-2.12.2…
No definition for Magick_colors
No definition for Magick_fonts
No definition for Magick_init_formats
No definition for Magick_limit_resource
No definition for Magick_set_cache_threshold
No definition for Magick_set_log_event_mask
No definition for Magick_set_log_format
No definition for Image_initialize
No definition for Image_combine
No definition for Image_constitute
No definition for Image__load
No definition for Image_capture
No definition for Image_ping
No definition for Image_read
No definition for Image_read_inline
No definition for Image_from_blob
No definition for Image_adaptive_blur
No definition for Image_adaptive_blur_channel
No definition for Image_adaptive_resize
No definition for Image_adaptive_sharpen
No definition for Image_adaptive_sharpen_channel
No definition for Image_adaptive_threshold
No definition for Image_add_compose_mask
No definition for Image_add_noise
No definition for Image_add_noise_channel
No definition for Image_add_profile
No definition for Image_affine_transform
No definition for Image_remap
No definition for Image_alpha
No definition for Image_alpha_q
No definition for Image_aref
No definition for Image_aset
No definition for Image_auto_gamma_channel
No definition for Image_auto_level_channel
No definition for Image_auto_orient
No definition for Image_auto_orient_bang
No definition for Image_properties
No definition for Image_bilevel_channel
No definition for Image_black_threshold
No definition for Image_blend
No definition for Image_blue_shift
No definition for Image_blur_image
No definition for Image_blur_channel
No definition for Image_border
No definition for Image_border_bang
No definition for Image_change_geometry
No definition for Image_change_geometry
No definition for Image_changed_q
No definition for Image_channel
No definition for Image_compare_channel
No definition for Image_check_destroyed
No definition for Image_compare_channel
No definition for Image_channel_depth
No definition for Image_channel_extrema
No definition for Image_channel_mean
No definition for Image_charcoal
No definition for Image_chop
No definition for Image_clut_channel
No definition for Image_clone
No definition for Image_color_flood_fill
No definition for Image_color_histogram
No definition for Image_colorize
No definition for Image_colormap
No definition for Image_composite
No definition for Image_composite_bang
No definition for Image_composite_affine
No definition for Image_composite_channel
No definition for Image_composite_channel_bang
No definition for Image_composite_mathematics
No definition for Image_composite_tiled
No definition for Image_composite_tiled_bang
No definition for Image_compress_colormap_bang
No definition for Image_contrast
No definition for Image_contrast_stretch_channel
No definition for Image_convolve
No definition for Image_convolve_channel
No definition for Image_copy
No definition for Image_crop
No definition for Image_crop_bang
No definition for Image_cycle_colormap
No definition for Image_decipher
No definition for Image_define
No definition for Image_deskew
No definition for Image_delete_compose_mask
No definition for Image_delete_profile
No definition for Image_despeckle
No definition for Image_destroy_bang
No definition for Image_destroyed_q
No definition for Image_difference
No definition for Image_dispatch
No definition for Image_displace
No definition for Image_display
No definition for Image_dissolve
No definition for Image_distort
No definition for Image_distortion_channel
No definition for Image__dump
No definition for Image_dup
No definition for Image_each_profile
No definition for Image_edge
No definition for Image_emboss
No definition for Image_encipher
No definition for Image_enhance
No definition for Image_equalize
No definition for Image_equalize_channel
No definition for Image_erase_bang
No definition for Image_excerpt
No definition for Image_excerpt_bang
No definition for Image_export_pixels
No definition for Image_export_pixels_to_str
No definition for Image_extent
No definition for Image_find_similar_region
No definition for Image_flip
No definition for Image_flip_bang
No definition for Image_flop
No definition for Image_flop_bang
No definition for Image_frame
No definition for Image_function_channel
No definition for Image_gamma_channel
No definition for Image_gamma_correct
No definition for Image_gaussian_blur
No definition for Image_gaussian_blur_channel
No definition for Image_get_pixels
No definition for Image_gray_q
No definition for Image_gray_q
No definition for Image_histogram_q
No definition for Image_implode
No definition for Image_import_pixels
No definition for Image_init_copy
No definition for Image_inspect
No definition for Image_level2
No definition for Image_level_channel
No definition for Image_level_colors
No definition for Image_levelize_channel
No definition for Image_linear_stretch
No definition for Image_liquid_rescale
No definition for Image_magnify
No definition for Image_magnify_bang
No definition for Image_map
No definition for Image_marshal_dump
No definition for Image_marshal_load
No definition for Image_mask
No definition for Image_matte_flood_fill
No definition for Image_median_filter
No definition for Image_minify
No definition for Image_minify_bang
No definition for Image_modulate
No definition for Image_monochrome_q
No definition for Image_motion_blur
No definition for Image_negate
No definition for Image_negate_channel
No definition for Image_normalize
No definition for Image_normalize_channel
No definition for Image_oil_paint
No definition for Image_opaque
No definition for Image_opaque_channel
No definition for Image_opaque_q
No definition for Image_ordered_dither
No definition for Image_paint_transparent
No definition for Image_palette_q
No definition for Image_pixel_color
No definition for Image_polaroid
No definition for Image_posterize
No definition for Image_preview
No definition for Image_profile_bang
No definition for Image_quantize
No definition for Image_quantum_operator
No definition for Image_radial_blur
No definition for Image_radial_blur_channel
No definition for Image_raise
No definition for Image_random_threshold_channel
No definition for Image_recolor
No definition for Image_reduce_noise
No definition for Image_resize
No definition for Image_resize_bang
No definition for Image_roll
No definition for Image_rotate
No definition for Image_rotate_bang
No definition for Image_sample
No definition for Image_sample_bang
No definition for Image_scale
No definition for Image_scale_bang
No definition for Image_segment
No definition for Image_selective_blur_channel
No definition for Image_separate
No definition for Image_sepiatone
No definition for Image_set_channel_depth
No definition for Image_shade
No definition for Image_shadow
No definition for Image_sharpen
No definition for Image_sharpen_channel
No definition for Image_shave
No definition for Image_shave_bang
No definition for Image_shear
No definition for Image_sigmoidal_contrast_channel
No definition for Image_signature
No definition for Image_sketch
No definition for Image_solarize
No definition for Image_spaceship
No definition for Image_sparse_color
No definition for Image_splice
No definition for Image_spread
No definition for Image_stegano
No definition for Image_stereo
No definition for Image_strip_bang
No definition for Image_store_pixels
No definition for Image_swirl
No definition for Image_sync_profiles
No definition for Image_texture_flood_fill
No definition for Image_threshold
No definition for Image_thumbnail
No definition for Image_thumbnail_bang
No definition for Image_tint
No definition for Image_to_color
No definition for Image_to_blob
No definition for Image_transparent
No definition for Image_transparent_chroma
No definition for Image_transpose
No definition for Image_transpose_bang
No definition for Image_transverse
No definition for Image_transverse_bang
No definition for Image_trim
No definition for Image_trim_bang
No definition for Image_undefine
No definition for Image_unique_colors
No definition for Image_unsharp_mask
No definition for Image_unsharp_mask_channel
No definition for Image_vignette
No definition for Image_watermark
No definition for Image_wave
No definition for Image_wet_floor
No definition for Image_white_threshold
No definition for Image_write
No definition for ImageList_remap
No definition for ImageList_animate
No definition for ImageList_append
No definition for ImageList_average
No definition for ImageList_coalesce
No definition for ImageList_composite_layers
No definition for ImageList_deconstruct
No definition for ImageList_display
No definition for ImageList_flatten_images
No definition for ImageList_fx
No definition for ImageList_map
No definition for ImageList_montage
No definition for ImageList_morph
No definition for ImageList_mosaic
No definition for ImageList_optimize_layers
No definition for ImageList_quantize
No definition for ImageList_to_blob
No definition for ImageList_write
No definition for Draw_annotate
No definition for Draw_clone
No definition for Draw_composite
No definition for Draw_draw
No definition for Draw_dup
No definition for Draw_get_type_metrics
No definition for Draw_get_multiline_type_metrics
No definition for Draw_initialize
No definition for Draw_init_copy
No definition for Draw_inspect
No definition for Draw_marshal_dump
No definition for Draw_marshal_load
No definition for Draw_primitive
No definition for DrawOptions_initialize
No definition for Pixel_from_color
No definition for Pixel_from_HSL
No definition for Pixel_from_hsla
No definition for Pixel_spaceship
No definition for Pixel_case_eq
No definition for Pixel_eql_q
No definition for Pixel_initialize
No definition for Pixel_init_copy
No definition for Pixel_clone
No definition for Pixel_dup
No definition for Pixel_fcmp
No definition for Pixel_hash
No definition for Pixel_intensity
No definition for Pixel_marshal_dump
No definition for Pixel_marshal_load
No definition for Pixel_to_color
No definition for Pixel_to_HSL
No definition for Pixel_to_hsla
No definition for Pixel_to_s
No definition for Montage_initialize
No definition for rm_no_freeze
No definition for Info_initialize
No definition for Info_channel
No definition for rm_no_freeze
No definition for Info_define
No definition for Info_aset
No definition for Info_aref
No definition for Info_undefine
No definition for PolaroidOptions_initialize
No definition for GradientFill_initialize
No definition for GradientFill_fill
No definition for TextureFill_initialize
No definition for TextureFill_fill
No definition for ImageMagickError_initialize
No definition for Enum_initialize
No definition for Enum_to_s
No definition for Enum_to_i
No definition for Enum_spaceship
No definition for Enum_case_eq
Installing RDoc documentation for rmagick-2.12.2…
No definition for Magick_colors
No definition for Magick_fonts
No definition for Magick_init_formats
No definition for Magick_limit_resource
No definition for Magick_set_cache_threshold
No definition for Magick_set_log_event_mask
No definition for Magick_set_log_format
No definition for Image_initialize
No definition for Image_combine
No definition for Image_constitute
No definition for Image__load
No definition for Image_capture
No definition for Image_ping
No definition for Image_read
No definition for Image_read_inline
No definition for Image_from_blob
No definition for Image_adaptive_blur
No definition for Image_adaptive_blur_channel
No definition for Image_adaptive_resize
No definition for Image_adaptive_sharpen
No definition for Image_adaptive_sharpen_channel
No definition for Image_adaptive_threshold
No definition for Image_add_compose_mask
No definition for Image_add_noise
No definition for Image_add_noise_channel
No definition for Image_add_profile
No definition for Image_affine_transform
No definition for Image_remap
No definition for Image_alpha
No definition for Image_alpha_q
No definition for Image_aref
No definition for Image_aset
No definition for Image_auto_gamma_channel
No definition for Image_auto_level_channel
No definition for Image_auto_orient
No definition for Image_auto_orient_bang
No definition for Image_properties
No definition for Image_bilevel_channel
No definition for Image_black_threshold
No definition for Image_blend
No definition for Image_blue_shift
No definition for Image_blur_image
No definition for Image_blur_channel
No definition for Image_border
No definition for Image_border_bang
No definition for Image_change_geometry
No definition for Image_change_geometry
No definition for Image_changed_q
No definition for Image_channel
No definition for Image_compare_channel
No definition for Image_check_destroyed
No definition for Image_compare_channel
No definition for Image_channel_depth
No definition for Image_channel_extrema
No definition for Image_channel_mean
No definition for Image_charcoal
No definition for Image_chop
No definition for Image_clut_channel
No definition for Image_clone
No definition for Image_color_flood_fill
No definition for Image_color_histogram
No definition for Image_colorize
No definition for Image_colormap
No definition for Image_composite
No definition for Image_composite_bang
No definition for Image_composite_affine
No definition for Image_composite_channel
No definition for Image_composite_channel_bang
No definition for Image_composite_mathematics
No definition for Image_composite_tiled
No definition for Image_composite_tiled_bang
No definition for Image_compress_colormap_bang
No definition for Image_contrast
No definition for Image_contrast_stretch_channel
No definition for Image_convolve
No definition for Image_convolve_channel
No definition for Image_copy
No definition for Image_crop
No definition for Image_crop_bang
No definition for Image_cycle_colormap
No definition for Image_decipher
No definition for Image_define
No definition for Image_deskew
No definition for Image_delete_compose_mask
No definition for Image_delete_profile
No definition for Image_despeckle
No definition for Image_destroy_bang
No definition for Image_destroyed_q
No definition for Image_difference
No definition for Image_dispatch
No definition for Image_displace
No definition for Image_display
No definition for Image_dissolve
No definition for Image_distort
No definition for Image_distortion_channel
No definition for Image__dump
No definition for Image_dup
No definition for Image_each_profile
No definition for Image_edge
No definition for Image_emboss
No definition for Image_encipher
No definition for Image_enhance
No definition for Image_equalize
No definition for Image_equalize_channel
No definition for Image_erase_bang
No definition for Image_excerpt
No definition for Image_excerpt_bang
No definition for Image_export_pixels
No definition for Image_export_pixels_to_str
No definition for Image_extent
No definition for Image_find_similar_region
No definition for Image_flip
No definition for Image_flip_bang
No definition for Image_flop
No definition for Image_flop_bang
No definition for Image_frame
No definition for Image_function_channel
No definition for Image_gamma_channel
No definition for Image_gamma_correct
No definition for Image_gaussian_blur
No definition for Image_gaussian_blur_channel
No definition for Image_get_pixels
No definition for Image_gray_q
No definition for Image_gray_q
No definition for Image_histogram_q
No definition for Image_implode
No definition for Image_import_pixels
No definition for Image_init_copy
No definition for Image_inspect
No definition for Image_level2
No definition for Image_level_channel
No definition for Image_level_colors
No definition for Image_levelize_channel
No definition for Image_linear_stretch
No definition for Image_liquid_rescale
No definition for Image_magnify
No definition for Image_magnify_bang
No definition for Image_map
No definition for Image_marshal_dump
No definition for Image_marshal_load
No definition for Image_mask
No definition for Image_matte_flood_fill
No definition for Image_median_filter
No definition for Image_minify
No definition for Image_minify_bang
No definition for Image_modulate
No definition for Image_monochrome_q
No definition for Image_motion_blur
No definition for Image_negate
No definition for Image_negate_channel
No definition for Image_normalize
No definition for Image_normalize_channel
No definition for Image_oil_paint
No definition for Image_opaque
No definition for Image_opaque_channel
No definition for Image_opaque_q
No definition for Image_ordered_dither
No definition for Image_paint_transparent
No definition for Image_palette_q
No definition for Image_pixel_color
No definition for Image_polaroid
No definition for Image_posterize
No definition for Image_preview
No definition for Image_profile_bang
No definition for Image_quantize
No definition for Image_quantum_operator
No definition for Image_radial_blur
No definition for Image_radial_blur_channel
No definition for Image_raise
No definition for Image_random_threshold_channel
No definition for Image_recolor
No definition for Image_reduce_noise
No definition for Image_resize
No definition for Image_resize_bang
No definition for Image_roll
No definition for Image_rotate
No definition for Image_rotate_bang
No definition for Image_sample
No definition for Image_sample_bang
No definition for Image_scale
No definition for Image_scale_bang
No definition for Image_segment
No definition for Image_selective_blur_channel
No definition for Image_separate
No definition for Image_sepiatone
No definition for Image_set_channel_depth
No definition for Image_shade
No definition for Image_shadow
No definition for Image_sharpen
No definition for Image_sharpen_channel
No definition for Image_shave
No definition for Image_shave_bang
No definition for Image_shear
No definition for Image_sigmoidal_contrast_channel
No definition for Image_signature
No definition for Image_sketch
No definition for Image_solarize
No definition for Image_spaceship
No definition for Image_sparse_color
No definition for Image_splice
No definition for Image_spread
No definition for Image_stegano
No definition for Image_stereo
No definition for Image_strip_bang
No definition for Image_store_pixels
No definition for Image_swirl
No definition for Image_sync_profiles
No definition for Image_texture_flood_fill
No definition for Image_threshold
No definition for Image_thumbnail
No definition for Image_thumbnail_bang
No definition for Image_tint
No definition for Image_to_color
No definition for Image_to_blob
No definition for Image_transparent
No definition for Image_transparent_chroma
No definition for Image_transpose
No definition for Image_transpose_bang
No definition for Image_transverse
No definition for Image_transverse_bang
No definition for Image_trim
No definition for Image_trim_bang
No definition for Image_undefine
No definition for Image_unique_colors
No definition for Image_unsharp_mask
No definition for Image_unsharp_mask_channel
No definition for Image_vignette
No definition for Image_watermark
No definition for Image_wave
No definition for Image_wet_floor
No definition for Image_white_threshold
No definition for Image_write
No definition for ImageList_remap
No definition for ImageList_animate
No definition for ImageList_append
No definition for ImageList_average
No definition for ImageList_coalesce
No definition for ImageList_composite_layers
No definition for ImageList_deconstruct
No definition for ImageList_display
No definition for ImageList_flatten_images
No definition for ImageList_fx
No definition for ImageList_map
No definition for ImageList_montage
No definition for ImageList_morph
No definition for ImageList_mosaic
No definition for ImageList_optimize_layers
No definition for ImageList_quantize
No definition for ImageList_to_blob
No definition for ImageList_write
No definition for Draw_annotate
No definition for Draw_clone
No definition for Draw_composite
No definition for Draw_draw
No definition for Draw_dup
No definition for Draw_get_type_metrics
No definition for Draw_get_multiline_type_metrics
No definition for Draw_initialize
No definition for Draw_init_copy
No definition for Draw_inspect
No definition for Draw_marshal_dump
No definition for Draw_marshal_load
No definition for Draw_primitive
No definition for DrawOptions_initialize
No definition for Pixel_from_color
No definition for Pixel_from_HSL
No definition for Pixel_from_hsla
No definition for Pixel_spaceship
No definition for Pixel_case_eq
No definition for Pixel_eql_q
No definition for Pixel_initialize
No definition for Pixel_init_copy
No definition for Pixel_clone
No definition for Pixel_dup
No definition for Pixel_fcmp
No definition for Pixel_hash
No definition for Pixel_intensity
No definition for Pixel_marshal_dump
No definition for Pixel_marshal_load
No definition for Pixel_to_color
No definition for Pixel_to_HSL
No definition for Pixel_to_hsla
No definition for Pixel_to_s
No definition for Montage_initialize
No definition for rm_no_freeze
No definition for Info_initialize
No definition for Info_channel
No definition for rm_no_freeze
No definition for Info_define
No definition for Info_aset
No definition for Info_aref
No definition for Info_undefine
No definition for PolaroidOptions_initialize
No definition for GradientFill_initialize
No definition for GradientFill_fill
No definition for TextureFill_initialize
No definition for TextureFill_fill
No definition for ImageMagickError_initialize
No definition for Enum_initialize
No definition for Enum_to_s
No definition for Enum_to_i
No definition for Enum_spaceship
No definition for Enum_case_eq

膨大にエラー出たけど今度はRMagick入ったみたい
大丈夫そうな根拠は一切ないが

$ irb
irb(main):001:0> require ‘rubygems’
=> true
irb(main):002:0> require ‘RMagick’
=> true
irb(main):003:0> quit

convertなどなどはtoolsにあるようだ
# yum –enablerepo=remi,rpmforge,epel,centosplus install ImageMagick2-tools

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
ImageMagick2-tools      i386       6.5.5.6-1.el5.remi  remi               54 k

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 54 k
Is this ok [y/N]: y

$ convert –version
Version: ImageMagick 6.5.5-6 2009-09-05 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

$ convert logo: logo.gif
$ ls -ltar
合計 52
drwxrwxr-x 15 sane sane  4096 10月 19 01:43 ..
-rw-rw-r–  1 sane sane   114 10月 19 01:44 test.rb
-rw-rw-r–  1 sane sane 38341 10月 19 01:59 logo.gif
drwxrwxr-x  2 sane sane  4096 10月 19 01:59 .

$ vi test.rb

require ‘rubygems’
require ‘RMagick’
img = Magick::ImageList.new(‘logo.gif’)
img.resize(100, 100).write(‘new.gif’)

$ ruby test.rb

$ ls -ltar
合計 56
drwxrwxr-x 15 sane sane  4096 10月 19 01:43 ..
-rw-rw-r–  1 sane sane 38341 10月 19 01:59 logo.gif
-rw-rw-r–  1 sane sane   115 10月 19 01:59 test.rb
-rw-rw-r–  1 sane sane  3681 10月 19 01:59 new.gif
drwxrwxr-x  2 sane sane  4096 10月 19 01:59 .

やったね!
teratermからだから画像見えないけど

$ sudo gem list objectdetect –both

*** LOCAL GEMS ***

*** REMOTE GEMS ***

objectdetect (0.0.3)

$ sudo gem install objectdetect
Building native extensions.  This could take a while…
Successfully installed objectdetect-0.0.3
1 gem installed
Installing ri documentation for objectdetect-0.0.3…
Installing RDoc documentation for objectdetect-0.0.3…

完了
あとであそぶ

反省?
$ view /etc/redhat-release

CentOS release 5.2 (Final)

手元の環境がCentOS5.2だったのをおもいだした
いまさら遅いけど yum では exclude=*el5_3*にしておいたほうがよかったかもしれない

参考リンク
MacOSX に OpenCV を入れて ruby で遊んでみる – Where he came from, and where he is going to go?
ImageMagick (RMagick)をMacにインストール:Goodpic
CentOS 4.4にRMagick をインストールする | 山本隆の開発日誌
RMagick のインストール – まゆの日記
CentOS4で3gp→Flvを変換(ffmpeg) 前編 | データセンターの専用サーバ データセンターダイレクト ブログ
Convertコマンドを使う (ImageMagick事始め) :: Blue Pill
floatingdays: CentOSに yumで FFmpegをインストール
Webコピペ屋::CentOS5にOpenCVをインストール
Webコピペ屋::CentOS5にyumでffmpegをインストール
RMagickをインストールしてみる(Windows) | Katawara.*

広告

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト / 変更 )

Twitter 画像

Twitter アカウントを使ってコメントしています。 ログアウト / 変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト / 変更 )

Google+ フォト

Google+ アカウントを使ってコメントしています。 ログアウト / 変更 )

%s と連携中