SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
use strict;
use warnings;
use Imager;

my $file = 'doya.jpg';
my $image = Imager->new( file => $file ) or die Imager->errstr;
$image = $image->scale( xpixels => 100 );
$image->write( file => 'out.jpg' ) or die $image->errstr;
...;
my $image = Imager->new( file => $file ) or die Imager->errstr;
$image = $image->scale( xpixels => 100 );
$image = $image->crop( height => 100 ); #
$image->write( file => 'out.jpg' ) or die $image->errstr;
...;
sub get_map {
    my $gamma = shift;
    my @map =
          map { int( 0.5 + 255 * ( $_ / 255 )**$gamma ) } 0 .. 255;
    return @map;
}

$image->map(
    red   => get_map(0.5),
    green => get_map(0.65),
    blue => get_map(0.8)
);




my $waku = Imager->new( file => 'waku.png' );
$image->rubthrough( src => $waku );
...;
my $font = Imager::Font->new( file => 'HiraKakuPro-W3.ttf' );
...;
...;
       my $qrcode = Imager::QRCode->new(
           size          => 3,
           margin        => 0,
           version       => 1,
           level         => 'M',
           casesensitive => 1,
           lightcolor    => Imager::Color->new( 255, 255, 255 ),
           darkcolor     => Imager::Color->new( 35, 54, 92 ),
       );
       my $qr = $qrcode->plot( $text );
       $qr = $qr->scale( xpixels => 90 );
       $image = $image->paste( left => 590, top => 198, src => $qr );

...;
ff
...;
       my $diff = $org->difference( other => $numbers[$n] );
       $diff = $diff->to_rgb8;
       my $count;
       for ( my $x = 0 ; $x < $width ; $x++ ) {
           for ( my $y = 0 ; $y < 38 ; $y++ ) {
               my $pixel = $diff->getpixel( x => $x, y => $y );
               next unless $pixel;
               my $result = $pixel->rgba;
               $count++ if $result == 255;
           }
       }
...;
use Imager;
use Image::ObjectDetect;

my   $image      =   Imager->new->read( file => 'picture.jpg' );
my   $cascade    =   './haarcascade_frontalface_alt2.xml';
my   $detector   =   Image::ObjectDetect->new($cascade);
my   @faces      =   $detector->detect($file); #←
my $purple_source = Imager->new->read(file => './purple.png');
my $aspect = 1.5;
for my $face (@faces) {
    my $purple = $purple_source->scale(
        xpixels => $face->{width} / $aspect,
        ypixels => $face->{height} / $aspect,
    );
    $image->rubthrough(
        tx => $face->{width} / $aspect / 2 + $face->{x},
        ty => $face->{height} / $aspect + $face->{y},
        src => $purple,
    );
}
$image->write( file => './output.jpg' );
•
    –
    –
•
    –
    –
•
•
    –
        •
    –
        •
•
    –
        •
        •
        •
use Acme::Porn::JP;

…;

my $porn = Acme::Porn::JP->new;
my $actress_list = $porn->actress();
for my $actress ( @$actress_list ){
    search("$query $actress”);
}

…;

$ perl -MAcme::Porn::JP -e '$p = Ace::Porn::JP->new; print
scalar @{$p->actress};’
4502
•
•
    –
    –
•
•
    –
•
        positive.dat
        [filename]	
  [#	
  of	
  objects]	
  [[x	
  y	
  width	
  height]	
  [...	
  2nd	
  object]	
  ...]
        images/01.jpg	
  1	
  140	
  100	
  45	
  45

        nega%ve.dat
        images/neg-­‐01.jpg
        images/neg-­‐02.jpg
画像Hacks
画像Hacks
画像Hacks
画像Hacks
画像Hacks
画像Hacks
画像Hacks

Contenu connexe

Tendances

Perl使いの国のRubyist
Perl使いの国のRubyistPerl使いの国のRubyist
Perl使いの国のRubyistTakafumi ONAKA
 
Doctrine fixtures
Doctrine fixturesDoctrine fixtures
Doctrine fixturesBill Chang
 
The Art of Transduction
The Art of TransductionThe Art of Transduction
The Art of TransductionDavid Stockton
 
PHP for Python Developers
PHP for Python DevelopersPHP for Python Developers
PHP for Python DevelopersCarlos Vences
 
Coding Horrors
Coding HorrorsCoding Horrors
Coding HorrorsMark Baker
 
11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrari11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrariRazvan Raducanu, PhD
 
Crazy things done on PHP
Crazy things done on PHPCrazy things done on PHP
Crazy things done on PHPTaras Kalapun
 
PHP object calisthenics
PHP object calisthenicsPHP object calisthenics
PHP object calisthenicsGiorgio Cefaro
 
Автотесты для картинок
Автотесты для картинокАвтотесты для картинок
Автотесты для картинокPetr Trofimov
 
Perlで実装されたLINE NEWSの裏側
Perlで実装されたLINE NEWSの裏側Perlで実装されたLINE NEWSの裏側
Perlで実装されたLINE NEWSの裏側LINE Corporation
 
Et si on en finissait avec CRUD ?
Et si on en finissait avec CRUD ?Et si on en finissait avec CRUD ?
Et si on en finissait avec CRUD ?Julien Vinber
 
Code moi une RH! (PHP tour 2017)
Code moi une RH! (PHP tour 2017)Code moi une RH! (PHP tour 2017)
Code moi une RH! (PHP tour 2017)Arnaud Langlade
 
Devs for Leokz e 7Masters - WTF Oriented Programming
Devs for Leokz e 7Masters - WTF Oriented ProgrammingDevs for Leokz e 7Masters - WTF Oriented Programming
Devs for Leokz e 7Masters - WTF Oriented ProgrammingFabio Akita
 
The Truth About Lambdas in PHP
The Truth About Lambdas in PHPThe Truth About Lambdas in PHP
The Truth About Lambdas in PHPSharon Levy
 
Google Visualization API
Google  Visualization  APIGoogle  Visualization  API
Google Visualization APIJason Young
 

Tendances (20)

Perl使いの国のRubyist
Perl使いの国のRubyistPerl使いの国のRubyist
Perl使いの国のRubyist
 
Doctrine fixtures
Doctrine fixturesDoctrine fixtures
Doctrine fixtures
 
The Art of Transduction
The Art of TransductionThe Art of Transduction
The Art of Transduction
 
PHP for Python Developers
PHP for Python DevelopersPHP for Python Developers
PHP for Python Developers
 
Coding Horrors
Coding HorrorsCoding Horrors
Coding Horrors
 
11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrari11. CodeIgniter vederea unei singure inregistrari
11. CodeIgniter vederea unei singure inregistrari
 
Crazy things done on PHP
Crazy things done on PHPCrazy things done on PHP
Crazy things done on PHP
 
PHP object calisthenics
PHP object calisthenicsPHP object calisthenics
PHP object calisthenics
 
Автотесты для картинок
Автотесты для картинокАвтотесты для картинок
Автотесты для картинок
 
12. edit record
12. edit record12. edit record
12. edit record
 
11. delete record
11. delete record11. delete record
11. delete record
 
10. view one record
10. view one record10. view one record
10. view one record
 
8. vederea inregistrarilor
8. vederea inregistrarilor8. vederea inregistrarilor
8. vederea inregistrarilor
 
Perlで実装されたLINE NEWSの裏側
Perlで実装されたLINE NEWSの裏側Perlで実装されたLINE NEWSの裏側
Perlで実装されたLINE NEWSの裏側
 
Et si on en finissait avec CRUD ?
Et si on en finissait avec CRUD ?Et si on en finissait avec CRUD ?
Et si on en finissait avec CRUD ?
 
Code moi une RH! (PHP tour 2017)
Code moi une RH! (PHP tour 2017)Code moi une RH! (PHP tour 2017)
Code moi une RH! (PHP tour 2017)
 
Devs for Leokz e 7Masters - WTF Oriented Programming
Devs for Leokz e 7Masters - WTF Oriented ProgrammingDevs for Leokz e 7Masters - WTF Oriented Programming
Devs for Leokz e 7Masters - WTF Oriented Programming
 
The Truth About Lambdas in PHP
The Truth About Lambdas in PHPThe Truth About Lambdas in PHP
The Truth About Lambdas in PHP
 
Google Visualization API
Google  Visualization  APIGoogle  Visualization  API
Google Visualization API
 
Database api
Database apiDatabase api
Database api
 

En vedette

Transformative Web Design ~変化にしなやかに対応するデザイン力~
Transformative Web Design ~変化にしなやかに対応するデザイン力~Transformative Web Design ~変化にしなやかに対応するデザイン力~
Transformative Web Design ~変化にしなやかに対応するデザイン力~Yasuhisa Hasegawa
 
解析データの分析と活用
解析データの分析と活用解析データの分析と活用
解析データの分析と活用Keisuke Anzai
 
マークアップエンジニア だからうれしい Fireworksの使い方あれこれ
マークアップエンジニア だからうれしい Fireworksの使い方あれこれマークアップエンジニア だからうれしい Fireworksの使い方あれこれ
マークアップエンジニア だからうれしい Fireworksの使い方あれこれNaoki Matsuda
 
WordPressコミュニティの魅力 | OSC Nagoya 2012 WordBench Nagoya
WordPressコミュニティの魅力 | OSC Nagoya 2012 WordBench NagoyaWordPressコミュニティの魅力 | OSC Nagoya 2012 WordBench Nagoya
WordPressコミュニティの魅力 | OSC Nagoya 2012 WordBench Nagoyatakashi ono
 
リサーチャーとマーケター原稿2012326
リサーチャーとマーケター原稿2012326リサーチャーとマーケター原稿2012326
リサーチャーとマーケター原稿2012326Shigeru Kishikawa
 
最新開発支援ツールを使ったデバッグ対応
最新開発支援ツールを使ったデバッグ対応最新開発支援ツールを使ったデバッグ対応
最新開発支援ツールを使ったデバッグ対応Osamu Monoe
 
デザイナーがエンジニアさんと楽しくデザイン実装の話をするために
デザイナーがエンジニアさんと楽しくデザイン実装の話をするためにデザイナーがエンジニアさんと楽しくデザイン実装の話をするために
デザイナーがエンジニアさんと楽しくデザイン実装の話をするためにChihiro Tomita
 
3D printing for Development Hack Day in Bucharest, session 1
3D printing for Development Hack Day in Bucharest, session 13D printing for Development Hack Day in Bucharest, session 1
3D printing for Development Hack Day in Bucharest, session 1Asociatia Techsoup Romania
 
Debugging mobile websites and web apps
Debugging mobile websites and web appsDebugging mobile websites and web apps
Debugging mobile websites and web appsMihai Corlan
 
WebフレームワークXSS対策の自動化
WebフレームワークXSS対策の自動化WebフレームワークXSS対策の自動化
WebフレームワークXSS対策の自動化Yoshihiro Ura
 
Simple Pure Java
Simple Pure JavaSimple Pure Java
Simple Pure JavaAnton Keks
 
『デザイニング・インターフェース』読書会資料
『デザイニング・インターフェース』読書会資料『デザイニング・インターフェース』読書会資料
『デザイニング・インターフェース』読書会資料Noriyo Asano
 
Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012Ryan Stewart
 
これから求められるWebコミュニケーションスキル 〜今日から始めるプロトタイプデザイン
これから求められるWebコミュニケーションスキル 〜今日から始めるプロトタイプデザインこれから求められるWebコミュニケーションスキル 〜今日から始めるプロトタイプデザイン
これから求められるWebコミュニケーションスキル 〜今日から始めるプロトタイプデザインYasuhisa Hasegawa
 
6 Key Elements to a Good Website
6 Key Elements to a Good Website6 Key Elements to a Good Website
6 Key Elements to a Good WebsiteWebs
 
デジタルインテリジェンスの「構想力」
デジタルインテリジェンスの「構想力」デジタルインテリジェンスの「構想力」
デジタルインテリジェンスの「構想力」Digital Intelligence Inc.
 
【16-D-4】3分ではじめるスマホアプリのビジュアル開発
【16-D-4】3分ではじめるスマホアプリのビジュアル開発【16-D-4】3分ではじめるスマホアプリのビジュアル開発
【16-D-4】3分ではじめるスマホアプリのビジュアル開発hmimura_embarcadero
 

En vedette (20)

Transformative Web Design ~変化にしなやかに対応するデザイン力~
Transformative Web Design ~変化にしなやかに対応するデザイン力~Transformative Web Design ~変化にしなやかに対応するデザイン力~
Transformative Web Design ~変化にしなやかに対応するデザイン力~
 
解析データの分析と活用
解析データの分析と活用解析データの分析と活用
解析データの分析と活用
 
マークアップエンジニア だからうれしい Fireworksの使い方あれこれ
マークアップエンジニア だからうれしい Fireworksの使い方あれこれマークアップエンジニア だからうれしい Fireworksの使い方あれこれ
マークアップエンジニア だからうれしい Fireworksの使い方あれこれ
 
WordPressコミュニティの魅力 | OSC Nagoya 2012 WordBench Nagoya
WordPressコミュニティの魅力 | OSC Nagoya 2012 WordBench NagoyaWordPressコミュニティの魅力 | OSC Nagoya 2012 WordBench Nagoya
WordPressコミュニティの魅力 | OSC Nagoya 2012 WordBench Nagoya
 
リサーチャーとマーケター原稿2012326
リサーチャーとマーケター原稿2012326リサーチャーとマーケター原稿2012326
リサーチャーとマーケター原稿2012326
 
最新開発支援ツールを使ったデバッグ対応
最新開発支援ツールを使ったデバッグ対応最新開発支援ツールを使ったデバッグ対応
最新開発支援ツールを使ったデバッグ対応
 
The Craft of UX
The Craft of UXThe Craft of UX
The Craft of UX
 
デザイナーがエンジニアさんと楽しくデザイン実装の話をするために
デザイナーがエンジニアさんと楽しくデザイン実装の話をするためにデザイナーがエンジニアさんと楽しくデザイン実装の話をするために
デザイナーがエンジニアさんと楽しくデザイン実装の話をするために
 
3D printing for Development Hack Day in Bucharest, session 1
3D printing for Development Hack Day in Bucharest, session 13D printing for Development Hack Day in Bucharest, session 1
3D printing for Development Hack Day in Bucharest, session 1
 
Debugging mobile websites and web apps
Debugging mobile websites and web appsDebugging mobile websites and web apps
Debugging mobile websites and web apps
 
WebフレームワークXSS対策の自動化
WebフレームワークXSS対策の自動化WebフレームワークXSS対策の自動化
WebフレームワークXSS対策の自動化
 
Simple Pure Java
Simple Pure JavaSimple Pure Java
Simple Pure Java
 
『デザイニング・インターフェース』読書会資料
『デザイニング・インターフェース』読書会資料『デザイニング・インターフェース』読書会資料
『デザイニング・インターフェース』読書会資料
 
Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012Developing with Phonegap - Adobe Refresh 2012
Developing with Phonegap - Adobe Refresh 2012
 
言語の世界
言語の世界言語の世界
言語の世界
 
これから求められるWebコミュニケーションスキル 〜今日から始めるプロトタイプデザイン
これから求められるWebコミュニケーションスキル 〜今日から始めるプロトタイプデザインこれから求められるWebコミュニケーションスキル 〜今日から始めるプロトタイプデザイン
これから求められるWebコミュニケーションスキル 〜今日から始めるプロトタイプデザイン
 
6 Key Elements to a Good Website
6 Key Elements to a Good Website6 Key Elements to a Good Website
6 Key Elements to a Good Website
 
JavaFX
JavaFXJavaFX
JavaFX
 
デジタルインテリジェンスの「構想力」
デジタルインテリジェンスの「構想力」デジタルインテリジェンスの「構想力」
デジタルインテリジェンスの「構想力」
 
【16-D-4】3分ではじめるスマホアプリのビジュアル開発
【16-D-4】3分ではじめるスマホアプリのビジュアル開発【16-D-4】3分ではじめるスマホアプリのビジュアル開発
【16-D-4】3分ではじめるスマホアプリのビジュアル開発
 

Similaire à 画像Hacks

Taking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsTaking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsDavid Golden
 
Simple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlSimple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlKent Cowgill
 
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014Amazon Web Services
 
究極のコントローラを目指す
究極のコントローラを目指す究極のコントローラを目指す
究極のコントローラを目指すYasuo Harada
 
WordPress-Powered Portfolios
WordPress-Powered PortfoliosWordPress-Powered Portfolios
WordPress-Powered PortfoliosTyler Sticka
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked aboutTatsuhiko Miyagawa
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)Jeff Eaton
 
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Masahiro Nagano
 
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Topological indices (t is) of the graphs  to seek qsar models of proteins com...Topological indices (t is) of the graphs  to seek qsar models of proteins com...
Topological indices (t is) of the graphs to seek qsar models of proteins com...Jitendra Kumar Gupta
 
Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Michael Schwern
 
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find FraudstersTeaching Your Machine To Find Fraudsters
Teaching Your Machine To Find FraudstersIan Barber
 
Ten modules I haven't yet talked about
Ten modules I haven't yet talked aboutTen modules I haven't yet talked about
Ten modules I haven't yet talked aboutacme
 
Developing applications for performance
Developing applications for performanceDeveloping applications for performance
Developing applications for performanceLeon Fayer
 

Similaire à 画像Hacks (20)

Daily notes
Daily notesDaily notes
Daily notes
 
Taking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order FunctionsTaking Perl to Eleven with Higher-Order Functions
Taking Perl to Eleven with Higher-Order Functions
 
Simple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlSimple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with Perl
 
Lithium Best
Lithium Best Lithium Best
Lithium Best
 
Bag of tricks
Bag of tricksBag of tricks
Bag of tricks
 
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
 
究極のコントローラを目指す
究極のコントローラを目指す究極のコントローラを目指す
究極のコントローラを目指す
 
WordPress-Powered Portfolios
WordPress-Powered PortfoliosWordPress-Powered Portfolios
WordPress-Powered Portfolios
 
wget.pl
wget.plwget.pl
wget.pl
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Php
PhpPhp
Php
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
Designing Opeation Oriented Web Applications / YAPC::Asia Tokyo 2011
 
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Topological indices (t is) of the graphs  to seek qsar models of proteins com...Topological indices (t is) of the graphs  to seek qsar models of proteins com...
Topological indices (t is) of the graphs to seek qsar models of proteins com...
 
logic321
logic321logic321
logic321
 
Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)
 
mro-every.pdf
mro-every.pdfmro-every.pdf
mro-every.pdf
 
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find FraudstersTeaching Your Machine To Find Fraudsters
Teaching Your Machine To Find Fraudsters
 
Ten modules I haven't yet talked about
Ten modules I haven't yet talked aboutTen modules I haven't yet talked about
Ten modules I haven't yet talked about
 
Developing applications for performance
Developing applications for performanceDeveloping applications for performance
Developing applications for performance
 

Plus de Yusuke Wada

僕がつくった 70個のうちの48個のWebサービス達
僕がつくった 70個のうちの48個のWebサービス達僕がつくった 70個のうちの48個のWebサービス達
僕がつくった 70個のうちの48個のWebサービス達Yusuke Wada
 
スッとGoを取り入れる
スッとGoを取り入れるスッとGoを取り入れる
スッとGoを取り入れるYusuke Wada
 
東京脱出計画中
東京脱出計画中東京脱出計画中
東京脱出計画中Yusuke Wada
 
Extreme remote working
Extreme remote workingExtreme remote working
Extreme remote workingYusuke Wada
 
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPANPodcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPANYusuke Wada
 
創造のプロセスを回せ!v0.01
創造のプロセスを回せ!v0.01創造のプロセスを回せ!v0.01
創造のプロセスを回せ!v0.01Yusuke Wada
 
It's not only about "REMOTE"
It's not only about "REMOTE"It's not only about "REMOTE"
It's not only about "REMOTE"Yusuke Wada
 
事故からはじまるスケールチャンス
事故からはじまるスケールチャンス事故からはじまるスケールチャンス
事故からはじまるスケールチャンスYusuke Wada
 
Google BigQueryを使ってみた!
Google BigQueryを使ってみた!Google BigQueryを使ってみた!
Google BigQueryを使ってみた!Yusuke Wada
 
Webサービスのコンテンツパターン 或いはデータの活⽤
Webサービスのコンテンツパターン 或いはデータの活⽤Webサービスのコンテンツパターン 或いはデータの活⽤
Webサービスのコンテンツパターン 或いはデータの活⽤Yusuke Wada
 
とある Perl Monger の働き方
とある Perl Monger の働き方とある Perl Monger の働き方
とある Perl Monger の働き方Yusuke Wada
 
5 minutes - YAPC::Asia Tokyo 2014
5 minutes - YAPC::Asia Tokyo 20145 minutes - YAPC::Asia Tokyo 2014
5 minutes - YAPC::Asia Tokyo 2014Yusuke Wada
 
Podcastをカジュアルに 支える技術
Podcastをカジュアルに 支える技術Podcastをカジュアルに 支える技術
Podcastをカジュアルに 支える技術Yusuke Wada
 
The master plan of scaling a web application
The master plan ofscaling a web applicationThe master plan ofscaling a web application
The master plan of scaling a web applicationYusuke Wada
 
そのWebサービスは本当に「あたりまえ」だったのか?
そのWebサービスは本当に「あたりまえ」だったのか?そのWebサービスは本当に「あたりまえ」だったのか?
そのWebサービスは本当に「あたりまえ」だったのか?Yusuke Wada
 
Mojoliciousでつくる! Webアプリ入門
Mojoliciousでつくる! Webアプリ入門Mojoliciousでつくる! Webアプリ入門
Mojoliciousでつくる! Webアプリ入門Yusuke Wada
 
10 things to learn from Bokete
10 things to learn from Bokete10 things to learn from Bokete
10 things to learn from BoketeYusuke Wada
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and othersYusuke Wada
 
僕らの履歴書
僕らの履歴書僕らの履歴書
僕らの履歴書Yusuke Wada
 
僕らがWebサービスをつくる5つの理由
僕らがWebサービスをつくる5つの理由僕らがWebサービスをつくる5つの理由
僕らがWebサービスをつくる5つの理由Yusuke Wada
 

Plus de Yusuke Wada (20)

僕がつくった 70個のうちの48個のWebサービス達
僕がつくった 70個のうちの48個のWebサービス達僕がつくった 70個のうちの48個のWebサービス達
僕がつくった 70個のうちの48個のWebサービス達
 
スッとGoを取り入れる
スッとGoを取り入れるスッとGoを取り入れる
スッとGoを取り入れる
 
東京脱出計画中
東京脱出計画中東京脱出計画中
東京脱出計画中
 
Extreme remote working
Extreme remote workingExtreme remote working
Extreme remote working
 
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPANPodcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
Podcastを支える技術、エンジニアのためのWebメディア、そしてCPAN
 
創造のプロセスを回せ!v0.01
創造のプロセスを回せ!v0.01創造のプロセスを回せ!v0.01
創造のプロセスを回せ!v0.01
 
It's not only about "REMOTE"
It's not only about "REMOTE"It's not only about "REMOTE"
It's not only about "REMOTE"
 
事故からはじまるスケールチャンス
事故からはじまるスケールチャンス事故からはじまるスケールチャンス
事故からはじまるスケールチャンス
 
Google BigQueryを使ってみた!
Google BigQueryを使ってみた!Google BigQueryを使ってみた!
Google BigQueryを使ってみた!
 
Webサービスのコンテンツパターン 或いはデータの活⽤
Webサービスのコンテンツパターン 或いはデータの活⽤Webサービスのコンテンツパターン 或いはデータの活⽤
Webサービスのコンテンツパターン 或いはデータの活⽤
 
とある Perl Monger の働き方
とある Perl Monger の働き方とある Perl Monger の働き方
とある Perl Monger の働き方
 
5 minutes - YAPC::Asia Tokyo 2014
5 minutes - YAPC::Asia Tokyo 20145 minutes - YAPC::Asia Tokyo 2014
5 minutes - YAPC::Asia Tokyo 2014
 
Podcastをカジュアルに 支える技術
Podcastをカジュアルに 支える技術Podcastをカジュアルに 支える技術
Podcastをカジュアルに 支える技術
 
The master plan of scaling a web application
The master plan ofscaling a web applicationThe master plan ofscaling a web application
The master plan of scaling a web application
 
そのWebサービスは本当に「あたりまえ」だったのか?
そのWebサービスは本当に「あたりまえ」だったのか?そのWebサービスは本当に「あたりまえ」だったのか?
そのWebサービスは本当に「あたりまえ」だったのか?
 
Mojoliciousでつくる! Webアプリ入門
Mojoliciousでつくる! Webアプリ入門Mojoliciousでつくる! Webアプリ入門
Mojoliciousでつくる! Webアプリ入門
 
10 things to learn from Bokete
10 things to learn from Bokete10 things to learn from Bokete
10 things to learn from Bokete
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
 
僕らの履歴書
僕らの履歴書僕らの履歴書
僕らの履歴書
 
僕らがWebサービスをつくる5つの理由
僕らがWebサービスをつくる5つの理由僕らがWebサービスをつくる5つの理由
僕らがWebサービスをつくる5つの理由
 

Dernier

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Dernier (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

画像Hacks

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. use strict; use warnings; use Imager; my $file = 'doya.jpg'; my $image = Imager->new( file => $file ) or die Imager->errstr; $image = $image->scale( xpixels => 100 ); $image->write( file => 'out.jpg' ) or die $image->errstr;
  • 6. ...; my $image = Imager->new( file => $file ) or die Imager->errstr; $image = $image->scale( xpixels => 100 ); $image = $image->crop( height => 100 ); # $image->write( file => 'out.jpg' ) or die $image->errstr; ...;
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. sub get_map { my $gamma = shift; my @map = map { int( 0.5 + 255 * ( $_ / 255 )**$gamma ) } 0 .. 255; return @map; } $image->map( red => get_map(0.5), green => get_map(0.65), blue => get_map(0.8) ); my $waku = Imager->new( file => 'waku.png' ); $image->rubthrough( src => $waku );
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. ...; my $font = Imager::Font->new( file => 'HiraKakuPro-W3.ttf' ); ...;
  • 21. ...; my $qrcode = Imager::QRCode->new( size => 3, margin => 0, version => 1, level => 'M', casesensitive => 1, lightcolor => Imager::Color->new( 255, 255, 255 ), darkcolor => Imager::Color->new( 35, 54, 92 ), ); my $qr = $qrcode->plot( $text ); $qr = $qr->scale( xpixels => 90 ); $image = $image->paste( left => 590, top => 198, src => $qr ); ...;
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. ...; my $diff = $org->difference( other => $numbers[$n] ); $diff = $diff->to_rgb8; my $count; for ( my $x = 0 ; $x < $width ; $x++ ) { for ( my $y = 0 ; $y < 38 ; $y++ ) { my $pixel = $diff->getpixel( x => $x, y => $y ); next unless $pixel; my $result = $pixel->rgba; $count++ if $result == 255; } } ...;
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. use Imager; use Image::ObjectDetect; my $image = Imager->new->read( file => 'picture.jpg' ); my $cascade = './haarcascade_frontalface_alt2.xml'; my $detector = Image::ObjectDetect->new($cascade); my @faces = $detector->detect($file); #← my $purple_source = Imager->new->read(file => './purple.png'); my $aspect = 1.5; for my $face (@faces) { my $purple = $purple_source->scale( xpixels => $face->{width} / $aspect, ypixels => $face->{height} / $aspect, ); $image->rubthrough( tx => $face->{width} / $aspect / 2 + $face->{x}, ty => $face->{height} / $aspect + $face->{y}, src => $purple, ); } $image->write( file => './output.jpg' );
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40. – – • – –
  • 41. • • – • – • • – • • •
  • 42. use Acme::Porn::JP; …; my $porn = Acme::Porn::JP->new; my $actress_list = $porn->actress(); for my $actress ( @$actress_list ){ search("$query $actress”); } …; $ perl -MAcme::Porn::JP -e '$p = Ace::Porn::JP->new; print scalar @{$p->actress};’ 4502
  • 43.
  • 44. • • – – • • – • positive.dat [filename]  [#  of  objects]  [[x  y  width  height]  [...  2nd  object]  ...] images/01.jpg  1  140  100  45  45 nega%ve.dat images/neg-­‐01.jpg images/neg-­‐02.jpg