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-python
For Linux:
对于Linux:
sudo apt-get install python-opencv
Colour 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中泰国有预扣税设置吗