æ¨æ¥ã®ãªã¢ã«ã¿ã¤ã ãªç¬ãç·ãå®è£ ããããã«ä½¿ã£ã¦ããç»åã®åæã£ã¦ããããªã¼ãã¬ã¤ã£ã¦ãããä¸æ¸ãã£ã¦ããããã¨ã«ããç¬ãç·ããã¶ãã奴ãã°ã°ã£ã¦ããªããªãããã£ã½ãæ å ±ãåºã¦ããªãã®ã§è¨é²ã ã¬ãããã®ç»åã«é©å½ã«æ¸ããæãã¼ã¯ãä¹ã£ãã¾ãã ã¨ããããééã¨ãèããã«ä¹ã£ããã ãä¹ã£ãããã¼ã¸ã§ã³ã Copy import cv2 src = cv2.imread('star.png') # ä¹ã£ãããç»åãæã dst = cv2.imread('lena.jpg') # ä¸æ·ãã«ãªãç»åãã¬ãããã width, height = src.shape[:2] # ãµã¤ãºãåå¾ãã¦ããã # dst[ä¸ã®y座æ¨:ä¸ã®y座æ¨, å·¦ã®x座æ¨:å³ã®x座æ¨] dst[0:height, 0:width] = src cv2.imwrite('out.jpg', dst) Copyimport
{{#tags}}- {{label}}
{{/tags}}