You write a series of examples in Python to get familiar with these concepts. In this article, you will deepen some topics on picamera Library: how to configure the webcam settings and how to add text on the image. In addition, you become familiar with it, writing examples in Python (see here) and a tutorial you saw how to use it as a security camera (see here). Image_1 = cv2.putText(image1, 'EDU CBA', org1, font1,įontScale1, color1, thickness1, cv2.In previous articles you saw a general overview on using the integrable webcam on Raspberry board: the PiCamera. # Using the cv2.putText() method for inserting text in the image of the specified path # Line thickness for the text being specified at 2 px # Blue color for the text being specified from BGR # font scale for the text being specified # Window name being specified where the image will be displayed # command used for reading an image from the disk disk, cv2.imread function is used Path = r'C:\Users \ Priyanka \ Desktop \ educba \ OpenCV \ edu cba logo.png' # path being defined from where the system will read the image This method is responsible for returning an output image that is to be loaded from the file which has been specified.įollowing is the example which is used in order to demonstrate how the OpenCV putText() command is utilized in the Python programming language # command used to import the OpenCV library to utilize OpenCV read image function If it is not true, the image data origin is placed at the top left corner of the image. If the parameter is taken as true, the image data origin is found to be placed at the bottom left corner of the image. This parameter is used for defining the position for the image data origin with respect to the directional position in the image. This parameter is used to define the type of line used for the text, which has to be entered into the image. for instance, for a text of blue color the tuple to be passed would be * (* 255 *, * 0 *, * 0) * The color is extracted from the BGR tuple, which is passed to it. This parameter represents the specific color that has to be given to the text string that is being entered into the image that is being drawn on the screen. This parameter represents the thickness that has to be given for the line of text that has to be entered by the user. This parameter represents the best size for the specified font size, which is relevant to the font scale factor, which acts as a multiplying factor further font size of the text that has to be entered some instances for the kinds of font types that can be used are FONT * _ * HERSHEY * _ * PLAIN OR FONT * _ * HERSHEY * _ * SIMPLEX This parameter is used to represent the type or style of font, which would be denoted for the string text that the user specifies. These coordinates are represented with the help of 2 double values that are passed, which represent the X coordinate and the Y coordinate values, respectively This parameter is used to represent the coordinate with respect to the text present on the bottom left corner of the image. This parameter represents the text that has to be drawn by the system as specified by the user This parameter represents the original image that the user has selected to add text by the system
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |