Giter Site home page Giter Site logo

new_variflight's Introduction

New_VariFlight

这是新版的非常准航班使用接口 此接口难点是怎么将航班出发时间、值机柜台、登机口以及到达时间、行李转盘、到达口进行合理的排序,它们的信息一般都在后台传送到前端显示样式的图片中 步骤如下: 1. 首先判断是否有登机信息(包含三个)和出机信息(包含三个),有信息的必然有图片链接,获取图片链接之后再去识别图片信息 2. 使用正则在源码中获取可能的登机和下机图片链接顺序【2,1,3】,通过可能的顺序列表在前面识别出来的文本中取出第一个数字-1的索引值 3. 判断索引值是否位时间文本,如果是时间文本,则该顺序正确,否则不正确,再根据这个顺序取出对应的值即为最终的值

注: 在使用pytesseract识别图片过程中,需要增加lang和config参数 如:code = pytesseract.image_to_string(image,lang='eng',config='--psm 10 --oem 3 -c tessedit_char_whitelist=:,-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')

参数说明: config->需要识别的类型 ,whitelist可以增加任何自己想识别的字符 code = pytesseract.image_to_string(image,lang='eng',config='--psm 10 --oem 3 -c tessedit_char_whitelist=:,-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789').strip() Page segmentation modes: 0 Orientation and script detection (OSD) only. 1 Automatic page segmentation with OSD. 2 Automatic page segmentation, but no OSD, or OCR. 3 Fully automatic page segmentation, but no OSD. (Default) 4 Assume a single column of text of variable sizes. 5 Assume a single uniform block of vertically aligned text. 6 Assume a single uniform block of text. 7 Treat the image as a single text line. 8 Treat the image as a single word. 9 Treat the image as a single word in a circle. 10 Treat the image as a single character. 11 Sparse text. Find as much text as possible in no particular order. 12 Sparse text with OSD. 13 Raw line. Treat the image as a single text line, bypassing hacks that are Tesseract-specific.

new_variflight's People

Contributors

craneagehu avatar

Stargazers

上帝是个女孩 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.