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

Planning the Luxocator app

This chapter uses Python. Being a high-level interpreted language with great third-party libraries for numeric and scientific computing, Python lets us focus on the functionality of the system rather than implementing subsystem details. For our first project, such a high-level perspective is precisely what we need.

Let's take an overview of Luxocator's functionality and our choice of Python libraries that support this functionality. Like many computer vision applications, Luxocator has 6 basic steps:

  1. Acquire a static set of reference images: For Luxocator, we (the developers) will choose certain images that we will deem to be "Luxury, indoor" scenes, other images that we will consider as "Stalinist, indoor" scenes, and so on. We will load these images into memory.
  2. Train a model based on the reference images: For Luxocator, our model will describe each image in terms of its normalized color histogram, that is, the distribution of colors across the image's pixels. We will use OpenCV and NumPy to perform the calculations.
  3. Store the results of the training: For Luxocator, we will use SciPy to compress the reference histograms and write/read them to/from the disk.
  4. Acquire a dynamic set of query images: For Luxocator, we will acquire query images using the Bing Search API via a Python wrapper. We will also use the Requests library to download the full resolution images.
  5. Compare the query images with the reference images: For Luxocator, we will compare each query image and each reference image based on the intersection of their histograms. We will then make a classification based on the average results of these comparisons. We will use NumPy to perform the calculations.
  6. Present the results of the comparison: For Luxocator, we will provide a GUI to initiate a search and navigate the results. This cross-platform GUI will be developed in wxPython. A classification label, such as "Stalinist, exterior", will be shown below each image. See the following screenshot:
    Planning the Luxocator app

Optionally, we will use PyInstaller to build Luxocator so that it can be deployed to users who do not have Python or the aforementioned libraries. However, remember that you might need to do extra troubleshooting of your own to make PyInstaller work in some environments, including Raspberry Pi or other ARM devices.

主站蜘蛛池模板: 义乌市| 新田县| 肇州县| 海阳市| 道孚县| 四子王旗| 甘谷县| 长葛市| 科技| 井冈山市| 靖远县| 临朐县| 夏津县| 凤冈县| 桦川县| 镇江市| 察雅县| 乌兰察布市| 灌阳县| 滕州市| 厦门市| 利川市| 佛山市| 宜宾县| 彭泽县| 周宁县| 宁国市| 兴国县| 乌海市| 甘德县| 曲靖市| 慈利县| 清远市| 铜鼓县| 两当县| 九龙县| 平阳县| 萨嘎县| 泗水县| 东城区| 凌云县|