1월, 2020의 게시물 표시

Image Processing #7 - OpenCV Text

이미지
You can download the source codes here( https://github.com/raspberry-pi-maker/OpenCV ) Basic text output using putText putText function Draws a text string. Python: cv2. putText ( img, text, org, fontFace, fontScale, color [ , thickness [ , lineType [ , bottomLeftOrigin ] ] ] ) → None Python: cv. PutText ( img, text, org, font, color ) → None Parameters: img – Image. text – Text string to be drawn. org – Bottom-left corner of the text string in the image. font – CvFont structure initialized using InitFont() . fontFace – Font type. One of FONT_HERSHEY_SIMPLEX , FONT_HERSHEY_PLAIN , FONT_HERSHEY_DUPLEX , FONT_HERSHEY_COMPLEX , FONT_HERSHEY_TRIPLEX , FONT_HERSHEY_COMPLEX_SMALL , FONT_HERSHEY_SCRIPT_SIMPLEX , or FONT_HERSHEY_SCRIPT_COMPLEX , where each of the font ID’s can be combined with FONT_ITALIC to get the slanted letters. fontScale – Font scale factor that is multiplied by the font-specific base size. color – Text color. thickness – Th

Image Processing #6 - Negative Image

이미지
You can download the source codes here( https://github.com/raspberry-pi-maker/OpenCV ) A positive image is a normal image. A negative image is a total inversion, in which light areas appear dark and vice versa. A negative color image is additionally color-reversed,[1] with red areas appearing cyan, greens appearing magenta, and blues appearing yellow, and vice versa. Film negatives usually have less contrast, but a wider dynamic range, than the final printed positive images. The contrast typically increases when they are printed onto photographic paper. When negative film images are brought into the digital realm, their contrast may be adjusted at the time of scanning or, more usually, during subsequent post-processing. (from https://en.wikipedia.org/wiki/Negative_(photography) ) Create negative image using bitwise_not function  Both grayscale and color images are applicable. Run the code. #-*- coding: utf-8 -*- """ """ from __future__