官术网_书友最值得收藏!

An introduction to handling files and images

Before going deeper in handling files and images, we are going to give you an overview of what we will look at in this chapter. This overview is summarized in the following diagram:

In the preceding diagram, you can see that a computer vision project (for example, an OpenCV and Python project) should deal with some input files (for example, files and images). Additionally, after some processing, the project can output some files (for example, images and files). So, in this chapter, we are going to see how to cope with these requirements and how to implement this flow (input-processing-output) properly.

A primary and necessary step to execute a program is to properly cope with command-line arguments, which are parameters that are given to a program or script containing some kind of parameterized information. For example, if you write a script to add two numbers, a common approach is to have two arguments, which are the two numbers that are necessary to perform the addition. In computer vision projects, images and different types of files are usually passed to the script as command-line arguments.

Command-line arguments are a common and simple way to parameterize the execution of programs.
主站蜘蛛池模板: 城固县| 壤塘县| 汉阴县| 龙口市| 陆丰市| 武穴市| 吉安市| 白城市| 方山县| 张掖市| 岑溪市| 安陆市| 太仓市| 广西| 金阳县| 济宁市| 高平市| 神木县| 如皋市| 独山县| 五大连池市| 石柱| 普兰县| 江都市| 仁化县| 奇台县| 诏安县| 会同县| 威远县| 尼木县| 霸州市| 松溪县| 云霄县| 南靖县| 瑞安市| 拉萨市| 长垣县| 常熟市| 宁波市| 海盐县| 东丰县|