sap中泰国有预扣税设置吗_泰国的绘图标志| Python中的图像处理
sap中泰國有預扣稅設置嗎
A colored image can be represented as a 3 order matrix. The first order is for the rows, the second order is for the columns and the third order is for specifying the color of the corresponding pixel. Here we use the BGR color format(because OpenCV python library works on BGR format, not on RGB), so the third order will take 3 values of Blue, Green, and Red respectively. The values of the rows and columns depending on the size of the image.
彩色圖像可以表示為3階矩陣。 第一個順序用于行,第二個順序用于列,第三個順序用于指定相應像素的顏色。 在這里,我們使用BGR顏色格式(因為OpenCV python庫適用于BGR格式,而不適用于RGB),因此三階分別采用藍色,綠色和紅色這3個值。 行和列的值取決于圖像的大小。
In Python programming language, we can use an OpenCV library named cv2. Python does not come with cv2, so we need to install it separately.
在Python編程語言中 ,我們可以使用名為cv2的OpenCV庫。 Python不隨cv2一起提供,因此我們需要單獨安裝。
For Windows:
對于Windows:
pip install opencv-pythonFor Linux:
對于Linux:
sudo apt-get install python-opencvColour planes of BGR image:
BGR圖像的彩色平面:
Consider a BGR image array I then,
考慮一個BGR圖像陣列我然后,
I[:, :, 0] represents the Blue colour plane of the BGR image
I [:,:,0]表示BGR圖像的藍色平面
I[:, :, 1] represents the Green colour plane of the BGR image
I [:,:,1]表示BGR圖像的綠色平面
I[:, :, 2] represents the Red colour plane of the BGR image
I [:,:,2]表示BGR圖像的紅色平面
The flag of Thailand shows five horizontal stripes in the colors red, white, blue, white and red, with the central blue stripe being twice as wide as each of the other four.
泰國國旗顯示五個水平條紋,分別為紅色,白色,藍色,白色和紅色,中間的藍色條紋的寬度是其他四個條紋的兩倍。
Steps:
腳步:
First, we make a matrix of dimensions 600 X 800 X 3. Where the number of pixels of rows is 600, the number of pixels of columns is 800 and 3 is the color coding in BGR format.
首先,我們制作一個尺寸為600 X 800 X 3的矩陣。當行的像素數為600時,列的像素數為800,而3為BGR格式的顏色編碼。
Paint the first and the last strip with red. BGR is (49, 25, 165).
用紅色繪制第一條和最后一條。 BGR為(49,25,165)。
Paint the middle strip with blue. BGR is (72, 44, 45).
用藍色涂中間條。 BGR為(72,44,45)。
Paint the remaining two strips with white. BGR is (248, 245, 244).
用白色油漆剩余的兩個條。 BGR為(248、245、244)。
Python代碼繪制泰國國旗 (Python code to draw flag of Thailand )
# Python3 code to draw Thailand flag # import numpy library as np import numpy as np# import open-cv library import cv2# here image is of class 'uint8', the range of values # that each colour component can have is [0 - 255]# create a zero matrix of order 600x800 of 3-dimension image = np.zeros((600, 800, 3),np.uint8)# Painting the Red Strip image[:100,:,0] = 49; image[:100,:,1] = 25; image[:100,:,2] = 165;# Painting the White Strip image[100:200,:,0] = 248; image[100:200,:,1] = 245; image[100:200,:,2] = 244;# Painting the Blue Strip image[200:400,:,0] = 72; image[200:400,:,1] = 44; image[200:400,:,2] = 45;# Painting the white Strip image[400:500,:,0] = 248; image[400:500,:,1] = 245; image[400:500,:,2] = 244;# Painting the Red Strip image[500:600,:,0] = 49; image[500:600,:,1] = 25; image[500:600,:,2] = 165;# Show the image formed cv2.imshow("Thailand Flag",image);Output
輸出量
翻譯自: https://www.includehelp.com/python/drawing-flag-of-thailand-image-processing-in-python.aspx
sap中泰國有預扣稅設置嗎
總結
以上是生活随笔為你收集整理的sap中泰国有预扣税设置吗_泰国的绘图标志| Python中的图像处理的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 微擎pc 导入前缀_段覆盖前缀| 808
- 下一篇: Java DataInputStream