Upgrade to Pro — share decks privately, control downloads, hide ads and more …

フリルの商品を色で検索できるようにした話

shoby
March 22, 2016

 フリルの商品を色で検索できるようにした話

Fashion Tech meetup #2 の発表資料です。 http://fashion-tech.connpass.com/event/28335

shoby

March 22, 2016
Tweet

More Decks by shoby

Other Decks in Technology

Transcript

  1. 

  2. ͳ࣮ͥ૷ͨ͠ͷ͔ w ৭Λج४ʹ෰Λങ͏ͱ͍͏Ϣʔβʔ͕ଟ͍͘Δ w Ξϯέʔτ w ΠϯλϏϡʔ w ݕࡧΩʔϫʔυ w

    ϑϦϧΛϑΝογϣϯʹಛԽ͍ͤͨ͞ w ঁੑ޲͚ϑϦϚΞϓϦˠϑΝογϣϯϑϦϚΞϓϦ w ϑΝογϣϯʹಛԽͨ͠ݕࡧػೳ 
  3. ͳͥ৭ʁ w ਓؒͷ৭ೝࣝʹؔ͢Δݚڀ<> w جຊͱͳΔ৭͸͋ΒΏΔݴޠʹଘࡏ͠ɺීวత w ϨουɺΠΤϩʔɺάϦʔϯɺϒϧʔɺΦϨϯδɺύʔ ϓϧɺϐϯΫɺϒϥ΢ϯɺάϨʔɺϒϥοΫɺϗϫΠ τ w

    ϢʔβʔͷݕࡧΫΤϦ w ৭໊ΛؚΉݕࡧΫΤϦΛଟ͍ॱʹྻڍ w جຊͷ৭ʹ౷߹ʢྫɿΩϟϝϧˠϒϥ΢ϯʣ w ౷߹͢Δͱҧ࿨ײͷ͋Δϕʔδϡ͸࢒ͨ͠  <>#FSMJO#BOE,BZ1 l#BTJD$PMPS5FSNT5IFJS6OJWFSTBMJUZBOE&WPMVUJPOz
  4. ϗϫΠτόϥϯεͷௐ੔ w ܬޫ౮ͰࡱӨ͞Εͨը૾ͷ৭Λิਖ਼ w ܬޫ౮͸྘ͷ੒෼͕ଟ͘ɺը૾͕྘͕͔Δ w ϑϦϧͷ঎඼͸ࣨ಺ࡱӨ͕ଟ͍ w 3FUJOFY<> w

    ਓؒͷࢹ֮ಛੑΛϞσϧԽͨ͠ख๏ w Ճ޻͞Εͨը૾͸৭ຯ͕มԽ͠ͳ͍  <>&-BOEBOE+.D$BOO l-JHIUOFTTBOE3FUJOFYUIFPSZ z
  5. require 'RMagick' image = ImageList.new('image.jpg') red_extrema = image.channel_extrema(Magick::RedChannel) green_extrema =

    image.channel_extrema(Magick::GreenChannel) blue_extrema = image.channel_extrema(Magick::BlueChannel) red_max = red_extrema.last.to_f green_max = green_extrema.last.to_f blue_max = blue_extrema.last.to_f white_balanced_image = image white_balanced_image = white_balanced_image.convolve_channel(1, [green_max / red_max], Magick::RedChannel) white_balanced_image = white_balanced_image.convolve_channel(1, [green_max / blue_max], Magick::BlueChannel)  3.BHJDLʹΑΔ3FUJOFY
  6. 3(#஋ͱΧϥʔύϨοτͷϚονϯά w ݕग़ͨ͠ΧϥʔίʔυΛ৭ʹׂΓ౰ͯΔ w   ʢ  ʣˠ w

    3(#஋ͱ৭໊ͷରԠ෇͚ௐࠪ<>Λར༻ w 3(#஋ͷ ৭ͷ৭໊͕෼͔Δ w )4-ʹม׵ޙɺ֤৭໊ͷ)4-ͷൣғΛར༻ͨ͠ w Ϛονϯάॲཧ w 3(#஋Λ)4-ʹม׵ w )4-͔Β࠷΋͍ۙΧϥʔύϨοτΛબͿ  IUUQCMPHYLDEDPNDPMPSTVSWFZSFTVMUT
  7. ݕग़ਫ਼౓ w ϝδϟʔͳΧςΰϦͰ঎඼Λ໨ࢹνΣοΫ w ฏۉͰ͸ͱ௿Ί w ग़඼͕ଟ͍৭͸·ͣ·ͣ w ϒϥοΫɿ w

    Ϩουɿ w ϐϯΫɿ w ϗϫΠτɿ w ग़඼͕গͳ͍৭͸ϊΠζͷׂ߹͕ଟ͘ͳΔ 
  8. ·ͱΊ w ৭Ͱ঎඼ΛߜΓࠐΊΔ৭ݕࡧΛ࣮૷ͨ͠ w ϢʔβʔͷߪೖߦಈΛௐࠪ͠ɺ৽͍͠ϑϦϧ ͷϑΝογϣϯಛԽػೳͱ࣮ͯ͠૷ w ΧϥʔύϨοτ͸৭ೝ஌ͷݚڀΛϕʔεʹϢʔ βʔͷݕࡧΫΤϦΛ౷߹ͯ͠৭ʹͨ͠ w

    ৭ิਖ਼ɺഎܠը૾ͷ࡟আΛߦ͍ɺը૾ͷதԝ ෦෼͔Β3(#৭Λݕग़͠ɺ৭ʹϚοϐϯά w ৭ݕࡧʹΑΓɺΩʔϫʔυΑΓ΋໨తͷ঎඼ ʹͨͲΓண͖΍͘͢ͳͬͨ