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-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

输出量

Drawing flag of Thailand | Image processing in Python

翻译自: https://www.includehelp.com/python/drawing-flag-of-thailand-image-processing-in-python.aspx

sap中泰国有预扣税设置吗

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/543014.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Attach Volume 操作(Part II) - 每天5分钟玩转 OpenStack(54)

上一节我们讨论了 attach volume 操作中 cinder-api 的工作,本节讨论 cinder-volume 和 nova-compute 如何将 volume attach 到 Instance。 cinder-volume 初始化 volume 的连接 cinder-volume 接收到 initialize_connection 消息后,会通过 tgt 创建 ta…

python编码示例_python urllib中的编码处理示例

复制代码 代码如下:>>> import urllib>>> data 丽江>>> print data丽江>>> data\xe4\xb8\xbd\xe6\xb1\x9f>>> urllib.quote(data)%E4%B8%BD%E6%B1%9F那我们想转回去呢?复制代码 代码如下:>>> urllib.unquot…

android 网络程序下载,Android之网络文件下载

环境搭建:本地服务器(下载wamp【Windows, Apache, MySQL, PHP 】,安装即可,然后将网页或文件放进 www directory)虚拟机(访问本地服务器的ip:10.0.2.2)注意事项:权限相关网络访问 存储卡访问 文件权限 如:c…

FMDB的介绍

2019独角兽企业重金招聘Python工程师标准>>> FMDB方法的介绍 1.首先我们需要创建一个FMDatabase实例: (FMDatabase*)DataBaseSigonInstance { //数据库初始化 NSString *homeDir NSHomeDirectory(); //NSLog("%",homeDir); NSString *dbPath …

python 打印列表元素_Python程序以不同方式打印列表元素

python 打印列表元素In this program – we are going to learn how can we print all list elements, print specific elements, print a range of the elements, print list multiple times (using * operator), print multiple lists by concatenating them, etc. 在此程序中…

网络克隆软件_网文生成器,克隆的是骗钱“病毒”

文章克隆器页面。图据北京晚报如今不论男女老少,多半喜欢用手机收集信息、浏览自己关注的话题。有的时候,人们会发现,不少亲朋发来的链接或者公众号推送的文章,长得特别像,但多少有那么些微不同。其实,不是…

c#读取指定字符后的字符_在C#中读取字符的不同方法

c#读取指定字符后的字符As we know that, Console.ReadLine() is used for input in C#, it actually reads a string and then we convert or parse it to targeted type. 众所周知, Console.ReadLine()用于C#中的输入,它实际上是读取一个字…

使用python 对图片进行水印,保护自己写的文章

1,关于文章被爬 说起来挺桑心的,好不容易写的文章,被爬走。 用个搜索引擎搜索都不是在第一位,写的文章全给这些网站提供流量了。 这种网站还居多广告。 还是抱怨少点吧。csdn对于这些事情也是无所作为啊。 最起码的防盗链也不…

r语言descstats_一条命令轻松绘制CNS顶级配图-ggpubr

Hadley Wickham创建的可视化包ggplot2可以流畅地进行优美的可视化,但是如果要通过ggplot2定制一套图形,尤其是适用于杂志期刊等出版物的图形,对于那些没有深入了解ggplot2的人来说就有点困难了,ggplot2的部分语法是很晦涩的。为此…

android layout_width 属性,android:layout_weight属性详解

在android开发中LinearLayout很常用,LinearLayout的内控件的android:layout_weight在某些场景显得非常重要,比如我们需要按比例显示。android并没用提供table这样的控件,虽然有TableLayout,但是它并非是我们想象中的像html里面的t…

angular的$http发送post,get请求无法传送参数的问题

2019独角兽企业重金招聘Python工程师标准>>> 用$http进行异步请求的时候发现了一个奇怪的事情,用$http.post(url,data)的方法进行请求,后台死活接收不到data的参数,真是百思不得姐啊..... 折腾了老半天才在stackoverflow上找到答案…

python变量和常量_Python数学模块常量和示例

python变量和常量Python数学模块常量 (Python math module constants) In the math module, there are some of the defined constants that can be used for various mathematical operations, these are the mathematical constants and returns their values equivalent to …

怎样解决Word文档图标无法正常显示的问题?

此类问题是由于 Word 程序相关组件损坏导致,可以通过下面的方案来解决:步骤/方法按键盘上的 Windows 徽标健 R 键,输入 regedit,按回车键。(若弹出用户账户控制窗口,请允许以继续)对于 Word 200…

android 对话框的父view是谁,android – 在对话框中获取相对于其父级的视图位置

我想要做的是,从按钮边缘到屏幕上的一点画一条线……我正在使用一个对话框片段…我尝试的所有函数总是返回0点…我试过以下:Overrideprotected Dialog createDialog(Bundle savedInstanceState, FragmentActivity activity){Dialog d builder.create();View v Lay…

np.radians_带有Python示例的math.radians()方法

np.radiansPython math.radians()方法 (Python math.radians() method) math.radians() method is a library method of math module, it is used to convert angle value from degree to radians, it accepts a number and returns the angle value in radians. math.radians(…

怎么用git将本地代码上传到远程服务器_git之如何把本地文件上传到远程仓库的指定位置...

2018.11.26添加内容:对于自己的仓库,我们建议将远程仓库通过clone命令把整个仓库克隆到本地的某一路径下。这样的话我们从本地向远程仓库提交代码时,就可以直接把需要提交的文件拖到我们之前克隆下来的路径下,接下来在这整个仓库下…

MathType与Origin是怎么兼容的

MathType作为一款常用的公式编辑器,可以与很多的软件兼容使用。Origin虽然是一款专业绘图与数据分析软件,但是在使用过程中也是可以用到MathType。它可以帮助Origin给图表加上标签,或者在表格中增加公式标签。但是一些用户朋友对这个不能不是…

c语言 函数的参数传递示例_llround()函数以及C ++中的示例

c语言 函数的参数传递示例C llround()函数 (C llround() function) llround() function is a library function of cmath header, it is used to round the given value and casts to a long long integer, it accepts a number and returns the integer (long long int) valu…

android requestmtu,android - 如何设置/获取/请求从Android到iOS或反之亦然BLE的MTU? - 堆栈内存溢出...

我们正在将MTU请求从Android发送到iOSAndroid-从此函数onServicesDiscovered回调请求MTU但是我不知道如何确定对等设备支持是否请求了MTU,以及如何实际协商的MTU。 仅在API级别22(Android L 5.1)中添加了必需的函数:BluetoothGattCallback.onMtuChanged(…

AutoBookmark Adobe Acrobat快速自动批量添加书签/目录

前言 解决问题:Adobe Acrobat快速自动批量添加书签/目录, 彻底告别手动添加书签的烦恼 AutoBookmark 前言1 功能简介2 实现步骤2.1 下载插件2.2 将插件复制到Acrobat文件夹下2.3 自动生成书签 1 功能简介 我们在查看PDF版本的论文或者其他文件的时候, 虽然相比较于…