CN107690656A - Detect the method, apparatus and electronic equipment of optics module - Google Patents

Detect the method, apparatus and electronic equipment of optics module Download PDF

Info

Publication number
CN107690656A
CN107690656A CN201780001068.3A CN201780001068A CN107690656A CN 107690656 A CN107690656 A CN 107690656A CN 201780001068 A CN201780001068 A CN 201780001068A CN 107690656 A CN107690656 A CN 107690656A
Authority
CN
China
Prior art keywords
image
pickup area
determined
optics module
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201780001068.3A
Other languages
Chinese (zh)
Other versions
CN107690656B (en
Inventor
彭泓予
李彦青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Goodix Technology Co Ltd
Original Assignee
Shenzhen Huiding Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Huiding Technology Co Ltd filed Critical Shenzhen Huiding Technology Co Ltd
Publication of CN107690656A publication Critical patent/CN107690656A/en
Application granted granted Critical
Publication of CN107690656B publication Critical patent/CN107690656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1684Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/13Sensors therefor
    • G06V40/1324Sensors therefor by using geometrical optics, e.g. using prisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/1347Preprocessing; Feature extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/12Fingerprints or palmprints
    • G06V40/1365Matching; Classification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Hardware Design (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Optics & Photonics (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Input (AREA)
  • Studio Devices (AREA)

Abstract

Provide a kind of method, apparatus and electronic equipment for detecting optics module.This method includes:In the image of display screen display first, first image includes multiple images unit, it is provided with pattern on each elementary area in the plurality of elementary area, the pattern on each elementary area is used to indicate position of the reference point on first image in each elementary area;The second image is obtained, second image is the image for first image that the optics module gathers in the pickup area of the display screen;Determine the pattern in object-image element in second image;According to the pattern in the object-image element, position of the central point of the pickup area on the display screen is determined.The method of the embodiment of the present invention by showing pre-designed image on a display screen;Then IMAQ is carried out by optics module;Again by analyzing the image of collection, the mount message of the optics module can be effectively obtained.

Description

Detect the method, apparatus and electronic equipment of optics module
Technical field
The present embodiments relate to optics module field, and more particularly, to it is a kind of detect optics module method, Device and electronic equipment.
Background technology
At present, fingerprint identification function is the standard configuration of smart mobile phone.Traditional scheme be by independent community's button or virtually by Key carries out the design of fingerprint recognition button, for example, optics module is integrated in the preposition Home key of mobile phone by some smart mobile phones, Using Home key as fingerprint recognition button.The optics module includes fingerprint sensor.
Further, in order to reduce the size of smart mobile phone, the display screen of the smart mobile phone of increasing cell phone manufacturer Frame design it is super narrow.However, no sufficient space places fingerprint recognition button for the lower section of this display screen.For Solves this problem, a kind of feasible technical scheme is fingerprint identification technology in display screen.Specifically, by fingerprint recognition work( Can completely is integrated into display screen, and user can directly touch designated area in the display screen of intelligent terminal and realize that fingerprint is known Not.For example, optics module is assemblied in the back side of display screen.
Fingerprint identification technology can not only meet the design requirement of current phone manufacturer in display screen, and enable to intelligence The design of energy mobile phone becomes more succinct, and therefore, fingerprint identification technology is applied in intelligent terminal in display screen, will be following Development trend.
But in some application scenarios, application program is needed using the smart mobile phone of fingerprint identification technology in display screen The mount message of optics module can voluntarily be obtained.For example, the information such as installation site, direction of rotation.
At present, there is no solution also regarding to the issue above.
The content of the invention
A kind of method, apparatus and electronic equipment for detecting optics module is provided, can effectively obtain the optics module Mount message.
First aspect, there is provided a kind of method for detecting optics module, applied to the electricity for including display screen and optics module Sub- equipment;
Methods described includes:
In the display image of screen display first, described first image includes multiple images unit, the multiple image Pattern is provided with each elementary area in unit, each pattern on elementary area is used to indicate each image Position of the reference point in described first image in unit;Second image, second figure are obtained by the optics module Image as being the described first image that the optics module gathers in the pickup area of the display screen;Determine described second Pattern in image in object-image element;According to the pattern in the object-image element, the object-image element is determined The first position of middle intended reference point, the first position are position of the intended reference point in described first image;Root According to the first position, the second place is determined, the second place is the central point of the pickup area on the display screen Position.
Therefore, can be by showing (the display of pre-designed image on a display screen in the scheme of the embodiment of the present invention Image);Then by optics module to showing that the image of screen display carries out IMAQ, and obtain gathering image;Pass through again Analysis to gathering image, determines position of the central point of pickup area on the display screen, finally realizes optics module Positioning action.
In addition, this programme indicates that reference point is on the first image in elementary area by the pattern set on elementary area Position, be then based on position of the reference point on the first image and determine the position of pickup area central point on a display screen, this Kind scheme determines the position of the central point of pickup area on a display screen with respect to position of the elementary area on the first image Put, positioning precision is higher.
It is described according to the first position in some possible implementations, the second place is determined, including:
According to the first position and mapping relation information, the 3rd position is determined, the 3rd position is joined for the target Position of the examination point on the display screen, the mapping relation information are included corresponding to the first position and the first position 3rd position;According to the 3rd position, the second place is determined.
In some possible implementations, the pattern on each elementary area includes horizontal line section and/or vertical line section; Each elementary area includes left half side region and right half side region, and the line segment in left half side region is used to indicate image Row of the unit belonging in described first image, right half side region is interior to be used to indicate elementary area in described first image Affiliated row.
In some possible implementations, the pattern on each elementary area includes horizontal line section and/or vertical line section; Each elementary area includes upper half side region and lower half side region, and one article of horizontal line segment table in the lower half side region shows the One is digital, and a vertical line segment table in the lower half side region shows that second is digital, a horizontal line section in the upper half side region Represent the 3rd numeral.
In some possible implementations, a horizontal line segment table registration word 1 in the lower half side region, the lower half A vertical line segment table registration word 4 in side region, a horizontal line segment table registration word 16 in the upper half side region.
Described first image is array image, and each elementary area in the multiple elementary area is square-shaped image list Member, the pickup area are square area;Wherein, methods described also includes:
Before the display image of screen display first, the length of side of the pickup area is determined;According to the acquisition zone The length of side in domain, determines the length of side of each elementary area, and the length of side of the pickup area is more than each elementary area The length of side;According to the length of side of each elementary area, described first image is generated.
In some possible implementations, the length of side for determining the pickup area, including:
The brightness value of each pixel is all higher than first in the display image of screen display the 3rd, the 3rd image Brightness value;4th image is obtained by the optics module, the 4th image is the optics module in the pickup area The image of the 3rd image of interior collection;Binaryzation is carried out to the 4th image, obtains bianry image;According to the two-value The horizontal gradient response and vertical gradient response of image, determine the length of side of the pickup area.
In some possible implementations, the horizontal gradient response and vertical gradient according to the bianry image Response, the length of side of the pickup area is determined, including:
According to the horizontal gradient response and vertical gradient response of the bianry image, the side of the bianry image is determined It is long;According to the length of side of scaling and the bianry image, the length of side of the pickup area is determined, the scaling is described Ratio between the image that the image of pickup area and the optics module gather in the pickup area.
In some possible implementations, methods described also includes:
The first offset is determined, first offset can be used for correcting the second place;Wherein, it is described according to institute The 3rd position is stated, determines the second place, including:
According to first offset and the 3rd position, the second place is determined.
The technical scheme of the embodiment of the present invention, it can further improve positioning precision.
In some possible implementations, the first offset of the determination, including:
Determine the second offset, second offset is intended reference point described in second image relatively described the The offset vector of the central point of two images;According to scaling and second offset, first offset is determined, it is described Ratio between the image that scaling is the image of the pickup area and the optics module gathers in the pickup area Example.
In some possible implementations, methods described also includes:
The anglec of rotation is obtained, the anglec of rotation is that the image that the optics module gathers in the pickup area is relative The angle of the image rotation of the pickup area;Wherein, the pattern determined in second image in object-image element, Including:
The first processing image is obtained, the first processing image is after second image rotates according to the anglec of rotation Image;By analyzing the first processing image, the pattern in the object-image element is determined.
It is described according to the first position in some possible implementations, it is described before determining the second place Method also includes:
Scaling is obtained, the scaling is the image of the pickup area and the optics module in the collection Ratio between the image gathered in region;The acquisition scaling, including:
In the display image of screen display the 5th, the 5th image includes k articles of the 3rd line segment being parallel to each other, described At least two articles the 3rd adjacent line segments are covered in the pickup area in k articles of the 3rd line segment, k >=2;Pass through the optics module The 6th image is obtained, the 6th image is the figure for the 5th image that the optics module gathers in the pickup area Picture;According to the first distance and second distance, the scaling is determined, first distance is adjacent in the 5th image Vertical range between two article of the 3rd line segment, the second distance is between two article of the 3rd line segment adjacent in the 6th image Vertical range.
In some possible implementations, methods described also includes:
The anglec of rotation is obtained, the anglec of rotation is that the image that the optics module gathers in the pickup area is relative The angle of the image rotation of the pickup area;The acquisition anglec of rotation, including:
6th image is analyzed by Hough transformation, and obtains first angle;Acquisition second processing image, described second Processing image is the 4th image according to the postrotational image of the first angle;By contrast the second processing image and 5th image, determines the anglec of rotation.
In some possible implementations, methods described also includes:
In the display image of screen display the 7th, the 7th image is included in the central point cross of the pickup area Two straight lines intersected;8th image is obtained by the optics module, the 8th image is the optics module described The image of the 7th image of collection in pickup area;By analyzing the second place described in the 8th image authentication.
In some possible implementations, the length of side of the pickup area is the length of side of each elementary area 2.5 again.This programme can effectively ensure that:An object-image element in effective coverage be present.
In some possible implementations, first brightness value is 128.
In some possible implementations, the resolution ratio and point of the display screen of the image of the display screen display Resolution is identical.
In some possible implementations, the image of the display screen display covers the pickup area.
Second aspect, there is provided a kind of device for detecting optics module, including;For performing above-mentioned first aspect or first Method in any possible implementation of aspect.
Specifically, the device is included in any possible implementation for performing above-mentioned first aspect or first aspect Method unit.
The third aspect, there is provided a kind of device for detecting optics module, including;
Display module, for including multiple images unit in the display image of screen display first, described first image, Pattern is provided with each elementary area in the multiple elementary area, each pattern on elementary area is used to indicate Position of the reference point in described first image in each elementary area.
Processing module, the processing module are used for:
Second image is obtained by the optics module, second image is the optics module in the display screen The image of the described first image of collection in pickup area;Determine the pattern in object-image element in second image;Root According to the pattern in the object-image element, the first position of intended reference point in the object-image element is determined, described One position is position of the intended reference point in described first image;According to the first position, the second place is determined, institute State position of central point of the second place for the pickup area on the display screen.
Fourth aspect, there is provided a kind of device for detecting optics module, including;
Memory and processor, the memory are used for store instruction, and the processor is deposited for performing the memory The instruction of storage, and when the instruction of memory storage described in the computing device, perform above-mentioned first aspect or first party Method in any possible implementation in face.
5th aspect, there is provided a kind of computer-readable medium, for storing computer program, the computer program includes using The instruction of method in any possible implementation for performing above-mentioned first aspect or first aspect.
6th aspect, there is provided a kind of electronic equipment, include the device of the detection optics module described in second aspect.
In some possible implementations, the display screen is Organic Light Emitting Diode OLED display screen, the optics Module by the use of the OLED display screen at least part OLED pixel unit as light source come perform detection function.
Brief description of the drawings
Fig. 1 is the example of the electronic equipment of the embodiment of the present invention.
Fig. 2 is the exemplary process diagram of the method for the detection optics module of the embodiment of the present invention.
Fig. 3 is the schematic diagram of the 4th image of the embodiment of the present invention.
Fig. 4 is the schematic diagram of the 5th image of the embodiment of the present invention.
Fig. 5 is the schematic diagram of the 6th image of the embodiment of the present invention.
Fig. 6 is the schematic diagram of the first image of the embodiment of the present invention.
Fig. 7 is the schematic diagram of the second image of the embodiment of the present invention.
Fig. 8 is the schematic diagram of the 7th image of the embodiment of the present invention.
Fig. 9 is the schematic diagram of the 8th image of the embodiment of the present invention.
Figure 10 is the another exemplary flow chart of the method for the detection optics module of the embodiment of the present invention.
Figure 11 is the schematic block diagram of the electronic equipment of the embodiment of the present invention.
Figure 12 is another schematic block diagram of the electronic equipment of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the technical scheme in the embodiment of the present invention is described.
It should be understood that the embodiment of the present invention is applied to any device and equipment for being configured with optics module.For example, for example, Intelligent mobile phone;Small sized personal portable equipment:Palm PC (Personal Digital Assistant, PDA), electronics Book (electronic book, E-book) etc..In order to make it easy to understand, as example and in non-limiting manner, hereinafter with intelligent hand Illustrated exemplified by machine.
Fig. 1 is the side, sectional view of the electronic equipment 100 of the embodiment of the present invention.
Specifically, the electronic equipment 100 includes display screen 110 and is assemblied in the optics module at the back side of display screen 110 120.The pickup area 130 (i.e. pickup area) of optics module 120 is located in display screen 110.In real work, optics module 120 carry out the collection of image in pickup area 130.
For example, optics module 120 can gather the image shown on display screen 100 in pickup area 130.
In another example optics module 120, which can be optical finger print module or other kinds of optical bio, detects module, its It can be used for carrying out fingerprint recognition or other biological feature recognition.Specifically, the optics module 120 uses optical finger print During module, it can be arranged on the regional area (that is, dactylotype under display screen) of the lower section of display screen 110 or be integrated into Regional area (that is, dactylotype in display screen) inside display screen 110, it can be used for collection and touch in the pickup area The fingerprint image of finger on 130.In this case, the pickup area 130 is the fingerprint of the optical finger print module Effective coverage is detected, it is located at least part viewing area of the display screen 110, to realize in screen
(In-Display) fingerprint detection.Wherein, can be as a kind of preferable implementation, the display screen 110 Organic Light Emitting Diode (OLED) display screen, it uses self luminous OLED pixel unit as display unit;In the display In screen 110, light source that can simultaneously as the optical finger print module positioned at the OLED pixel unit of the pickup area 130. Alternately, in other embodiments, the fingerprint detection effective coverage of the optical finger print module can also cover the display The whole viewing area of screen 110, so as to realize full frame fingerprint detection.
But in practical application scene, it may be necessary to which application program can voluntarily obtain the mount message of optics module 120.
For example, optics module 120 is used for when carrying out fingerprint recognition, it is necessary to show fingerprint prompting pattern on display screen 110, Fingerprint is inputted in suitable region with instruction user.But the position of fingerprint prompting pattern is usually according to optics module 120 What rigging position determined, it is usually fixed constant.Due to assembly technology is inaccurate or design is changed, it may cause not Rigging position with the optics module 120 of batch is not quite identical.Under this situation, if still immobilizing in display screen The ad-hoc location on show fingerprint prompt pattern, it is possible that fingerprint prompting pattern position inaccurate the problem of, cause Effective fingerprint area that optics module 120 can collect tails off, and reduces the efficiency of fingerprint recognition, influences Consumer's Experience.
A kind of method for detecting optics module is provided in order to solve the above problems, in the embodiment of the present invention.
Specifically, there is provided the algorithm of complete set, can not only be true by designing the image of display on a display screen The position of the central point of pickup area on a display screen is made, can also obtain the physics size of optics module, rotation during installation Gyration and the scaling of output image etc..And then realize optics module under mobile phone screen (Sensor) adaptive location Detection function.
The method of the detection optics module to the embodiment of the present invention illustrates below.It should be understood that the embodiment of the present invention The method of detection optics module can apply to any electronic equipment including display screen and optics module.
Fig. 2 is the exemplary process diagram of the method 200 of the detection optics module of the embodiment of the present invention.
As shown in Fig. 2 this method 200 includes:
210, in the image of display screen display first, first image includes multiple images unit, the plurality of image list It is provided with pattern on each elementary area in member, the pattern on each elementary area is used to indicate in above-mentioned each elementary area Position of the reference point on first image.
220, the second image is obtained by the optics module, second image is collection of the optics module in the display screen The image of first image gathered in region.
230, determine the pattern in object-image element in second image.
240, according to the pattern in the object-image element, determine first of intended reference point in the object-image element Put, the first position is position of the intended reference point on first image.
250, according to the first position, the second place is determined, the second place is aobvious at this for the central point of the pickup area Position in display screen.
In brief, electronic equipment can show pre-designed image (display image) on a display screen;Then lead to Optics module is crossed to showing that the image of screen display carries out IMAQ, and obtains gathering image;Again by collection image Analysis, determines position of the central point of pickup area on the display screen, finally realizes the positioning action of optics module.
In the embodiment of the present invention, electronic equipment can be first passed through to the second image when to the positioning action of optics module Analysis, determines position of the intended reference point in the second image in display image;And then the electronic equipment can be according to this Position of the intended reference point in display image, determine position of the central point of pickup area on the display screen.
For example, electronic equipment can determine the 3rd position first according to the first position and mapping relation information, the 3rd Position is position of the intended reference point on the display screen, and the mapping relation information includes the first position and the first position Corresponding 3rd position;Then according to the 3rd position, the second place is determined.
It should be noted that in the embodiment of the present invention, electronic equipment can determine the second place by the 3rd position;Electronic equipment is also The second place can be defined as directly by first position.The embodiment of the present invention is not specifically limited.For example, the first position is Coordinate position of the intended reference point on first image, and when the first image is identical with the coordinate system of display screen, electronic equipment The second place can be defined as directly by the first position.
For ease of describing, in the embodiment of the present invention, the intended reference point in the second image in object-image element is existed Position on first image, referred to as first position.Position of the intended reference point on the display screen is referred to as the 3rd position. By position of the central point of the pickup area on the display screen, the referred to as second place.Similarly, for ease of description, by electronics Equipment is referred to as the first image to the image shown on a display screen when carrying out the positioning of optics module, by optics module in the display The image obtained after first image is gathered in the pickup area of screen and is referred to as the second image.Similarly, also the 3rd image, the 4th Image, the 5th image, the 6th image etc., but should not necessarily be limited by these terms.These terms are only used for type cell group each other Distinguish.
It should be understood that in the embodiment of the present invention, the actual optics module that includes but is not limited to of the image of optics module output is being adopted The image that collection region collects.
For example, showing a white image on a display screen, the image exported after optics module collection includes black region And white portion, the image of white portion are corresponding with the image of pickup area on display screen.In the embodiment of the present invention, this is shown Image in the pickup area of screen, corresponding in the image of optics module output, referred to as effective coverage is (for example, as shown in Figure 3 White portion) in image.
The first image of the embodiment of the present invention is illustrated below.
Alternatively, the pattern on each elementary area on the first image of the embodiment of the present invention can include horizontal line section And/or vertical line section.
For example, above-mentioned each elementary area can include left half side region and right half side region, the line in left half side region Section be used to indicating elementary area on first image belonging to row, be used in right half side region indicating elementary area this first Row belonging on image.
Further, above-mentioned each elementary area can also include upper half side region and lower half side region, the lower half lateral areas A horizontal line segment table registration word 1 in domain, a vertical line segment table registration word 4 in the lower half side region, in the upper half side region A horizontal line segment table registration word 16.
More specifically, each elementary area of the first image can be divided into the left and right sides, left side value of information representative image Unit column sequence number, right side value of information representative image unit are expert at sequence number;Each side region is divided into two parts up and down again, Every horizontal line of lower part represents numerical value 1, and every vertical line represents numerical value 4, i.e. lower part is similar to 4 systems;Instantly partial straight lines generation During the numerical value of table completely 16, lower straight is emptied, while upper straight adds 1;So rule is:4 systems inside region, lower regions Between be 16 systems.Thus, electronic equipment can pass through the line segment in object-image element, it may be determined that go out object-image element In reference point in the position of first image.
For example, first image is as shown in fig. 6, second image is as shown in Figure 7.
It should be noted that in the embodiment of the present invention, because electronic equipment is by analyzing the figure in object-image element Case determines first position, therefore, when designing the first image, does not only need to ensure that the first image is in pickup area, also It is necessary to ensure that the complete elementary area of at least one in the second image.
Therefore, a kind of method for generating the first image is additionally provided in the embodiment of the present invention.
Alternatively, the electronic equipment can also generate first image before the image of display screen display first.
For example, it is assumed that first image is array image, each elementary area in the plurality of elementary area is square Elementary area, the pickup area are square area;Electronic equipment can determine the length of side of the pickup area;According to the acquisition zone The length of side in domain, determines the length of side of above-mentioned each elementary area, and the length of side of the pickup area is more than the side of above-mentioned each elementary area It is long;According to the length of side of above-mentioned each elementary area, first image is generated.
Alternatively, the length of side of the pickup area is 2.5 times of the length of side of above-mentioned each elementary area.
In the embodiment of the present invention, image two that electronic equipment first can be gathered optics in pickup area by Threshold segmentation Value, then projected by brightness value both vertically and horizontally, determine the length of side of the pickup area.
Specifically, electronic equipment can in the image of display screen display the 3rd, the 3rd image each pixel Brightness value be all higher than the first brightness value;4th image is obtained by the optics module, the 4th image is that the optics module exists The image of 3rd image of collection in the pickup area;Binaryzation is carried out to the 4th image, obtains bianry image;According to this The horizontal gradient response and vertical gradient response of bianry image, determine the length of side of the pickup area.
Alternatively, first brightness value is 128.
For example, the 3rd image is a secondary full white image, the 4th image is as shown in Figure 3.
More specifically, the gray value of the point on the 4th image can be arranged to 0 or 255 by electronic equipment, that is, will be whole Individual image shows obvious black and white effect.That is, the gray level image of 256 brightness degrees is chosen to obtain by appropriate threshold value Obtaining still can reflect the overall bianry image with local feature of image, and then extract bianry image feature, and this is research gray scale The binaryzation of the most special method, referred to as image of conversion.The bianry image feature can be included by the spy of a string 0,1 compositions Sign vector.
It will be understood by those skilled in the art that in Digital Image Processing, bianry image occupies very important status, special It is not in the image procossing of practicality, the system realized and formed with binary Images Processing is a lot.Therefore, using " two-value Change " processing image, not only application is strong, and is advantageous to when being further processed to image, the set property of image only with The value of pixel is that the position of 0 or 255 point is relevant, does not further relate to the multilevel values of pixel, processing is become simple, and data Processing and decrement it is small.
In order to obtain preferable bianry image, in the embodiment of the present invention closing, the boundary definition of connection can be used not to hand over Folded region.Specifically, the pixel that all gray scales are more than or equal to threshold value is judged as belonging to certain objects, and its gray value is used 255 represent that otherwise these pixels are excluded beyond object area, gray value 0, represent the object areas of background or exception Domain.It can be found that if certain certain objects internally has the gray value of uniformity, and it is in one has other grades Under the homogeneous background of gray value, the segmentation effect compared is can be obtained by using threshold method.
Sum it up, electronic equipment can show a white image (the 3rd image) on a display screen, optics module is defeated Go out the 4th image as shown in Figure 3, most of region of this image be it is highlighted, its brightness value at least more than 128, and This highlight regions necessarily rectangle, and this rectangular area is exactly the effective coverage of the image of optics module the 4th.However, It is exactly the effective coverage of the output image of optics module in the embodiment of the present invention, corresponding to the pickup area of display screen.
That is, electronic equipment by the 4th image binaryzation, and can pass through vertical direction and water by Threshold segmentation Square to brightness value project, determine the length of side of the bianry image, and then the collection is determined according to the length of side of the bianry image The length of side in region.
For example, electronic equipment can according to the horizontal gradient response and vertical gradient response of the bianry image, it is determined that The length of side of the bianry image;Then the length of side of the bianry image is defined as to the length of side of the pickup area.
In addition, in the embodiment of the present invention, due to being exactly the output image of optics module corresponding to the pickup area of display screen Effective coverage.That is, the size of image is possible into scaling and closed in the size of image and effective coverage in pickup area System.
Therefore, electronic equipment can also first according to the horizontal gradient response and vertical gradient response of the bianry image, Determine the length of side of the bianry image;Then according to the length of side of scaling He the bianry image, the length of side of the pickup area is determined, Ratio between the image that the scaling is the image of the pickup area and the optics module gathers in the pickup area.
It is appreciated that in embodiments of the present invention, the electronic equipment can before the image of display screen display first, Generate first image;Existing first image can also be directly invoked.The embodiment of the present invention is not specifically limited.For example, should First image can be placed in the electronic device by way of being pre-configured with.
In embodiments of the present invention, the 3rd position can be determined directly as the second place by electronic equipment.Wherein, the 3rd Position is position of the intended reference point on the display screen, and the second place is the central point of the pickup area in the display screen On position.In other words, position of the intended reference point on the display screen directly can be defined as this and adopt by electronic equipment Collect position of the central point in region on the display screen.That is, intended reference point is defined as to the central point of pickup area.
That is, the intended reference point in the embodiment of the present invention must be in the center of effective coverage, otherwise, certainty There can be error.
Therefore, a kind of method for correcting the second place is additionally provided in the embodiment of the present invention.
Alternatively, the electronic equipment before determining the second place, can first determine the first skew according to the 3rd position Amount, first offset is the offset vector for correcting the second place;Then according to first offset and the 3rd position, Determine the second place.
For example, second offset is that the intended reference point is inclined with respect to the central point of second image in second image The amount of shifting to;First offset is determined according to second offset.
Specifically, according to scaling and second offset, first offset is determined, the scaling is the collection Ratio between the image that the image in region and the optics module gather in the pickup area.
Further, since the assembly technology of optics module is inaccurate or designs the reason for changing, different batches may be caused An anglec of rotation occurs with respect to display screen in the rigging position of optics module.That is, electronic equipment it is determined that this second Before position, it is possible to need to obtain the anglec of rotation.
In the embodiment of the present invention, as example in non-limiting manner, the electronic equipment can be it is determined that in second image Before pattern in object-image element, the anglec of rotation is obtained, the anglec of rotation is that the optics module is adopted in the pickup area Angle of the image of collection with respect to the image rotation of the pickup area.Thus, the electronic equipment is it is determined that target in second image During pattern on elementary area, the first processing image can be obtained first, and the first processing image is second image according to this The postrotational image of the anglec of rotation;Then by analyzing the first processing image, the pattern in the object-image element is determined.
It should be understood that if the assembly technology of optics module is accurate enough, the anglec of rotation of optics module may be 0, this In the case of, it can determine the target image first in the case where not obtaining the anglec of rotation during actual location optics module Pattern on unit.
In the embodiment of the present invention, the method that a kind of electronic equipment obtains the scaling and the anglec of rotation is additionally provided.
The implementation for obtaining the scaling and the anglec of rotation to the electronic equipment below illustrates.
Alternatively, electronic equipment can be in the image of display screen display the 5th, and the 5th image includes the k being parallel to each other Article the 3rd line segment, at least two articles the 3rd adjacent line segments are covered in the pickup area in this k articles the 3rd line segment, k >=2;Pass through The optics module obtains the 6th image, and the 6th image is the 5th image that the optics module gathers in the pickup area Image;According to the first distance and second distance, the scaling is determined, first distance is adjacent in the 5th image two articles Vertical range between 3rd line segment, the second distance be in the 6th image between adjacent two article of the 3rd line segment it is vertical away from From.
For example, first distance is 50 pixels of the display screen.
Further, the electronic equipment in the embodiment of the present invention, can be with when needing to obtain the anglec of rotation of optics module So that the side of every the 3rd line segment is vertically installed with j articles of the 4th line segment in this k articles the 3rd line segment, in this j articles the 4th line segment extremely Few one article of the 4th line segment is covered in the pickup area.
For example, this j articles the 4th line segment is the line segment being parallel to each other, two article of the 4th adjacent line segment in this j articles the 4th line segment Between vertical range be the display screen 25 pixels.
For example, the 5th image is as shown in figure 4, the 6th image is as shown in Figure 5.
Specifically, electronic equipment can analyze the 6th image by Hough transformation, and obtain first angle;Obtain second Image is handled, the second processing image is the 4th image according to the postrotational image of the first angle;By contrast this second Image and the 5th image are handled, determines the anglec of rotation.
More specifically, electronic equipment can analyze its rotation to the 6th image using Hough transformation (Hough Transform) Gyration, the 6th image is rotated according to the first angle being calculated, and carry out Sobel Operator (Sobel operator) Contours extract and Threshold segmentation, then further according to upright projection, whether the analysis anglec of rotation needs to add and subtract 180 degree, final to determine Go out the anglec of rotation.
Hough transformation (Hough Transform) is introduced below.
Hough transform is a kind of Feature Extraction Technology in image procossing, and it has spy by a kind of detection of Voting Algorithm The object of setting shape.Classical Hough transformation is used for the straight line in detection image, and later Hough transformation expands to arbitrary shaped body Identification, mostly circle and oval.In implementation process, Hough transform process is related to the conversion between two coordinate spaces.Specifically Ground, in a coordinate space will there is the curve of same shape or straight line to be mapped to shape on a point of another coordinate space Statistics spike problem is converted into peak value, and then the problem of detection arbitrary shape.In the embodiment of the present invention, Hough can be utilized Conversion pair determines the first angle of the 6th image.
Sobel Operator (Sobel operator) is introduced below.
Sobel operators are one of operators in image procossing, are mainly used as rim detection.Technically, it is one discrete Property difference operator, for the approximation of the gradient of computing brightness of image function.This operator is used in any point of image, it will Gradient vector corresponding to generation or its law vector.
The term that Sobel operators are related to has:
Edge:, can be with segmentation figure picture using this feature at the mutation of the information such as gray scale or structure.
It will be understood by those skilled in the art that the edge of object is that occur in the form of the discontinuity of local image characteristic 's.For example, the mutation of gray value, the mutation of color, mutation of texture structure etc..In essence, edge means that one The termination in region and the beginning in another region.The marginal information of image is particularly significant in the vision of graphical analysis and people, It is the important attribute that characteristics of image is extracted in image recognition.
In addition, there are two characteristics in direction and amplitude at the edge of image, the pixel along edge trend changes gently, and perpendicular to The pixel change of edge trend is violent.This change may be rendered as jumping type, roof type and flange-type.These changes are right respectively Answer physical state different in scenery.For example, the depth either reflecting boundary of jumping type change usually correspondence image, then two Person then usually reflects that the surface normal direction of image is discontinuous.It should be noted that the image for being actually subjected to analysis is often relatively more multiple It is miscellaneous, it is necessary to be made a concrete analysis of according to actual conditions.
Marginal point:There is coordinate [x, y] in image, and be in the point on the position of intensity significant changes.
Edge section:Corresponding to edge point coordinates [x, y] and its orientation, the orientation at edge is probably gradient angle.
In implementation process, after Sobel operators have calculated the Grad G (x, y) at pixel all in image, selection One threshold value T, if the G (x, y) at (x, y) place>T, then it is assumed that the point is marginal point or edge section.Further, since Sobel operators Only need the brightness value projection using 2 directions, i.e. horizontal gradient response and vertical gradient response so that the calculating of rim detection Simply, speed is fast.
In the embodiment of the present invention, by carrying out Sobel contours extracts and Threshold segmentation to second processing image, it can analyze Go out whether the first angle of the embodiment of the present invention needs to add and subtract 180 degree, and then determine the anglec of rotation of optics module.
It should be understood that Sobel operators are only the exemplary illustrations of the embodiment of the present invention, and not limited to this of the embodiment of the present invention, example Such as, Robert (Robert) operator, Prewitt (Prewitt) operator, Laplacian (Laplacian of be can also be Gaussian, LOG) operator etc..
It should also be understood that in order to further improve the degree of accuracy of image procossing, in embodiments of the present invention, can also detect Before image, " binaryzation " processing is carried out to original image by way of Threshold segmentation.That is, by Binary Sketch of Grey Scale Image, obtain To bianry image, and image detection is carried out on the basis of bianry image.
In the embodiment of the present invention, a kind of method for verifying the second place is additionally provided.
The method of the checking second place to the embodiment of the present invention illustrates below.
Alternatively, electronic equipment can be included in the acquisition zone in the image of display screen display the 7th, the 7th image Two straight lines of the central point right-angled intersection in domain;8th image is obtained by the optics module, the 8th image is the optical mode The image for the 7th image that group gathers in the pickup area;By analyzing the 8th image authentication second place.
For example, the 7th image is as shown in figure 8, the 8th image is as shown in Figure 9.
Specifically, electronic equipment can rotate the image collected according to the anglec of rotation above calculated, then detect Whether there are two straight line square crossings, fail if notifying high-level interface positioning without if;If then positioning success, and lead to The skew for calculating and intersecting point coordinates and effective coverage center point coordinate is crossed, further the centre coordinate of accurate adjustment pickup area.
It should be understood that in the embodiment of the present invention, the resolution ratio of the image of the display screen display can be with point of the display screen Resolution is identical, can also be different from the resolution ratio of the display screen.
It should also be understood that electronic equipment when gathering image, first can also be used as the back of the body using the image that display screen gathers when completely black Jing Jitu, great amount of images noise is removed for the method by subtracting background base figure.
Figure 10 is the another exemplary flow chart of the method for the detection optics module of the embodiment of the present invention.
As shown in Figure 10, so that electronic equipment is mobile phone as an example, the algorithm flow of the embodiment of the present invention includes:
301, mobile phone initialization algorithm environment.
302, input completely black Background.
Specifically so that the full frame blackening of mobile phone, allow optics module to gather an image, as background base figure.
303, input full white background figure.
Specifically, allow mobile phone is full frame to bleach, allow optics module to gather an image, obtain image as shown in Figure 3, gather To image be used to analyze effective coverage information, including the coordinate in the effective coverage upper left corner and the width height of effective coverage are (for example, have Imitate region it is wide it is a height of 190).
304, straight line test map combining mobile phone screen, capture image.
Specifically, the mobile phone can build one and is made up of long line short-term, and size can cover the test chart of mobile phone screen, Allow mobile phone to be displayed in full screen the figure and carry out an IMAQ, collection image is used for the anglec of rotation and scaling for analyzing optics module Ratio;The physical size of optics module is calculated according to the scaling that obtains before, effective coverage information.
For example, the mobile phone can create one with mobile phone screen resolution ratio image of a size, specifically, such as Fig. 4 institutes Show, from left to right, design a vertical line every 50 pixels, straight length is equal to resolution ratio rate height;On every straight line, From top to bottom, a strigula is drawn on the right side of straight line every 25 pixels, length is 25 pixels.Such image is shown in hand On machine screen, allow optics module once to be adopted figure, and export image as shown in Figure 5.
305, the anglec of rotation of calculating optical module, scaling.
Specifically, the mobile phone analyzes its anglec of rotation to the image of output using Hough transform, by image according to calculating The angle rotation arrived, and carry out Sobel contours extracts and Threshold segmentation;Further according to the upright projection of segment horizontal line, analysis rotation Whether angle needs to add and subtract 180 degree;Meanwhile by detecting the distance (for example, 75) of two vertical lines, collection figure is calculated The scaling (i.e. 75/50) of picture.
306, according to the scaling and screen resolution, build grid array of figure.
307, grid array map combining mobile phone screen, capture image.
308, image detection, extract grid information, the centre coordinate of calculating optical module.
Specifically, the mobile phone can according to the result build one be made up of grid, size can cover mobile phone screen Array of figure, there are a series of horizontal lines or vertical line inside each grid;Allow mobile phone to be displayed in full screen the grid array of figure and carry out once IMAQ, the image of collection, which is used to analyze, calculates optics module, relative to the coordinate in the mobile phone screen upper left corner.
More specifically, the effective district field width that the mobile phone can calculate according to scaling and before is high, optical mode is obtained Group actual size (length of side of pickup area) be:190*50/75=127, optimal side in grid array is calculated according to the parameter Lattice width:127/2.5=51.According to optimal grid width, a grid array of figure that can cover mobile phone screen is designed, then allow Optics module gathers an image.
For example, the design principle of line segment can be as shown in Figure 6 inside lattice:Grid is divided into the left and right sides, left side information Value represents grid column sequence number, and the right side value of information represents grid and is expert at sequence number;Each side region is divided into two up and down again Point, every horizontal line of lower part represents numerical value 1, and every vertical line represents numerical value 4, i.e. lower part is similar to 4 systems;Instantly partial straight lines During the numerical value of representative completely 16, lower straight is emptied, while upper straight adds 1;So rule is:4 systems inside region, upper and lower region It is 16 systems between domain.The image as shown in Figure 7 of optics module collection is carried out according to the anglec of rotation being calculated before Rotate, then the grid information in detection image.By obtaining straight line information all inside grid, it is possible to calculate the party Position of the lattice in whole grid array.Referring again to the coordinate value in the grid upper left corner, you can the current grid upper left corner is calculated Coordinate in whole mobile phone screen.Finally, skew of the coordinate relative to collection effective image area centre coordinate is calculated, is multiplied With scaling, you can coordinate of the IMAQ effective coverage central point relative to whole mobile phone screen is obtained, it is achieved thereby that The Primary Location of optics module.
309, according to scaling, screen resolution and optics module coordinate, build proof diagram.
310, map combining mobile phone screen is verified, captures image.
Specifically, the mobile phone can design a size according to the optics module coordinate calculated and cover testing for mobile phone screen Card figure, allow mobile phone to show the figure and carry out an IMAQ, carry out coordinate checking according to grabgraf is handled with intense adjustment.
For example, the mobile phone can build all black picture that a width size is mobile phone screen resolution ratio, obtained in the previous step Coordinate value position, draw two white straight lines (length 50) and be mutually perpendicular to intersect, specifically, as shown in Figure 8.Mobile phone is allowed to show This image, and an IMAQ is carried out, obtain image as shown in Figure 9.
311, verify whether to pass through.
312, if not over checking, circulate a notice of mistake, and enter artificial search.
313, if passing through checking, the coordinate of adjustment optics module.
Specifically, the image collected is rotated according to the angle above calculated, then has detected whether that two straight lines hang down Orthogonal is pitched, and is failed if notifying high-level interface positioning without if;Intersect point coordinates if then positioning success, and by calculating With the centre coordinate of the skew of effective coverage center point coordinate, further accurate adjustment optics module.
314, nullify algorithm environment.
Thus, mobile phone can export the centre coordinate of optics module, physics size, the anglec of rotation, scaling, and image is adopted Collect the information such as effective coverage.
The device of the detection optics module to the embodiment of the present invention illustrates below.
Figure 11 is the schematic block diagram of the device 400 of the detection optics module of the embodiment of the present invention.
As shown in figure 11, the device 400 includes:
Display module 410, for showing the first image on the display screen 420, first image includes multiple images list Member, is provided with pattern on each elementary area in the plurality of elementary area, and the pattern on above-mentioned each elementary area is used to refer to Show position of the reference point in above-mentioned each elementary area on first image.
Processing module 440, the processing module 440 are used for:
Second image is obtained by the optics module 430, second image is the optics module 430 in the display screen 420 Pickup area in collection first image image;Determine the pattern in object-image element in second image;According to Pattern in the object-image element, the first position of intended reference point in the object-image element is determined, the first position is Position of the intended reference point on first image;According to the first position, the second place is determined, the second place is adopted for this Collect position of the central point in region on the display screen 420.
Alternatively, the processing module 440 is specifically used for:
According to the first position and mapping relation information, the 3rd position is determined, the 3rd position is that the intended reference point exists Position on the display screen 420, the mapping relation information include the 3rd position corresponding to the first position and the first position; According to the 3rd position, the second place is determined.
Alternatively, the pattern on above-mentioned each elementary area includes horizontal line section and/or vertical line section.
Alternatively, above-mentioned each elementary area includes left half side region and right half side region, the line in its left half side region Section be used to indicating elementary area on first image belonging to row, be used in its right half side region indicating elementary area this Row belonging on one image.
Alternatively, above-mentioned each elementary area includes upper half side region and lower half side region, and one in the lower half side region Bar horizontal line segment table registration word 1, a vertical line segment table registration word 4 in the lower half side region, a horizontal stroke in the upper half side region Line segment form registration word 16.
Alternatively, the processing module 440 is additionally operable to:
Before the display module 410 shows the first image on the display screen 420, first image is generated.
Alternatively, first image is array image, and each elementary area in the plurality of elementary area is schemed for square As unit, the pickup area is square area;Wherein, the processing module 440 is specifically used for:
Determine the length of side of the pickup area;According to the length of side of the pickup area, the length of side of above-mentioned each elementary area is determined, The length of side of the pickup area is more than the length of side of above-mentioned each elementary area;According to the length of side of above-mentioned each elementary area, generation should First image.
Alternatively, the length of side of the pickup area is 2.5 times of the length of side of above-mentioned each elementary area.
Alternatively, the display module 410 is additionally operable to:
The 3rd image is shown on the display screen 420, the brightness value of each pixel is all higher than first in the 3rd image Brightness value;Wherein, the processing module 440 is more particularly for:
4th image is obtained by the optics module 430, the 4th image is the optics module 430 in the pickup area The image of 3rd image of collection;Binaryzation is carried out to the 4th image, obtains bianry image;According to the water of the bianry image Flat ladder degree response and vertical gradient response, determine the length of side of the pickup area.
Alternatively, first brightness value is 128.
Alternatively, the processing module 440 is more particularly for:
According to the horizontal gradient response and vertical gradient response of the bianry image, the length of side of the bianry image is determined;
According to the length of side of scaling He the bianry image, the length of side of the pickup area is determined, the scaling is adopted for this Ratio between the image that the image in collection region and the optics module 430 gather in the pickup area.
Alternatively, the processing module 440 is specifically used for:
According to the 3rd position, before determining the second place, the first offset is determined, for correcting the second place; According to first offset and the 3rd position, the second place is determined.
Alternatively, the processing module 440 is more particularly for:
The second offset is determined, second offset is the intended reference point in second image with respect to second image The offset vector of central point;First offset is determined according to second offset.
Alternatively, the processing module 440 is more particularly for:
According to scaling and second offset, first offset is determined, the scaling is the pickup area Ratio between the image that image and the optics module 430 gather in the pickup area.
Alternatively, the processing module 440 is specifically used for:
Before determining the pattern in second image in object-image element, the anglec of rotation is obtained, the anglec of rotation is should Angle of the image that optics module 430 gathers in the pickup area with respect to the image rotation of the pickup area;Obtain at first Image is managed, the first processing image is second image according to the postrotational image of the anglec of rotation;By analyzing this at first Image is managed, determines the pattern in the object-image element.
Alternatively, the processing module 440 is additionally operable to:
According to the first position, before determining the second place, scaling is obtained, the scaling is the pickup area Image and the image that is gathered in the pickup area of the optics module 430 between ratio.
Alternatively, the display module 410 is additionally operable to:
The 5th image is shown on the display screen 420, the 5th image includes k articles of the 3rd line segment being parallel to each other, the k bars At least two articles the 3rd adjacent line segments are covered in the pickup area in 3rd line segment, k >=2;Wherein, the processing module 440 has Body is used for:
6th image is obtained by the optics module 430, the 6th image is the optics module 430 in the pickup area The image of 5th image of collection;According to the first distance and second distance, determine the scaling, first distance for this Vertical range in five images between two article of the 3rd adjacent line segment, the second distance are adjacent two articles the in the 6th image Vertical range between three line segments.
Alternatively, first distance is 50 pixels of the display screen 420.
Alternatively, the side of every the 3rd line segment is vertically installed with j articles of the 4th line segment in this k articles the 3rd line segment, this j articles At least one the 4th line segment is covered in the pickup area in four line segments.
Alternatively, this j articles the 4th line segment is the line segment being parallel to each other, two article of the 4th adjacent line in this j articles the 4th line segment Vertical range between section is 25 pixels of the display screen 420.
Alternatively, the processing module 440 is additionally operable to:
The anglec of rotation is obtained, the anglec of rotation is that the image that the optics module 430 gathers in the pickup area relatively should The angle of the image rotation of pickup area.
Alternatively, the processing module 440 is specifically used for:
6th image is analyzed by Hough transformation, and obtains first angle;Obtain second processing image, the second processing Image is the 4th image according to the postrotational image of the first angle;By contrasting the second processing image and the 5th figure Picture, determine the anglec of rotation.
Alternatively, the display module 410 is additionally operable to:
The 7th image is shown on the display screen 420, the central point cross that the 7th image is included in the pickup area is handed over Two straight lines of fork;Wherein, the processing module 440 is additionally operable to:
8th image is obtained by the optics module 430, the 8th image is the optics module 430 in the pickup area The image of 7th image of collection;By analyzing the 8th image authentication second place.
Alternatively, the resolution ratio of the image of the display screen display and the resolution ratio of the display screen are identical.
In the embodiment of the present invention, term " module " can include with least one of lower component:
Application specific integrated circuit (Application Specific Integrated Circuit, ASIC), electronic circuit, For perform one or more softwares or firmware program processor (such as shared processor, proprietary processor or group processor Deng) and memory, merge logic circuit and the component of the function described by other supports.
It should be understood that device 400 here is embodied in the form of functional unit.In an optional example, art technology Personnel are appreciated that device 400 can be specially the electronic equipment referred in above method embodiment, can also be shown in Fig. 1 Electronic equipment 100.Device 400 can be used for performing each flow and/or step in above method embodiment, to avoid weight It is multiple, it will not be repeated here.
In implementation process, each step of the embodiment of the method in the embodiment of the present invention can pass through the hardware in processor Integrated logic circuit or software form instruction complete.More specifically, with reference to disclosed in the embodiment of the present invention method step Suddenly hardware decoding processor can be embodied directly in and perform completion, or combined with the hardware in decoding processor and software module Perform completion.Software module can be located at random access memory, and flash memory, read-only storage, programmable read only memory or electricity can In the ripe storage medium of this areas such as erasable programmable storage, register.The storage medium is located at memory, processor The information in memory is read, with reference to the step of its hardware completion above method.
That is, the embodiment of the method in the embodiment of the present invention can apply in processor, or it is real by processor It is existing.
Figure 12 shows the device 500 of another detection optics module of the embodiment of the present invention, including:Processor 510, storage Device 520, display screen 530 and optics module 540.Wherein, the pickup area of optics module 540 is located at least portion of display screen 530 Dividing viewing area, the memory 520 is used for store instruction, and the processor 510 is used for the instruction for performing the memory 520 storage, Wherein, the execution to the instruction causes the processor 510 to perform following operation:
The first image is shown on the display screen 530, first image includes multiple images unit, the plurality of elementary area In each elementary area on be provided with pattern, the pattern on above-mentioned each elementary area is used to indicate above-mentioned each elementary area In position of the reference point on first image.
Second image is obtained by the optics module 540, second image is the optics module 540 in the display screen 530 Pickup area in collection first image image;Determine the pattern in object-image element in second image;According to Pattern in the object-image element, the first position of intended reference point in the object-image element is determined, the first position is Position of the intended reference point on first image;According to the first position, the second place is determined, the second place is adopted for this Collect position of the central point in region on the display screen 530.
Therefore, electronic equipment can show pre-designed image (display image) on a display screen;Then light is passed through Module is learned to showing that the image of screen display carries out IMAQ, and obtains gathering image;Again by gather image analysis, Position of the central point of pickup area on the display screen is determined, finally realizes the positioning action of optics module.
Device 500 shown in Figure 12 can realize each process realized in preceding method embodiment by terminal device, To avoid repeating, repeat no more here.
In an optional example, it will be understood by those skilled in the art that device 500 can be specially in above-described embodiment Device 400, the electronic equipment also corresponded in above method embodiment.Device 500 can be used for performing above method reality The each flow and/or step in example are applied, to avoid repeating, will not be repeated here.
In the embodiment of the present invention, a kind of electronic equipment is also provided, the electronic equipment includes the device 400 in above-described embodiment Or device 500.
Alternatively, as one embodiment, the display screen can be Organic Light Emitting Diode (Organic Light- Emitting Diode, OLED) display screen, the optics module using the OLED display screen at least part OLED pixel unit make Carry out perform detection function for light source.
It should be understood that the processor referred in the embodiment of the present invention is probably a kind of IC chip, there is the place of signal Reason ability, it is possible to achieve or disclosed each method, step and logic diagram in the execution embodiment of the present invention.It is for example, above-mentioned Processor can be general processor, digital signal processor (digital signal processor, DSP), special collection Into circuit (application specific integrated circuit, ASIC), ready-made programmable gate array (field Programmable gate array, FPGA) or other PLDs, transistor logic, discrete hardware group Part etc..In addition, general processor can be microprocessor or the processor can also be any conventional processor etc..
In addition, the memory referred in the embodiment of the present invention can be volatile memory or nonvolatile memory, or It may include both volatibility and nonvolatile memory.Wherein, nonvolatile memory can be read-only storage (read- Only memory, ROM), programmable read only memory (programmable ROM, PROM), the read-only storage of erasable programmable Device (erasable PROM, EPROM), Electrically Erasable Read Only Memory (electrically EPROM, EEPROM) or Flash memory.Volatile memory can be random access memory (random access memory, RAM), and it is used as outside high Speed caching.It should be understood that above-mentioned memory is exemplary but is not restricted explanation, for example, the memory in the embodiment of the present invention Can also be static RAM (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), Synchronous Dynamic Random Access Memory (synchronous DRAM, SDRAM), Double Data Rate synchronous dynamic random Access memory (double data rate SDRAM, DDR SDRAM), enhanced Synchronous Dynamic Random Access Memory (enhanced SDRAM, ESDRAM), synchronized links dynamic random access memory (synch link DRAM, SLDRAM) with And direct rambus random access memory (Direct Rambus RAM, DR RAM) etc..That is, it is described herein The memories of system and method be intended to the memory of including but not limited to these and any other suitable type.
Finally it should be noted that the term used in the embodiment of the present invention and appended claims is only to go out In the purpose of description specific embodiment, and it is not intended to be limiting the embodiment of the present invention.
For example, " one kind " of singulative used in the embodiment of the present invention and appended claims, " described ", " above-mentioned " and "the" are also intended to including most forms, unless context clearly shows that other implications.
In another example the image of term first and the second image may be used in embodiments of the present invention, but these images should not It is limited to these terms.These terms are only used for image being distinguished from each other out.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein Member and algorithm steps, it can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually Performed with hardware or software mode, application-specific and design constraint depending on technical scheme.Professional and technical personnel Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed The scope of the embodiment of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments that the application provides, it should be understood that disclosed systems, devices and methods, Ke Yitong Other modes are crossed to realize.For example, device embodiment described above is only illustrative, for example, the division of the unit, Only a kind of division of logic function, can there is other dividing mode when actually realizing, for example, multiple units or component can be with With reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed Mutual coupling or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of device or unit or Communication connection, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of the embodiment of the present invention according to the actual needs 's.
In addition, each functional unit in embodiments of the present invention can be integrated in a processing unit or each Individual unit is individually physically present, can also two or more units it is integrated in a unit.
If realized in the form of SFU software functional unit and as independent production marketing or in use, one can be stored in In individual computer read/write memory medium.Based on such understanding, the technical scheme of the embodiment of the present invention is substantially right in other words The part or the part of the technical scheme that prior art contributes can be embodied in the form of software product, the calculating Machine software product is stored in a storage medium, including some instructions are make it that a computer equipment (can be personal Computer, server, or network equipment etc.) perform methods described of the embodiment of the present invention all or part of step.It is and foregoing Storage medium include:USB flash disk, mobile hard disk, read-only storage, random access memory, magnetic disc or CD etc. are various can be with The medium of store program codes.
The embodiment of above content, the only embodiment of the present invention, but the protection domain of the embodiment of the present invention is not This is confined to, any one skilled in the art can think easily in the technical scope that the embodiment of the present invention discloses To change or replacement, should all cover within the protection domain of the embodiment of the present invention.Therefore, the protection domain of the embodiment of the present invention It should be defined by scope of the claims.

Claims (27)

  1. A kind of 1. method for detecting optics module, it is characterised in that applied to the electronic equipment for including display screen and optics module;
    Methods described includes:
    In the display image of screen display first, described first image includes multiple images unit, the multiple elementary area In each elementary area on be provided with pattern, the pattern on each elementary area is used to indicate each elementary area In position of the reference point in described first image;
    Second image is obtained by the optics module, second image is collection of the optics module in the display screen The image of the described first image gathered in region;
    Determine the pattern in object-image element in second image;
    According to the pattern in the object-image element, the first position of intended reference point in the object-image element is determined, The first position is position of the intended reference point in described first image;
    According to the first position, the second place is determined, the second place shows for the central point of the pickup area described Position in display screen.
  2. 2. according to the method for claim 1, it is characterised in that it is described according to the first position, the second place is determined, is wrapped Include:
    According to the first position and mapping relation information, the 3rd position is determined, the 3rd position is the intended reference point Position on the display screen, the mapping relation information include described corresponding to the first position and the first position 3rd position;
    According to the 3rd position, the second place is determined.
  3. 3. method according to claim 1 or 2, it is characterised in that the pattern on each elementary area includes horizontal line Section and/or vertical line section;Each elementary area includes left half side region and right half side region, the line in left half side region Section is used for the row for indicating that elementary area is affiliated in described first image, is used to indicate that elementary area exists in right half side region Row belonging in described first image.
  4. 4. method according to claim 1 or 2, it is characterised in that the pattern on each elementary area includes horizontal line Section and/or vertical line section;Each elementary area includes upper half side region and lower half side region, and one in the lower half side region Bar horizontal line segment table shows that first is digital, and a vertical line segment table in the lower half side region shows the second numeral, the upper half side region One article of interior horizontal line segment table shows the 3rd numeral.
  5. 5. method according to any one of claim 1 to 4, described first image is array image, the multiple image Each elementary area in unit is square-shaped image unit, and the pickup area is square area;
    Wherein, methods described also includes:
    Before the display image of screen display first, the length of side of the pickup area is determined;
    According to the length of side of the pickup area, the length of side of each elementary area is determined, the length of side of the pickup area is more than The length of side of each elementary area;
    According to the length of side of each elementary area, described first image is generated.
  6. 6. according to the method for claim 5, it is characterised in that the length of side for determining the pickup area, including:
    The brightness value of each pixel is all higher than the first brightness in the display image of screen display the 3rd, the 3rd image Value;
    4th image is obtained by the optics module, the 4th image is that the optics module is adopted in the pickup area The image of the 3rd image of collection;
    Binaryzation is carried out to the 4th image, obtains bianry image;
    According to the horizontal gradient response and vertical gradient response of the bianry image, the length of side of the pickup area is determined.
  7. 7. according to the method for claim 6, it is characterised in that the horizontal gradient response according to the bianry image With vertical gradient response, the length of side of the pickup area is determined, including:
    According to the horizontal gradient response and vertical gradient response of the bianry image, the length of side of the bianry image is determined;
    According to the length of side of scaling and the bianry image, the length of side of the pickup area is determined, the scaling is institute The ratio that the image of pickup area is stated between image that the optics module gathers in the pickup area.
  8. 8. according to the method for claim 2, it is characterised in that methods described also includes:
    The first offset is determined, first offset is used to correct the second place;
    Wherein, it is described according to the 3rd position, the second place is determined, including:
    According to first offset and the 3rd position, the second place is determined.
  9. 9. according to the method for claim 8, it is characterised in that the first offset of the determination, including:
    The second offset is determined, second offset is relatively described second figure of intended reference point described in second image The offset vector of the central point of picture;
    According to scaling and second offset, first offset is determined, the scaling is the acquisition zone Ratio between the image that the image in domain and the optics module gather in the pickup area.
  10. 10. method according to any one of claim 1 to 9, it is characterised in that methods described also includes:
    The anglec of rotation is obtained, the anglec of rotation is that the image that the optics module gathers in the pickup area is relatively described The angle of the image rotation of pickup area;
    Wherein, the pattern determined in second image in object-image element, including:
    The first processing image is obtained, the first processing image is second image according to the postrotational figure of the anglec of rotation Picture;
    By analyzing the first processing image, the pattern in the object-image element is determined.
  11. 11. method according to any one of claim 1 to 10, it is characterised in that it is described according to the first position, really Before the fixed second place, methods described also includes:
    Scaling is obtained, the scaling is the image of the pickup area and the optics module in the pickup area Ratio between the image of interior collection;The acquisition scaling, including:
    In the display image of screen display the 5th, the 5th image includes k articles of the 3rd line segment being parallel to each other, the k bars At least two articles the 3rd adjacent line segments are covered in the pickup area in 3rd line segment, k >=2;
    6th image is obtained by the optics module, the 6th image is that the optics module is adopted in the pickup area The image of the 5th image of collection;
    According to the first distance and second distance, the scaling is determined, first distance is adjacent in the 5th image Two article of the 3rd line segment between vertical range, the second distance be in the 6th image adjacent two article of the 3rd line segment it Between vertical range.
  12. 12. according to the method for claim 11, it is characterised in that methods described also includes:
    The anglec of rotation is obtained, the anglec of rotation is that the image that the optics module gathers in the pickup area is relatively described The angle of the image rotation of pickup area;The acquisition anglec of rotation, including:
    6th image is analyzed by Hough transformation, and obtains first angle;
    Second processing image is obtained, the second processing image is the 4th image according to the postrotational figure of the first angle Picture;
    By contrasting the second processing image and the 5th image, the anglec of rotation is determined.
  13. 13. the method according to any one of claim 1 to 12, it is characterised in that methods described also includes:
    In the display image of screen display the 7th, the 7th image is included in the central point right-angled intersection of the pickup area Two straight lines;
    8th image is obtained by the optics module, the 8th image is that the optics module is adopted in the pickup area The image of the 7th image of collection;
    By analyzing the second place described in the 8th image authentication.
  14. A kind of 14. device for detecting optics module, it is characterised in that including;
    Display module, for showing the image of screen display first described, described first image includes multiple images unit, described Pattern is provided with each elementary area in multiple images unit, each pattern on elementary area is described for indicating Position of the reference point in described first image in each elementary area;
    Processing module, the processing module are used for:
    Second image is obtained by the optics module, second image is collection of the optics module in the display screen The image of the described first image gathered in region;
    Determine the pattern in object-image element in second image;
    According to the pattern in the object-image element, the first position of intended reference point in the object-image element is determined, The first position is position of the intended reference point in described first image;
    According to the first position, the second place is determined, the second place shows for the central point of the pickup area described Position in display screen.
  15. 15. device according to claim 14, it is characterised in that the processing module is specifically used for:
    According to the first position and mapping relation information, the 3rd position is determined, the 3rd position is the intended reference point Position on the display screen, the mapping relation information include described corresponding to the first position and the first position 3rd position;
    According to the 3rd position, the second place is determined.
  16. 16. the device according to claims 14 or 15, it is characterised in that the pattern on each elementary area includes horizontal stroke Line segment and/or vertical line section;Each elementary area includes left half side region and right half side region, in left half side region Line segment is used for the row for indicating that elementary area is affiliated in described first image, is used to indicate elementary area in right half side region Row belonging in described first image.
  17. 17. the device according to claims 14 or 15, it is characterised in that the pattern on each elementary area includes horizontal stroke Line segment and/or vertical line section;Each elementary area includes upper half side region and lower half side region, in the lower half side region One horizontal line segment table shows that first is digital, and a vertical line segment table in the lower half side region shows the second numeral, the upper half lateral areas One article of horizontal line segment table in domain shows the 3rd numeral.
  18. 18. the device according to any one of claim 14 to 17, it is characterised in that
    Described first image is array image, and each elementary area in the multiple elementary area is square-shaped image unit, The pickup area is square area;
    Wherein, the processing module is additionally operable to:
    Before the display image of screen display first, the length of side of the pickup area is determined;
    According to the length of side of the pickup area, the length of side of each elementary area is determined, the length of side of the pickup area is more than The length of side of each elementary area;
    According to the length of side of each elementary area, described first image is generated.
  19. 19. device according to claim 18, it is characterised in that the display module is additionally operable to:
    The brightness value of each pixel is all higher than the first brightness in the display image of screen display the 3rd, the 3rd image Value;
    Wherein, the processing module is more particularly for:
    4th image is obtained by the optics module, the 4th image is that the optics module is adopted in the pickup area The image of the 3rd image of collection;
    Binaryzation is carried out to the 4th image, obtains bianry image;
    According to the horizontal gradient response and vertical gradient response of the bianry image, the length of side of the pickup area is determined.
  20. 20. device according to claim 19, it is characterised in that the processing module is more particularly for:
    According to the horizontal gradient response and vertical gradient response of the bianry image, the length of side of the bianry image is determined;
    According to the length of side of scaling and the bianry image, the length of side of the pickup area is determined, the scaling is institute The ratio that the image of pickup area is stated between image that the optics module gathers in the pickup area.
  21. 21. device according to claim 15, it is characterised in that the processing module is specifically used for:
    According to the 3rd position, before determining the second place, the first offset is determined, first offset is used for Correct the second place;
    According to first offset and the 3rd position, the second place is determined.
  22. 22. device according to claim 21, it is characterised in that the processing module is more particularly for:
    The second offset is determined, second offset is relatively described second figure of intended reference point described in second image The offset vector of the central point of picture;
    According to scaling and second offset, first offset is determined, the scaling is the acquisition zone Ratio between the image that the image in domain and the optics module gather in the pickup area.
  23. 23. the device according to any one of claim 14 to 22, it is characterised in that the processing module is specifically used for:
    Before determining the pattern in second image in object-image element, the anglec of rotation is obtained, the anglec of rotation is institute State the angle of the image rotation for the relatively described pickup area of image that optics module gathers in the pickup area;
    The first processing image is obtained, the first processing image is second image according to the postrotational figure of the anglec of rotation Picture;
    By analyzing the first processing image, the pattern in the object-image element is determined.
  24. 24. the device according to any one of claim 14 to 23, it is characterised in that
    The display module is additionally operable to:
    In the display image of screen display the 5th, the 5th image includes k articles of the 3rd line segment being parallel to each other, the k bars At least two articles the 3rd adjacent line segments are covered in the pickup area in 3rd line segment, k >=2;
    Wherein, the processing module is additionally operable to:
    6th image is obtained by the optics module, the 6th image is that the optics module is adopted in the pickup area The image of the 5th image of collection;
    According to the first distance and second distance, scaling, image and institute of the scaling for the pickup area are determined The ratio between the image that optics module gathers in the pickup area is stated, first distance is phase in the 5th image Vertical range between two article of the 3rd adjacent line segment, the second distance are two article of the 3rd line segment adjacent in the 6th image Between vertical range.
  25. 25. device according to claim 24, it is characterised in that the processing module is additionally operable to:
    6th image is analyzed by Hough transformation, and obtains first angle;
    Second processing image is obtained, the second processing image is the 4th image according to the postrotational figure of the first angle Picture;
    By contrasting the second processing image and the 5th image, the anglec of rotation is determined, the anglec of rotation is the light Learn the angle of the image rotation for the relatively described pickup area of image that module gathers in the pickup area.
  26. 26. the device according to any one of claim 14 to 25, it is characterised in that the display module is additionally operable to:
    In the display image of screen display the 7th, the 7th image is included in the central point right-angled intersection of the pickup area Two straight lines;
    Wherein, the processing module is additionally operable to:
    8th image is obtained by the optics module, the 8th image is that the optics module is adopted in the pickup area The image of the 7th image of collection;
    By analyzing the second place described in the 8th image authentication.
  27. 27. a kind of electronic equipment, it is characterised in that including the detection optics module any one of claim 14 to 26 Device.
CN201780001068.3A 2017-09-13 2017-09-13 Detect the method, apparatus and electronic equipment of optics module Active CN107690656B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/101638 WO2019051688A1 (en) 2017-09-13 2017-09-13 Method and apparatus for detecting optical module, and electronic device

Publications (2)

Publication Number Publication Date
CN107690656A true CN107690656A (en) 2018-02-13
CN107690656B CN107690656B (en) 2019-04-02

Family

ID=61154082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201780001068.3A Active CN107690656B (en) 2017-09-13 2017-09-13 Detect the method, apparatus and electronic equipment of optics module

Country Status (2)

Country Link
CN (1) CN107690656B (en)
WO (1) WO2019051688A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110706158B (en) * 2019-10-15 2023-04-07 Oppo广东移动通信有限公司 Image processing method, image processing device and terminal equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103002199A (en) * 2012-10-19 2013-03-27 北京小米科技有限责任公司 Camera-module-based image acquisition method and device and mobile terminal
US20150146943A1 (en) * 2013-11-22 2015-05-28 Samsung Electronics Co., Ltd. Method of recognizing contactless fingerprint and electronic device for performing the same
CN105335072A (en) * 2014-06-12 2016-02-17 联想(北京)有限公司 Positioning method and apparatus
CN205750806U (en) * 2016-03-07 2016-11-30 北京集创北方科技股份有限公司 Fingerprint identification device and mobile terminal
CN106839976A (en) * 2016-12-22 2017-06-13 歌尔科技有限公司 A kind of method and device at detector lens center
CN106919286A (en) * 2017-03-07 2017-07-04 上海欢米光学科技有限公司 The method and apparatus of adjustment touch-screen picture position

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103002199A (en) * 2012-10-19 2013-03-27 北京小米科技有限责任公司 Camera-module-based image acquisition method and device and mobile terminal
US20150146943A1 (en) * 2013-11-22 2015-05-28 Samsung Electronics Co., Ltd. Method of recognizing contactless fingerprint and electronic device for performing the same
CN105335072A (en) * 2014-06-12 2016-02-17 联想(北京)有限公司 Positioning method and apparatus
CN205750806U (en) * 2016-03-07 2016-11-30 北京集创北方科技股份有限公司 Fingerprint identification device and mobile terminal
CN106839976A (en) * 2016-12-22 2017-06-13 歌尔科技有限公司 A kind of method and device at detector lens center
CN106919286A (en) * 2017-03-07 2017-07-04 上海欢米光学科技有限公司 The method and apparatus of adjustment touch-screen picture position

Also Published As

Publication number Publication date
WO2019051688A1 (en) 2019-03-21
CN107690656B (en) 2019-04-02

Similar Documents

Publication Publication Date Title
Zou et al. Deepcrack: Learning hierarchical convolutional features for crack detection
Huang et al. Road centreline extraction from high‐resolution imagery based on multiscale structural features and support vector machines
CN104700062B (en) A kind of method and apparatus for recognizing Quick Response Code
CN104951726B (en) Method and device for QR Quick Response Code position sensings
CN108875577A (en) Object detection method, device and computer readable storage medium
CN109816745B (en) Human body thermodynamic diagram display method and related products
CN109977191B (en) Problem map detection method, device, electronic equipment and medium
CN109815843A (en) Object detection method and Related product
CN109376631A (en) A kind of winding detection method and device neural network based
CN103971399A (en) Street view image transition method and device
CN104809452A (en) Fingerprint identification method
CN104463240B (en) A kind of instrument localization method and device
CN110135424A (en) Tilt text detection model training method and ticket image Method for text detection
CN106062824B (en) edge detecting device and edge detection method
CN102930251B (en) Bidimensional collectibles data acquisition and the apparatus and method of examination
CN106295498A (en) Remote sensing image target area detection apparatus and method
CN111401472B (en) Infrared target classification method and device based on deep convolutional neural network
CN107368790B (en) Pedestrian detection method, system, computer-readable storage medium and electronic device
CN107403160A (en) Image detecting method, equipment and its storage device in a kind of intelligent driving scene
CN110490232A (en) Method, apparatus, the equipment, medium of training literal line direction prediction model
CN111220235B (en) Water level monitoring method and device
Lam Methodologies for mapping land cover/land use and its change
CN105973140A (en) Method of measuring object spatial parameters and mobile terminal
CN106407908A (en) Training model generation method and human face detection method and device
CN108920476A (en) Map retrieval calculates pass and holds up test macro and its test method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant