ã2022.9ã«ãã¼ã¸ã§ã³ã¢ãããããããã« 2022.11 ã«ãã¤ãã¼ãã¼ã¸ã§ã³ã¢ãããè¡ã£ããImageJ å¯¾å¿ æ°ã»è¼åº¦ãã¹ã¯ä½æãã¼ã«ããä»åãã¼ã¸ã§ã³ã¢ãããã¾ãã
ãä»åã®å¤æ´ã¯ãã¾ã 32bit ç»åã¸ã®å¯¾å¿ãããã«ãé©ç¨æ度ç¯å²ã®å¶éãè¡ããªããªãã·ã§ã³ãã¤ãããã¨ãããã«ããã¹ã¯ã®éé度ãèªåçã«èª¿æ´è¨ç®ããæ©è½ãã¤ãããã¨ã§ããä½ããå ¥åããã¯ã¹ã«å¤ãä¸æ¸ãå ¥åãããã¨ã§ãéé度ãããã¥ã¢ã«ã§æå®ãããã¨ãã§ãã¾ãããã®è¾ºãéå»ã®ãã¼ã¸ã§ã³ã¨åä½ãå¤ãã£ã¦ãã¾ãã
ããªããå½ç¶ãªããæ¬ãã¼ã«ãåä½ãããã«ã¯ ImageJ ã®å°å ¥ãåæã«ãªãã¾ããã¾ããæ¬ãã¼ã«ã§ä½æãããã¹ã¯ç»åã¯ãGIMP, Photoshop, Krita çãã¬ã¤ã¤ã¼ç·¨éããµãã¼ããã¦ããç»åå¦çã½ããã«ã¦åºããå©ç¨ããã ãã¾ããImageJ ã®å°å ¥æ¹æ³ã«ã¤ãã¦ã¯ããã¡ãããåç §ãã ããã
ããã®æ°ã»è¼åº¦ãã¹ã¯ã®åºæ¬çãªã¢ã¤ãã£ã¢ã¯ã以åå ¬éããæ±ç¨è²ãã£ã³ãã«ãã¹ã¯ä½æãã¼ã« (âã®ã¡ç¸å¯¾RGBè²ãã¹ã¯ä½æãã¼ã«ã«çºå±) ã®èãæ¹ããã®ã¾ã¾è¼åº¦æ å ±ã«åºã¥ããã°ã¬ã¼ã¹ã±ã¼ã«ç»åã«å¿ç¨ãããã®ã§ããã¤ã¾ããã¦ã¼ã¶ãæå®ããè¼åº¦ã®ç¯å²ã§ãè¼åº¦ã«åºã¥ãã°ã¬ã¼ã¹ã±ã¼ã«ã®ãã¹ã¯ãä½æãããã®ã§ãããã ã°ã¬ã¼ã¹ã±ã¼ã«ãã¹ã¯ã®è¨ç®ã¢ã«ã´ãªãºã ã¯å½ç¶ãªããæ±ç¨è²ãã£ã³ãã«ãã¹ã¯ä½æãã¼ã«ã¨ç°ãªã£ã¦ãã¾ããæ´ã«ãè¼åº¦ã®ã¿ã§ã¯ãªããè²ãã£ã³ãã«ãé¸æãã¦åæ§ãªãã¹ã¯ãä½ããããã«ããªã£ã¦ãã¾ãã
ãä»®ã«ã¦ã¼ã¶ãæå®ããè¼åº¦ç¯å²ã X lower ~ Y upper ã ã¨ããã¨ãè¼åº¦å¤ L ã«å¯¾ã㦠L - X lowerã§ç»åãè¨ç®ããããã«ä¿æ° a ãæãããã®ããã¹ã¯ç»åã¨ãã¾ãããã®æãX lowerå¤ä»¥ä¸ã®ãã¯ã»ã«ã¯ãã¹ã¦ã0 (å ¨æé») ã«ãªãã¾ããa ã®å¤ã¯ããã©ã«ãã§4ã§ãã (ããã¯æ±ç¨è²ãã£ã³ãã«ãã¹ã¯ä½æãã¼ã«ã«åã)ãééä¿æ°ãããããã¨ã§èª¿æ´ãããã¨ãã§ãã¾ãããã¸ãã¹ã¯ã¨ãã¬ãã¹ã¯ãä½æãããã¨ãã§ãã¾ããããã¬ç»åãã¹ã¯ãæ±ããéã¯ã(L - X lower) ÷ a ã®ç»åãå転ãã¦ãã¾ããå ã¿ã«ããã©ã«ã㧠a ã«4ãå ¥ãã¦è¼åº¦å¤ã«æããã®ã¯ãçµé¨çã«ãã¹ã¯ã¨ãã¦ã¯ãã®ç¨åº¦ä¿æ°ããããªãã¨å¹æãèãããã§ãã
ãå ã¿ã«åãã°ã¬ã¼ã¹ã±ã¼ã«ç»åã§ããè¼åº¦ (Luminosity) ã«ãããã®ã¨æ度 (Lightness) ã«ãããã®ãããã¾ãããã®éãã§ãããæ度ã¯åç´ã«R, G, Bå¤ã®å¹³åå¤ã§ã°ã¬ã¼ã¹ã±ã¼ã«ãæ±ãããã®ãããã«å¯¾ãè¼åº¦ã¯Gã«ç´7å²ãRã«ç´2å²ãBã«ç´1å²ã®ã¦ã§ã¤ããã¤ãã¦è¨ç®ããå¤ã§ã°ã¬ã¼ã¹ã±ã¼ã«ç»åãæ±ãããã®ã§ãè¼åº¦ã®æ¹ãä¸è¬ã«äººéã®è¦è¦ã«è¿ãæããã®ç»åãå¾ãããã¨ããã¦ãã¾ããã¦ã§ã¤ãä»ããå ·ä½çãªå²åã¯ã½ããã¦ã§ã¢ãã¨ã«å¤å°ç°ãªã£ã¦ãã¾ãããããã§ã¯ImageJã§ã®ã¦ã§ã¤ãä»ã (ããããPhotoshopãå) ã使ã£ã¦ãã¾ãã
ããã¦ã³ãã¼ãã¯ãã¡ããããé¡ããã¾ãããã¦ã³ãã¼ããããã¡ã¤ã«ã解åããImageJ Fiji ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã®ãã©ã°ã¤ã³ãã£ã¬ã¯ããªã«ã³ãã¼ãããã¨ã§ãImageJã®ãã©ã°ã¤ã³ã¨ãã¦ä½¿ç¨ãããã¨ãã§ãã¾ãã
Â
------------------------
使ç¨æ¹æ³
ãã³ãã¼ããã¨ããã©ã°ã¤ã³ã¡ãã¥ã¼ãããNew Luminosity Mask Makerã¨ããååã§ãã©ã°ã¤ã³ãèµ·åã§ããããã«ãªãã¾ã(ä¸å³)ããªããä»å㯠Ver.ã¯0.25ã¨è¡¨ç¤ºããã¾ã(ä¸ã®ç»é¢ã¨è¥å¹²ç¸éãããã¾ããç»åã®ãªãµã¤ã¯ã«ã§ãã¿ã¾ãã)ã
ãèµ·åããã¨ããã¹ã¯ãä½ããã¡ã¤ã«é¸æãã¤ã¢ãã°ãåºãã®ã§ãèªã¿è¾¼ããã¡ã¤ã«ãæå®ãã¾ãããã¡ã¤ã«ãèªã¿è¾¼ãã å¾ããã£ã³ãã«é¸æãã¤ã¢ãã°ãåºã¾ãããªãã1ãã£ã³ãã«ãããªãã¢ãã¯ãç»åã®å ´åã¯ãå½ç¶ãªãããã®ãã¤ã¢ãã°ã¯ã¹ãããããã¾ããã¾ãåãã¢ãã¯ãç»åã§ã3ãã£ã³ãã«ããå ´åã¯ããã¯ããã®ãã¤ã¢ãã°ã表示ããã¾ããããããã®å ´åã¯ã©ã®ãã£ã³ãã«ãé¸æãã¦ãåãçµæã«ãªãã¾ãã
ãä¸ã¯ããã¹ã¯ãä½ã対象ãã£ã³ãã«ã®é¸æãä¸ã¯ãã®ãã¹ã¯ã®æå¹æ度ç¯å²ãæå®ãããã£ã³ãã«ã®é¸æã§ããé常ã¯ä¸¡è ãåããã¾ãããç®çã«ãã£ã¦ã¯å¤ãããã¨ãå¯è½ã§ããé¸æè¢ã¯ "Lightness" "Luminosity" "Red" "Green" "Blue" ã®5ã¤ã§ãã
ã次ã«ãã©ã¡ã¼ã¿æå®ãã¤ã¢ãã°ãåºã¾ãã1ãã£ã³ãã«ã¢ãã¯ãç»åã®å ´åã¯ããã¡ã¤ã«é¸æãã¤ã¢ãã°ã®æ¬¡ã«ãã®ãã¤ã¢ãã°ãåºã¾ãã
ãããã©ã«ãã¯ãã¬ãã¹ã¯ã«ãã§ãã¯ãå ¥ã£ã¦ãã¾ããããã¬ãã¹ã¯ãä½ãã«ã¯ããã§ãã¯ãã¤ãã¦ãã ãããããã¦ãã¹ã¯ã«å«ã¾ãããè¼åº¦é åãæå®ãã¾ãããã®é åãæå®ããå¤ã¯ã8 bit ç»åç¸å½å¤ (ç¯å² 0~255) ã§æå®ãã¾ããã16bit, 32bit ç»åã®å ´åã¯èªåçã«æç®ããã¾ãã
ãããã«ãã¹ã¯ééä¿æ°(Mask Transparency Factor)ãæå®ãã¾ãããã®å¤ã¯ãã¹ã¯ã調æ´ããªãå ´å (ä¿æ° 1 ã®å ´å) ã«æ¯ã¹ä½åæãã(éé度ãé«ã)ãããã®åæ°ã§ãã2 ãªã 2åæãããããã¨ããæå³ã§ãããªããããã©ã«ãå¤ã¯ããã¹ã¯ã®ãã¤ãããã¯ã¬ã³ã¸ã«å¿ãã¦ãæãæããå ´æã255ã«ããããèªåè¨ç®ããã¾ããããããã¹ã¯ã®éé度ãå¢ãããå ´åã¯ãã大ãããéé度ãä¸ãããå ´åã¯ãããå°ããå¤ãæå®ãã¾ãããããã®ãã©ã¡ã¼ã¿ãåããã¨ãåºæ¥ä¸ãã£ããã¹ã¯ç»åã®ãã¬ãã¥ã¼ã表示ããã¾ãã
ããªããMac OS ã¦ã¼ã¶ã®æ¹ã«ã注æã§ããJava (or ImageJ)ã® Mac OS ä¸ã®ãã°åé¿ã®ãããã¹ã©ã¤ãã¼ãåããã¨ãã¬ãã¥ã¼ç»é¢ã®æ´æ°ãéããªãã¾ããæ°ã«ãªãæ¹ã¯ãã¹ã©ã¤ãã¼æ´æ°ä¸ã¯ãPreview ã®ãã§ãã¯ãã¿ã³ãå¤ããã¹ã©ã¤ãã¼ãåããçµãã£ãã¨ããã§ãå度 Preview ã®ãã§ãã¯ãå ¥ãã¦ä¸ããã
ãæå¾ã«OKãã¿ã³ãæ¼ãã¨ããã©ã°ã¤ã³ã稼åãããã¹ã¯ç»åãä½æãã¾ãã
ã以ä¸ã¯ãè¼åº¦ (Luminosity) ãã¹ã¯ãã0-80ã®è¼åº¦ç¯å²ã§ä½æãããã¬ãã¥ã¼ç»é¢ã®äºä¾ã§ããééä¿æ°ã¯ããã¹ã¯ã®æ大éæ度ã 255 ã«ãªãããã«èªåçã«è¨å®ããã¾ããããã®å¤ãç´ 3.19 ã«ãªã£ã¦ãã¾ãããã®å¤ã¯ããã¥ã¢ã«ã§å ¥åãããã¨ã«ããå¤æ´ãããã¨ãã§ãã¾ãã
ãããã«å¯¾ãã¦ã[No Luminosity Range Masking] ã®ãã§ãã¯ãå¤ãã¨ãå ã®ç»åã§ãæ大é¾å¤ãè¶ ããé¨åãé»ããã¹ã¯ããã¦ããã®ãå¤ãã¾ãã
ãã¾ããã®ã¾ã¾ã[Making Luminosity Negative Mask] ããã§ãã¯ããã¨ããã¬ãã¹ã¯ã«ãªãã¾ãã
ãæããããã¨æã£ãããããã¥ã¢ã«ã§éé度ã調æ´ããã¨ããæããã¹ã¯ã«ãªãã¾ãã
ããã®ãããã®åä½ãéå»ã®ãã¼ã¸ã§ã³ããå¤æ´ããã¦ãã¾ãã
------------------
ãã®ãã¼ã«ã®ä½¿ç¨ç®ç
ãã§ã¯ããã®ãã¼ã«ã¯ä½ã®ããã«ä½¿ããããã¨ããã¨ãä¸ã¤ã¯ããã£ã«ã ã»ã¹ãã£ãã®èªåã»ããåãæ©è½ã使ããªãå ´åããã³ãªåãè£æ£ãè¡ãã®ã«ä½¿ãã¨ããã±ã¼ã¹ãèãããã¾ãããã®å ´åãå ã®ãã£ã«ã ããã¬ãã£ã«ã ãªããã¸ãã¹ã¯ã使ãããã¸ãã£ã«ã ãªããã¬ãã¹ã¯ã使ãã¾ããã¾ãããã³ãªåæ§ã«ãã®è£æ£ã«ã使ãã¾ãã以ä¸ã®ãã¼ã¸ã®äºä¾ããåç §ä¸ããã
ã以ä¸ã®äºä¾ã¯ãªãªã¸ãã«ãã£ã«ã ãã³ãã¯ãã¼ã ã ã£ããããã¹ãã£ãã®èªåãã³ãªåãã使ããªãã£ãã±ã¼ã¹ã§ãããã¸ã¿ã«ä¸ç¼ã«ã¡ã©ã§ãã£ã«ã ãã¥ã¼ããè¡ã£ãå ´åãåæ§ã«èªåãã³ãªåãã使ãã¾ããã®ã§ãåãããã«å¿ç¨ã§ãã¾ãã
yasuo-ssi.hatenablog.comã以ä¸ã®äºä¾ã¯ãã¢ãã¯ããã£ã«ã ã§ãç¸å¯¾RGBè²ãã¹ã¯ä½æãã¼ã«ã®è¼åº¦ãã¹ã¯ä½ææ©è½ã使ã£ãã«ãåãã®äºä¾ã§ãããæ¬ãã¼ã«ã§ãå ¨ãåããã¨ãã§ãã¾ããããã¯ãå ã ç¸å¯¾RGBè²ãã¹ã¯ä½æãã¼ã«ã®è¼åº¦ãã¹ã¯ä½ææ©è½ãæ¬ãã¼ã«ã®æ©è½ã®ãµãã»ããã«ãªã£ã¦ããããã§ãã
ãã¾ããç¾åã ã©ã®ææ¸ã«ã使ãã¾ãã以ä¸ã®äºä¾ãã覧ãã ãããããã説æã§ã¯ãç¸å¯¾RGBè²ãã¹ã¯ä½æãã¼ã«ã®è¼åº¦ãã¹ã¯ä½ææ©è½ã使ã£ã¦ãã¾ãããæ¬ãã¼ã«ã§ãå½ç¶å¯è½ã§ãã
ãã¾ãã以ä¸ã¯ãå½ãã¼ã«ãæåã«å ¬éãããã¼ã¸ã§ãããã³ã³ãã©ã¹ããé«ãããç»åã«ããã調æ´ã«ä½¿ã£ãäºä¾ãè¼ãã¦ãã¾ããæåã¯ãã®ç®çã§ãã®ãã¼ã«ãéçºãã¾ããã
yasuo-ssi.hatenablog.com-------------------------------------------
ããªããæ¬é£è¼è¨äºã§ç´¹ä»ããåçè£æ£ææ³ãã½ããã¦ã§ã¢ (Plug-in) ã¯å人çç¨éããã³éå¶å©ç®çã§ããã°èªç±ã«ä½¿ã£ã¦ããã ãã¦æ§ãã¾ããããæ¬ææ³ã使ã£ã¦ä½ããã®ææ (ç·¨éããåçç) ãå ¬è¡¨ããå ´åã¯ãæ¬è¨äºã§ç´¹ä»ããææ³ã使ã£ãæ¨ã¯ã¬ã¸ãããã¤ãã¦å ¬è¡¨ãã¦ããã ããã¨ããé¡ããã¾ãã
ãã¾ãããã®ã½ããã¦ã§ã¢ãå©ç¨ãããæ¹ã¯ããã®ã½ããã¦ã§ã¢ã«èµ·å ããæ害ã«å¯¾ãã¦ä½è ã¯ä¸åã®è²¬ä»»ãè² ããªãã¨ããç¹ãäºæ¿ãããã®ã¨ã¿ãªãã¾ããåæã§ããªãæ¹ã¯ãå©ç¨ããæããã¾ãã
ãå¶å©ã»å¶æ¥ç®çã§ä½¿ç¨ãããæ¹ã¯å¥éãç¸è«ä¸ããã
ãã¾ããç§ã®ä½æããPlug-inãèªç±ã«æ¹å¤ãã¦ä½¿ç¨ãã¦ããã ãã¦æ§ãã¾ãããããã®ææãå ¬è¡¨ããå ´åã¯ãä¸å ±ä¸ãã (å ¬è¡¨ããªãå ´åã¯ç¹ã«é£çµ¡ã¯å¿ è¦ããã¾ãã)ãã¾ããã®æ¹è¯ããçµæãç§ã®æ¹ã§èªç±ã«å©ç¨ããã¦ããã ããã¨ããäºæ¿ä¸ããã