CN107690656B - 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
CN107690656B
CN107690656B CN201780001068.3A CN201780001068A CN107690656B CN 107690656 B CN107690656 B CN 107690656B CN 201780001068 A CN201780001068 A CN 201780001068A CN 107690656 B CN107690656 B CN 107690656B
Authority
CN
China
Prior art keywords
image
pickup area
optics module
area
display screen
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.)
Active
Application number
CN201780001068.3A
Other languages
Chinese (zh)
Other versions
CN107690656A (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
    • 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
    • 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/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 comprises: in first image of display screen display, first image includes multiple images unit, pattern is provided on each elementary area in multiple elementary area, the pattern on each elementary area is used to indicate position of the reference point in each elementary area on first image;The second image is obtained, which is the image for first image that the optics module acquires in the pickup area of the display screen;Determine the pattern in second image in object-image element;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 Image Acquisition is carried out by optics module;Again by analyzing the image of acquisition, 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 fields, and more particularly, to it is a kind of detect optics module method, Device and electronic equipment.
Background technique
Currently, fingerprint identification function is the standard configuration of smart phone.Traditional scheme be by independent community's key or virtually by Key carries out the design of fingerprint recognition key, for example, optics module is integrated in the preposition Home key of mobile phone by some smart phones, Using Home key as fingerprint recognition key.It include fingerprint sensor in the optics module.
Further, in order to reduce the size of smart phone, the display screen of the smart phone of more and more cell phone manufacturers Frame design it is super narrow.However, fingerprint recognition key is placed without sufficient space in the lower section of this display screen.For Solution this problem, a kind of feasible technical solution are fingerprint identification technology in display screen.Specifically, by fingerprint recognition function Can completely is integrated into display screen, and user, which can directly touch, specifies region to realize that fingerprint is known in the display screen of intelligent terminal 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 certain application scenarios, application program is needed using the smart phone of fingerprint identification technology in display screen The mount message of optics module can voluntarily be obtained.For example, installation site, the information such as direction of rotation.
Currently, there are no solutions regarding to the issue above.
Summary of the invention
A kind of method, apparatus and electronic equipment for detecting optics module is provided, the optics module can be effectively obtained Mount message.
In a first aspect, a kind of method for detecting optics module is provided, applied to the electricity including display screen and optics module Sub- equipment;
The described method includes:
The first image is shown on the display screen, and the first image includes multiple images unit, described multiple images Pattern is provided on each elementary area in unit, the pattern on each elementary area is used to indicate each image Position of the reference point in the first image in unit;The second image, second figure are obtained by the optics module Image as being the first image that the optics module acquires 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 the first image;Root According to the first position, determine the second position, the second position be the central point of the pickup area on the display screen Position.
It 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 Image Acquisition is carried out by image of the optics module to display screen display, and obtains acquisition image;Pass through again Analysis to acquisition image, determines position of the central point of pickup area on the display screen, final realization optics module Positioning operation.
In addition, this programme indicates that reference point is on the first image in elementary area by the pattern being arranged on elementary area Position, be then based on the position of 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 the position of elementary area on the first image It sets, positioning accuracy is higher.
It is described according to the first position in some possible implementations, determine the second position, comprising:
According to the first position and mapping relation information, determine that the third place, the third place are target ginseng The position of examination point on the display screen, the mapping relation information include that the first position and the first position are corresponding The third place;According to the third place, the second position 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 Unit in the first image belonging to column, be used to indicate elementary area in the first image in right half side region 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 One is digital, and a vertical line segment table in the lower half side region shows the second number, a horizontal line section in the upper half side region Indicate third number.
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.
The first image is array image, and each elementary area in described multiple images unit is square image list Member, the pickup area are square region;Wherein, the method also includes:
Before showing the first image on the display screen, the side length of the pickup area is determined;According to the acquisition zone The side length in domain determines that the side length of each elementary area, the side length of the pickup area are greater than each elementary area Side length;According to the side length of each elementary area, the first image is generated.
In some possible implementations, the side length of the determination pickup area, comprising:
Third image is shown on the display screen, and the brightness value of each pixel is all larger than first in the third image Brightness value;The 4th image is obtained by the optics module, the 4th image is the optics module in the pickup area The image of the third image of interior acquisition;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 side length of the pickup area.
In some possible implementations, the horizontal gradient response and vertical gradient according to the bianry image Response determines the side length of the pickup area, comprising:
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 side length of scaling and the bianry image, the side length of the pickup area is determined, the scaling is described The ratio of the image of pickup area and the optics module between the image acquired in the pickup area.
In some possible implementations, the method also includes:
Determine that the first offset, first offset can be used for correcting the second position;Wherein, described according to institute The third place is stated, determines the second position, comprising:
According to first offset and the third place, the second position is determined.
The technical solution of the embodiment of the present invention can further increase positioning accuracy.
In some possible implementations, first offset of determination, comprising:
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 Scaling is the ratio of the image and the optics module of the pickup area between the image acquired in the pickup area Example.
In some possible implementations, the method also includes:
Rotation angle is obtained, the rotation angle is that the image that the optics module acquires in the pickup area is opposite The angle of the image rotation of the pickup area;Wherein, the pattern in the determination second image in object-image element, Include:
The first processing image is obtained, the first processing image is after second image is rotated according to the rotation angle 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 position Method further include:
Scaling is obtained, the scaling is the image of the pickup area and the optics module in the acquisition The ratio between image acquired in region;The acquisition scaling, comprising:
The 5th image is shown on the display screen, and the 5th image includes k articles of third line segment being parallel to each other, described At least two adjacent third line segments are covered in the pickup area in k third 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 acquires in the pickup area Picture;According to first distance and second distance, the scaling is determined, the first distance is adjacent in the 5th image Vertical range between two third line segments, the second distance are between two articles of third line segments adjacent in the 6th image Vertical range.
In some possible implementations, the method also includes:
Rotation angle is obtained, the rotation angle is that the image that the optics module acquires in the pickup area is opposite The angle of the image rotation of the pickup area;The acquisition rotates angle, comprising:
The 6th image is analyzed by Hough transformation, and obtains first angle;Acquisition second processing image, described second Handling image is the 4th image according to the postrotational image of the first angle;By compare the second processing image and 5th image determines the rotation angle.
In some possible implementations, the method also includes:
The 7th image is shown on the display screen, and the 7th image includes the central point cross in the pickup area Two straight lines intersected;The 8th image is obtained by the optics module, the 8th image is the optics module described The image of the 7th image acquired in pickup area;By analyzing the second position described in the 8th image authentication.
In some possible implementations, the side length of the pickup area is the side length of each elementary area 2.5 again.This programme can effectively ensure that: there are an object-image elements in effective coverage.
In some possible implementations, first brightness value is 128.
In some possible implementations, the resolution ratio of the image of the display screen display and point of the display screen Resolution is identical.
In some possible implementations, the image of the display screen display covers the pickup area.
Second aspect provides a kind of device for detecting optics module, including;For executing above-mentioned first aspect or first Method in any possible implementation of aspect.
Specifically, which includes for executing in any possible implementation of above-mentioned first aspect or first aspect Method unit.
The third aspect provides a kind of device for detecting optics module, including;
Display module, for showing the first image on the display screen, the first image includes multiple images unit, Pattern is provided on each elementary area in described multiple images unit, the pattern on each elementary area is used to indicate Position of the reference point in the first image in each elementary area.
Processing module, the processing module are used for:
The second image is obtained by the optics module, second image is the optics module in the display screen The image of the first image acquired in pickup area;Determine the pattern in second image in object-image element;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 the first image;According to the first position, the second position is determined, institute State the central point position on the display screen that the second position is the pickup area.
Fourth aspect provides a kind of device for detecting optics module, including;
Memory and processor, the memory for storing instruction, deposit for executing the memory by the processor The instruction of storage, and when the processor executes the instruction of the memory storage, execute above-mentioned first aspect or first party Method in any possible implementation in face.
5th aspect, provides a kind of computer-readable medium, and for storing computer program, which includes using The instruction of method in any possible implementation for executing above-mentioned first aspect or first aspect.
6th aspect, provides a kind of electronic equipment, the device including detection optics module described in second aspect.
In some possible implementations, the display screen is Organic Light Emitting Diode OLED display screen, the optics Mould group executes detection function as light source using at least partly OLED pixel unit of the OLED display screen.
Detailed description of the invention
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.
Specific embodiment
Below in conjunction with attached drawing, technical solution in the embodiment of the present invention is described.
It should be understood that the embodiment of the present invention is suitable for any device and equipment 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 It is illustrated for machine.
Fig. 1 is the side, sectional view of the electronic equipment 100 of the embodiment of the present invention.
Specifically, which includes the optics module of display screen 110 with the back side for being assemblied in 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 acquisition of image in pickup area 130.
For example, optics module 120 can acquire the image shown on display screen 100 in pickup area 130.
In another example optics module 120 can detect mould group for optical finger print mould group or other kinds of optical bio, It can be used for carrying out fingerprint recognition or the identification of other biological feature.Specifically, the optics module 120 uses optical finger print When mould group, the regional area (that is, dactylotype under display screen) below the display screen 110 can be set or be integrated into Regional area (that is, dactylotype in display screen) inside display screen 110 can be used for acquiring 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 mould group Effective coverage is detected, at least partly display area of the display screen 110 is located at, to realize in screen
(In-Display) fingerprint detection.Wherein, implementation as one preferred, the display screen 110 can be Organic Light Emitting Diode (OLED) display screen, 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 mould group positioned at the OLED pixel unit of the pickup area 130. Alternatively, in other embodiments, the fingerprint detection effective coverage of the optical finger print mould group can also cover the display The entire display area of screen 110, 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, need to show that fingerprint prompts pattern on display screen 110 when optics module 120 is used to carry out fingerprint recognition, To indicate that user inputs fingerprint in suitable region.But the position of fingerprint prompt 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 modification, 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 specific position on show fingerprint prompt pattern, it is possible that fingerprint prompt pattern position inaccurate the problem of, cause Optics module 120 can collected effective fingerprint area tail off, reduce the efficiency of fingerprint recognition, influence user experience.
To solve the above-mentioned problems, a kind of method for detecting optics module is provided in the embodiment of the present invention.
Specifically, the algorithm of complete set is provided, it, 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 when installation Gyration and the scaling etc. for exporting image.And then realize the adaptive location of optics module (Sensor) under mobile phone screen Detection function.
The method of the detection optics module of the embodiment of the present invention is illustrated below.It should be understood that the embodiment of the present invention The method of detection optics module can be applied 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 first image of display screen display, which includes multiple images unit, multiple image list Pattern is provided 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, which is acquisition of the optics module in the display screen The image of first image acquired in region.
230, determine the pattern in second image in object-image element.
240, according to the pattern in the object-image element, determine first of intended reference point in the object-image element It sets, which is position of the intended reference point on first image.
250, according to the first position, determine the second position, which is that the central point of the pickup area is aobvious at this Position in display screen.
In brief, electronic equipment can show pre-designed image (display image) on a display screen;Then lead to It crosses optics module and Image Acquisition is carried out to the image of display screen display, and obtain acquisition image;Again by acquisition image Analysis, determines position of the central point of pickup area on the display screen, the final positioning operation for realizing optics module.
In the embodiment of the present invention, electronic equipment can be first passed through in the positioning operation to optics module to the second image Position of the intended reference point on display image in the second image is determined in analysis;In turn, which can be according to this Position of the intended reference point on display image, determines position of the central point of pickup area on the display screen.
For example, electronic equipment can determine the third place, the third first according to the first position and mapping relation information Position is position of the intended reference point on the display screen, which includes the first position and the first position The corresponding the third place;Then according to the third place, the second position is determined.
It should be noted that electronic equipment can determine the second position by the third place in the embodiment of the present invention;Electronic equipment is also It can be determined as the second position 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 It can be determined as the second position directly by the first position.
For ease of description, 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 known as the third place. By position of the central point of the pickup area on the display screen, the referred to as second position.Similarly, for ease of description, by electronics The image shown on a display screen when equipment is to the positioning for carrying out optics module is known as the first image, by optics module in the display The image obtained after first image is acquired in the pickup area of screen is known as the second image.Similarly, there are also third images, the 4th Image, the 5th image, the 6th image etc., but should not necessarily be limited by these terms.These terms are only used to type cell group each other It distinguishes.
It should be understood that the practical image of optics module output includes but is not limited to that optics module is being adopted in the embodiment of the present invention Collect region acquired image.
For example, showing a white image on a display screen, the image exported after optics module acquisition includes black region And white area, the image of white area are corresponding with the image of pickup area on display screen.In the embodiment of the present invention, by the display 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 area) in image.
The first image of the embodiment of the present invention is illustrated below.
Optionally, the pattern on each elementary area on the first image of the embodiment of the present invention may include horizontal line section And/or vertical line section.
For example, above-mentioned each elementary area may include left half side region and right half side region, the line in left half side region Section be used to indicate elementary area on first image belonging to column, be used to indicate in right half side region 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 serial number, the be expert at serial number of right side value of information representative image unit;Each side region is divided into two parts up and down again, Lower every horizontal line in part represents numerical value 1, and every vertical line represents numerical value 4, i.e. lower part classification is similar to 4 systems;Instantly partial straight lines generation When the numerical value of table completely 16, lower straight is emptied, while upper straight adds 1;So regular are as follows: 4 systems inside region, lower regions Between be 16 systems.Electronic equipment can determine object-image element by the line segment in object-image element as a result, 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, since electronic equipment is by the figure in analysis 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.
Optionally, which can also generate first image before first image of display screen display.
For example, it is assumed that first image is array image, each elementary area in multiple elementary area is square Elementary area, the pickup area are square region;Electronic equipment can determine the side length of the pickup area;According to the acquisition zone The side length in domain determines that the side length of above-mentioned each elementary area, the side length of the pickup area are greater than the side of above-mentioned each elementary area It is long;According to the side length of above-mentioned each elementary area, first image is generated.
Optionally, the side length of the pickup area is 2.5 times of the side length of above-mentioned each elementary area.
In the embodiment of the present invention, image two that electronic equipment first can be acquired optics in pickup area by Threshold segmentation Value determines the side length of the pickup area then by brightness value projection both vertically and horizontally.
Specifically, electronic equipment can in the display screen display third image, the third image each pixel Brightness value be all larger than the first brightness value;The 4th image is obtained by the optics module, the 4th image is that the optics module exists The image of the third image acquired 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 side length of the pickup area.
Optionally, which is 128.
For example, the third image is a secondary full white image, the 4th image is as shown in Figure 3.
More specifically, electronic equipment can set the gray value of the point on the 4th image to 0 or 255, that is, will be whole A image shows apparent black and white effect.It is obtained that is, the gray level image of 256 brightness degrees is chosen by threshold value appropriate It obtains and still can reflect the whole bianry image with local feature of image, and then extract bianry image feature, this is research gray scale The most special method of transformation, the referred to as binaryzation of image.The bianry image feature can be the spy including being formed by a string 0,1 Levy vector.
It will be understood by those skilled in the art that bianry image plays a very important role in Digital Image Processing, it is special It is not in practical image procossing, the system constituted with binary Images Processing realization is very much.Therefore, using " two-value Change " processing image, not only application is strong, but also is conducive to when being further processed to image, the set property of image only with The position for the point that the value of pixel is 0 or 255 is related, does not further relate to the multilevel values of pixel, so that processing is become simple, and data Processing and decrement it is small.
Ideal bianry image in order to obtain can not be handed over using the boundary definition of closing, connection in the embodiment of the present invention Folded region.Specifically, the pixel that all gray scales are greater than or equal to threshold value is judged as belonging to certain objects, gray value is used 255 indicate that otherwise these pixels are excluded other than object area, gray value 0, indicate the object areas of background or exception Domain.It can be found that if certain certain objects has uniform gray value in inside, and it is in one with other grades Under the homogeneous background of gray value, the segmentation effect compared can be obtained by using threshold method.
To sum up, electronic equipment can show a white image (third image) on a display screen, optics module is defeated 4th image as shown in Figure 3 out, most of region of this image be it is highlighted, brightness value at least 128 or more, and This highlight regions necessarily rectangle, and this rectangular area is exactly the effective coverage of the 4th image of optics module.However, In the embodiment of the present invention, the pickup area of display screen is corresponding be exactly optics module output image effective coverage.
That is, electronic equipment can be by Threshold segmentation, by the 4th image binaryzation, and pass through vertical direction and water Square to brightness value projection, determine the side length of the bianry image, and then the acquisition is determined according to the side length of the bianry image The side length in region.
For example, electronic equipment can be determined according to the horizontal gradient response and vertical gradient response of the bianry image The side length of the bianry image;Then the side length of the bianry image is determined as to the side length of the pickup area.
In addition, being exactly the output image of optics module since the pickup area of display screen is corresponding in the embodiment of the present invention Effective coverage.That is, the size of image is possible into scaling and closes in the size of image and effective coverage in pickup area System.
Therefore, electronic equipment can also first according to the horizontal gradient response of the bianry image and vertical gradient response, Determine the side length of the bianry image;Then according to the side length of scaling and the bianry image, the side length of the pickup area is determined, The scaling is the ratio of the image and the optics module of the pickup area between the image acquired in the pickup area.
It is appreciated that in embodiments of the present invention, the electronic equipment can before first image of display screen display, Generate first image;Existing first image can also be called directly.The embodiment of the present invention is not specifically limited.For example, should First image can be placed in the electronic device by preconfigured mode.
In embodiments of the present invention, the third place can be determined directly as the second position by electronic equipment.Wherein, the third Position is position of the intended reference point on the display screen, which 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 determined as this and adopt by electronic equipment Collect position of the central point in region on the display screen.That is, intended reference point to be determined as to the central point of pickup area.
That is, the intended reference point in the embodiment of the present invention must be inevitable in the center of effective coverage, otherwise There can be error.
Therefore, a kind of method for correcting the second position is additionally provided in the embodiment of the present invention.
Optionally, which can first determine the first offset according to the third place, before determining the second position Amount, first offset are the offset vector for correcting the second position;Then according to first offset and the third place, Determine the second position.
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, which is the acquisition The ratio of the image in region and the optics module between the image acquired in the pickup area.
Further, since the reason of assembly technology of optics module is inaccurate or design is modified, may cause different batches The rigging position of optics module will appear a rotation angle relative to display screen.That is, electronic equipment determine this second Before position, it is possible to need to obtain the rotation angle.
In the embodiment of the present invention, in non-limiting manner as example, which can be in determining second image Before pattern in object-image element, rotation angle is obtained, which 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.Electronic equipment target in determining second image as a result, When pattern on elementary area, the first processing image can be obtained first, which is second image according to this Rotate the postrotational image of angle;Then by analyzing the first processing image, the pattern in the object-image element is determined.
If should be understood that the assembly technology of optics module is accurate enough, the rotation angle of optics module may be 0, this In the case of, during actual location optics module the target image can be determined first in the case where not obtaining rotation angle Pattern on unit.
In the embodiment of the present invention, additionally provides a kind of electronic equipment and obtain the scaling and rotate the method for angle.
The implementation that the electronic equipment obtains the scaling and rotates angle is illustrated below.
Optionally, electronic equipment can be in the 5th image of display screen display, and the 5th image includes the k being parallel to each other Third line segment, at least two adjacent third line segments are covered in the pickup area in the k third 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 acquires in the pickup area Image;According to first distance and second distance, the scaling is determined, which is two articles adjacent in the 5th image Vertical range between third line segment, the second distance be in the 6th image between adjacent two articles of third line segments it is vertical away from From.
For example, the first distance is 50 pixels of the display screen.
Further, the electronic equipment in the embodiment of the present invention is in the rotation angle for needing to obtain optics module, can be with So that the side of every third line segment is vertically installed with j articles of the 4th line segment in the k articles of third 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, which is the 4th image according to the postrotational image of the first angle;By compare this second Image and the 5th image are handled, determines the rotation angle.
More specifically, electronic equipment can analyze its rotation using Hough transformation (Hough Transform) to the 6th image 6th image is rotated according to the first angle being calculated, and carries out Sobel Operator (Sobel operator) by gyration Contours extract and Threshold segmentation, then further according to upright projection, whether analysis rotation angle needs to add and subtract 180 degree, final to determine The rotation angle out.
Hough transformation (Hough Transform) is introduced below.
Hough transform is one of image procossing Feature Extraction Technology, it has spy by a kind of detection of Voting Algorithm The object of setting shape.Classical Hough transformation is used to the straight line in detection image, and later Hough transformation expands to arbitrary shaped body Identification, it is mostly round and oval.During realization, Hough transform process is related to the transformation 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 at peak value, and then the problem of detection arbitrary shape.In the embodiment of the present invention, Hough can use It converts to the first angle for determining the 6th image.
Sobel Operator (Sobel operator) is introduced below.
Sobel operator is one of the operator in image procossing, is mainly used as edge detection.Technically, it is one discrete Property difference operator, for the approximation of the gradient of operation brightness of image function.This operator is used in any point of image, it will Generate corresponding gradient vector or its law vector.
The term that Sobel operator is related to has:
Edge:, can be with segmented image 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, the mutation etc. of texture structure.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 image 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 variation along edge trend is gentle, and perpendicular to The pixel variation of edge trend is violent.This variation may be rendered as jumping type, roof type and flange-type.These variations are right respectively Answer physical state different in scenery.For example, the depth either reflecting boundary of jumping type variation 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 Miscellaneous, it needs to be made a concrete analysis of according to the actual situation.
Marginal point: there is coordinate [x, y] in image, and be in the point on the position of intensity significant changes.
Edge section: correspond to marginal point coordinate [x, y] and its orientation, the orientation at edge may be gradient angle.
During realization, after the gradient value G (x, y) at pixel all in image has been calculated in Sobel operator, selection One threshold value T, if G (x, y) > T at (x, y), then it is assumed that the point is marginal point or edge section.In addition, due to Sobel operator The brightness value projection using 2 directions, i.e. horizontal gradient response and vertical gradient response are only needed, so that the calculating of edge detection Simply, speed is fast.
In the embodiment of the present invention, by carrying out Sobel contours extract and Threshold segmentation to second processing image, it can analyze Whether the first angle of the embodiment of the present invention needs to add and subtract 180 degree out, and then determines the rotation angle of optics module.
It should be understood that Sobel operator is only the exemplary illustration of the embodiment of the present invention, the embodiment of the present invention is without being limited thereto, 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 embodiments of the present invention, can also detected to further increase the accuracy of image procossing Before image, " binaryzation " processing is carried out to original image by way of Threshold segmentation.That is, Binary Sketch of Grey Scale Image is obtained 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 position is additionally provided.
The method of the verifying second position of the embodiment of the present invention is illustrated below.
Optionally, electronic equipment can be included in the acquisition zone in the 7th image of display screen display, the 7th image Two straight lines of the central point right-angled intersection in domain;The 8th image is obtained by the optics module, the 8th image is the optical mode The image for the 7th image that group acquires in the pickup area;By analyzing the 8th image authentication second position.
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 rotation angle that front calculates, then detect Whether there are two straight line square crossings, fails if notifying that high-level interface is positioned without if;If there is then positioning success, and lead to The offset for calculating crosspoint coordinate and effective coverage center point coordinate is crossed, further the centre coordinate of accurate adjustment pickup area.
It should be understood that the resolution ratio of the image of the display screen display can be with point of the display screen in the embodiment of the present invention Resolution is identical, can also be different from the resolution ratio of the display screen.
It should also be understood that electronic equipment, can also be first using the image that display screen acquires when completely black as back when acquiring image Jing Jitu removes great amount of images noise 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, by taking 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, allows optics module to acquire an image, as background base figure.
303, input full white background figure.
Specifically, it allows mobile phone is full frame to bleach, allows optics module to acquire an image, obtain image as shown in Figure 3, acquire To image for analyzing effective coverage information, the width height of coordinate and effective coverage including the effective coverage upper left corner is (for example, have Imitate region it is wide it is a height of 190).
304, straight line tests map combining mobile phone screen, grabs image.
Specifically, which can construct Zhang Youchang line short-term composition, and size can cover the test chart of mobile phone screen, It allows mobile phone to be displayed in full screen the figure and carries out an Image Acquisition, acquisition image is used to analyze the rotation angle and scaling of 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 institute Show, from left to right, designs 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, optics module progress is allowed once to adopt figure, and export image as shown in Figure 5.
305, the rotation angle of calculating optical mould group, scaling.
Specifically, which analyzes its using Hough transform to the image of output and rotates angle, by image according to calculating The angle rotation arrived, and carry out Sobel contours extract 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 the distance (for example, 75) by detecting two vertical lines, acquisition figure is calculated The scaling (i.e. 75/50) of picture.
306, according to the scaling and screen resolution, construct grid array of figure.
307, grid array map combining mobile phone screen grabs image.
308, image detection extracts grid information, the centre coordinate of calculating optical mould group.
Specifically, which can be made of according to result building one grid, size can cover mobile phone screen Array of figure has a series of horizontal lines or vertical line inside each grid;It allows mobile phone to be displayed in full screen the grid array of figure and carries out primary The image of Image Acquisition, acquisition is used for analytical calculation optics module, the coordinate relative to the mobile phone screen upper left corner.
More specifically, the effective district field width that the mobile phone can be calculated according to scaling and before is high, optical mode is obtained The actual size (side length of pickup area) of group are as follows: 190*50/75=127 calculates best side in grid array according to the parameter Lattice width: 127/2.5=51.According to best grid width, design one can cover the grid array of figure of mobile phone screen, then allow Optics module acquires 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 serial number, and the right side value of information represents the be expert at serial number of grid;Each side region is divided into two up and down again Point, lower every horizontal line in part represents numerical value 1, and every vertical line represents numerical value 4, i.e. lower part classification is similar to 4 systems;Instantly partial straight lines When the numerical value of representative completely 16, lower straight is emptied, while upper straight adds 1;So regular are as follows: 4 systems inside region, upper and lower region It is 16 systems between domain.The image as shown in Figure 7 of optics module acquisition is carried out according to the rotation angle being calculated before It rotates, then the grid information in detection image.By obtaining straight line information all inside grid, so that it may calculate the party Position of the lattice in entire grid array.Referring again to the coordinate value in the grid upper left corner, the current grid upper left corner can be calculated Coordinate in whole mobile phone screen.Finally, calculating offset of the coordinate relative to acquisition effective image area centre coordinate, multiply With scaling, coordinate of the Image Acquisition effective coverage central point relative to whole mobile phone screen can be obtained, to realize The Primary Location of optics module.
309, according to scaling, screen resolution and optics module coordinate, construct proof diagram.
310, map combining mobile phone screen is verified, image is grabbed.
Specifically, which can design testing for a size covering mobile phone screen according to calculated optics module coordinate Card figure allows mobile phone to show the figure and carries out an Image Acquisition, carries out coordinate verifying according to grabgraf and handles with intense adjustment.
For example, the mobile phone can construct all black picture that a width size is mobile phone screen resolution ratio, obtained in the previous step Coordinate value position draws two white straight lines (length 50) and is mutually perpendicular to intersect, specifically, as shown in Figure 8.Mobile phone is allowed to show This image, and an Image Acquisition is carried out, obtain image as shown in Figure 9.
311, it verifies whether to pass through.
312, if being notified to mistake not over verifying, and enter artificial search.
313, if adjusting the coordinate of optics module by verifying.
Specifically, the image collected is rotated according to the angle that front calculates, then has detected whether that two straight lines hang down It is straight to intersect, fail if notifying that high-level interface is positioned without if;If there is then positioning success, and by calculating crosspoint coordinate With the offset of effective coverage center point coordinate, the centre coordinate of optics module is further accurately adjusted.
314, nullify algorithm environment.
Mobile phone can export the centre coordinate of optics module as a result, and physics size rotates angle, scaling, and image is adopted Collect the information such as effective coverage.
The device of the detection optics module of the embodiment of the present invention is illustrated 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, which includes:
Display module 410, for showing the first image on the display screen 420, which includes multiple images list Member is provided with pattern on each elementary area in multiple elementary area, and the pattern on above-mentioned each elementary area is for referring to Show position of the reference point on first image in above-mentioned each elementary area.
Processing module 440, the processing module 440 are used for:
The second image is obtained by the optics module 430, which is the optics module 430 in the display screen 420 Pickup area in acquire first image image;Determine the pattern in second image in object-image element;According to Pattern in the object-image element determines the first position of intended reference point in the object-image element, which is Position of the intended reference point on first image;According to the first position, the second position is determined, which adopts for this Collect position of the central point in region on the display screen 420.
Optionally, which is specifically used for:
According to the first position and mapping relation information, the third place is determined, which is that the intended reference point exists Position on the display screen 420, the mapping relation information include first position the third place corresponding with the first position; According to the third place, the second position is determined.
Optionally, the pattern on above-mentioned each elementary area includes horizontal line section and/or vertical line section.
Optionally, above-mentioned each elementary area includes left half side region and right half side region, the line in left half side region Section be used to indicate elementary area on first image belonging to column, be used to indicate in right half side region elementary area this Row belonging on one image.
Optionally, above-mentioned each elementary area includes upper half side region and lower half side region, and one in the lower half side region Horizontal line segment table registration word 1, a vertical line segment table registration word 4 in the lower half side region, a cross in the upper half side region Line segment form registration word 16.
Optionally, which is also used to:
Before the display module 410 shows the first image on the display screen 420, first image is generated.
Optionally, which is array image, and each elementary area in multiple elementary area is square figure As unit, which is square region;Wherein, which is specifically used for:
Determine the side length of the pickup area;According to the side length of the pickup area, the side length of above-mentioned each elementary area is determined, The side length of the pickup area is greater than the side length of above-mentioned each elementary area;According to the side length of above-mentioned each elementary area, generating should First image.
Optionally, the side length of the pickup area is 2.5 times of the side length of above-mentioned each elementary area.
Optionally, which is also used to:
Third image is shown on the display screen 420, and the brightness value of each pixel is all larger than first in the third image Brightness value;Wherein, which is more particularly for:
The 4th image is obtained by the optics module 430, the 4th image is the optics module 430 in the pickup area The image of the third image of acquisition;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 side length of the pickup area.
Optionally, which is 128.
Optionally, which is more particularly for:
According to the horizontal gradient response and vertical gradient response of the bianry image, the side length of the bianry image is determined;
According to the side length of scaling and the bianry image, the side length of the pickup area is determined, which adopts for this Collect the image and the ratio of the optics module 430 between the image acquired in the pickup area in region.
Optionally, which is specifically used for:
According to the third place, before determining the second position, the first offset is determined, for correcting the second position; According to first offset and the third place, the second position is determined.
Optionally, which is more particularly for:
Determine the second offset, which 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.
Optionally, which is more particularly for:
According to scaling and second offset, first offset is determined, which is the pickup area Image and the ratio of the optics module 430 between the image acquired in the pickup area.
Optionally, which is specifically used for:
Before determining the pattern in second image in object-image element, rotation angle is obtained, which is should Angle of the image that optics module 430 acquires in the pickup area with respect to the image rotation of the pickup area;It obtains at first Image is managed, which is second image according to the postrotational image of rotation angle;By analyzing this at first Image is managed, determines the pattern in the object-image element.
Optionally, which is also used to:
According to the first position, before determining the second position, scaling is obtained, which is the pickup area Image and the ratio of the optics module 430 between the image acquired in the pickup area.
Optionally, which is also used to:
The 5th image is shown on the display screen 420, the 5th image includes k articles of third line segment being parallel to each other, the k item At least two adjacent third line segments are covered in the pickup area in third line segment, k >=2;Wherein, which has Body is used for:
The 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 acquisition;According to first distance and second distance, determine the scaling, the first distance be this Vertical range in five images between two adjacent third line segments, the second distance are adjacent two articles the in the 6th image Vertical range between three line segments.
Optionally, which is 50 pixels of the display screen 420.
Optionally, the side of every third line segment is vertically installed with j articles of the 4th line segment in the k articles of third line segment, and this j articles At least one the 4th line segment is covered in the pickup area in four line segments.
Optionally, 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.
Optionally, which is also used to:
Rotation angle is obtained, which is that the image that the optics module 430 acquires in the pickup area relatively should The angle of the image rotation of pickup area.
Optionally, which is specifically used for:
The 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 comparing the second processing image and the 5th figure Picture determines the rotation angle.
Optionally, which is also used to:
Show that the 7th image, the 7th image include the central point cross friendship in the pickup area on the display screen 420 Two straight lines of fork;Wherein, which is also used to:
The 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 acquisition;By analyzing the 8th image authentication second position.
Optionally, 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 " may include at least one of lower component:
Specific integrated circuit (Application Specific Integrated Circuit, ASIC), electronic circuit, For executing processor (such as shared processor, proprietary processor or the group processor of one or more softwares or firmware program Deng) and memory, the component for merging logic circuit and other support described functions.
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 for shown in Fig. 1 Electronic equipment 100.Device 400 can be used for executing each process and/or step in above method embodiment, to avoid weight Multiple, details are not described herein.
During realization, 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, in conjunction with the step of method disclosed by the embodiments of the present invention Suddenly hardware decoding processor can be embodied directly in and execute completion, or in decoding processor hardware and software module combine Execute completion.Software module can be located at random access memory, and flash memory, read-only memory, programmable read only memory or electricity can In the mature storage medium of this fields such as erasable programmable storage, register.The storage medium is located at memory, processor The step of reading the information in memory, completing the above method in conjunction with its hardware.
That is, the embodiment of the method in the embodiment of the present invention can be applied in processor, or by processor reality It is existing.
Figure 12 shows the device 500 of another detection optics module of the embodiment of the present invention, comprising: processor 510, storage Device 520, display screen 530 and optics module 540.Wherein, the pickup area of optics module 540 is located at at least portion of display screen 530 Dividing display area, for storing instruction, which is used to execute the instruction of the memory 520 storage to the memory 520, Wherein, to the execution of the instruction so that the processor 510 executes following operation:
The first image is shown on the display screen 530, which includes multiple images unit, multiple 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.
The second image is obtained by the optics module 540, which is the optics module 540 in the display screen 530 Pickup area in acquire first image image;Determine the pattern in second image in object-image element;According to Pattern in the object-image element determines the first position of intended reference point in the object-image element, which is Position of the intended reference point on first image;According to the first position, the second position is determined, which adopts 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 pass through light It learns mould group and Image Acquisition is carried out to the image of display screen display, and obtain acquisition image;Again by acquisition image analysis, Determine position of the central point of pickup area on the display screen, the final positioning operation for realizing optics module.
Device 500 shown in Figure 12 can be realized each process realized in preceding method embodiment by terminal device, To avoid repeating, which is not described herein again.
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, also correspond to the electronic equipment in above method embodiment.Device 500 can be used for executing above method reality Each process and/or the step in example are applied, to avoid repeating, details are not described herein.
In the embodiment of the present invention, a kind of electronic equipment is also provided, which includes the device 400 in above-described embodiment Or device 500.
Optionally, as one embodiment, which can be Organic Light Emitting Diode (Organic Light- Emitting Diode, OLED) display screen, the optics module using the OLED display screen at least partly OLED pixel unit make Detection function is executed for light source.
It should be understood that processor as mentioned in the embodiments of the present invention may be a kind of IC chip, the place with signal Reason ability may be implemented or execute disclosed each method, step and logic diagram in the embodiment of the present invention.For example, above-mentioned Processor can be general processor, digital signal processor (digital signal processor, DSP), dedicated collection At circuit (application specific integrated circuit, ASIC), ready-made programmable gate array (field Programmable gate array, FPGA) or other programmable logic device, transistor logic, discrete hardware group Part etc..In addition, general processor can be microprocessor or the processor is also possible to any conventional processor etc..
In addition, memory as mentioned in the embodiments of the present invention can be volatile memory or nonvolatile memory, or It may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory (read- Only memory, ROM), programmable read only memory (programmable ROM, PROM), the read-only storage of erasable programmable Device (erasable PROM, EPROM), electrically erasable programmable read-only memory (electrically EPROM, EEPROM) or Flash memory.Volatile memory can be random access memory (random access memory, RAM), be used as external 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 random access memory (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, being described herein The memories of system and method be intended to include but be not limited to the memory of these and any other suitable type.
Finally it should be noted that the term used in the embodiment of the present invention and the appended claims is only to go out In for the purpose of describing particular embodiments, it is not intended to limit the invention embodiment.
For example, the embodiment of the present invention and the "an" of singular used in the attached claims, " described ", " above-mentioned " and "the" are also intended to including most forms, unless the context clearly indicates other meaning.
In another example the first image of term and the second image may be used in embodiments of the present invention, but these images are not answered It is limited to these terms.These terms are only used to for image being distinguished from each other out.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The range 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, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided by the present application, it should be understood that disclosed systems, devices and methods, Ke Yitong Other modes are crossed to realize.For example, Installation practice described above is only illustrative, for example, the division of the unit, Only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can be with In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or unit or Communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of the embodiment of the present invention 's.
In addition, each functional unit in embodiments of the present invention can integrate in one processing unit, it is also possible to each A unit physically exists alone, and can also be integrated in one unit with two or more units.
If be realized in the form of SFU software functional unit and when sold or used as an independent product, can store one In a computer-readable storage medium.Based on this understanding, the technical solution of the embodiment of the present invention is substantially right in other words The part of part or the technical solution that the prior art contributes can be embodied in the form of software products, the calculating Machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be individual Computer, server or network equipment etc.) execute the method for the embodiment of the present invention all or part of the steps.And it is aforementioned Storage medium include: that USB flash disk, mobile hard disk, read-only memory, random access memory, magnetic or disk etc. are various can be with Store the medium of program code.
The above content, the only specific embodiment of the embodiment of the present invention, but the protection scope of the embodiment of the present invention is not It is confined to this, anyone 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 scope of the embodiment of the present invention.Therefore, the protection scope of the embodiment of the present invention It should be subject to the protection scope in claims.

Claims (27)

1. a kind of method for detecting optics module, which is characterized in that applied to the electronic equipment including display screen and optics module;
The described method includes:
The first image is shown on the display screen, and the first image includes multiple images unit, described multiple images unit 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 the first image;
The second image is obtained by the optics module, second image is acquisition of the optics module in the display screen The image of the first image acquired in region;
Determine the pattern in second image in object-image element;
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 the first image;
According to the first position, determine that the second position, the second position are the central point of the pickup area described aobvious Position in display screen.
2. being wrapped the method according to claim 1, wherein described determine the second position according to the first position It includes:
According to the first position and mapping relation information, determine that the third place, the third place are the intended reference point Position on the display screen, the mapping relation information include that the first position and the first position are corresponding described The third place;
According to the third place, the second position is determined.
3. method according to claim 1 or 2, which is characterized 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 to indicate elementary area column affiliated in the first image, and the line segment in right half side region is used to indicate image Unit row affiliated in the first image.
4. method according to claim 1 or 2, which is characterized 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 Horizontal line segment table shows the first number, and a vertical line segment table in the lower half side region shows the second number, the upper half side region An interior horizontal line segment table shows third number.
5. method according to claim 1 or 2, the first image is array image, in described multiple images unit Each elementary area is square elementary area, and the pickup area is square region;
Wherein, the method also includes:
Before showing the first image on the display screen, the side length of the pickup area is determined;
According to the side length of the pickup area, determine that the side length of each elementary area, the side length of the pickup area are greater than The side length of each elementary area;
According to the side length of each elementary area, the first image is generated.
6. according to the method described in claim 5, it is characterized in that, the side length of the determination pickup area, comprising:
Third image is shown on the display screen, and the brightness value of each pixel is all larger than the first brightness in the third image Value;
The 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 third 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 side length of the pickup area is determined.
7. according to the method described in claim 6, it is characterized in that, the horizontal gradient response according to the bianry image With vertical gradient response, the side length of the pickup area is determined, comprising:
According to the horizontal gradient response and vertical gradient response of the bianry image, the side length of the bianry image is determined;
According to the side length of scaling and the bianry image, the side length of the pickup area is determined, the scaling is institute State the ratio of the image and the optics module of pickup area between the image acquired in the pickup area.
8. according to the method described in claim 2, it is characterized in that, the method also includes:
Determine the first offset, first offset is for correcting the second position;
Wherein, described according to the third place, determine the second position, comprising:
According to first offset and the third place, the second position is determined.
9. according to the method described in claim 8, it is characterized in that, the first offset of the determination, comprising:
Determine that the second offset, second offset are 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 The ratio of the image in domain and the optics module between the image acquired in the pickup area.
10. method according to claim 1 or 2, which is characterized in that the method also includes:
Rotation angle is obtained, the rotation angle is that the image that the optics module acquires in the pickup area is relatively described The angle of the image rotation of pickup area;
Wherein, the pattern in the determination second image in object-image element, comprising:
The first processing image is obtained, the first processing image is second image according to the postrotational figure of the rotation angle Picture;
By analyzing the first processing image, the pattern in the object-image element is determined.
11. method according to claim 1 or 2, which is characterized in that it is described according to the first position, determine described Before two positions, the method 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 acquisition;The acquisition scaling, comprising:
The 5th image is shown on the display screen, and the 5th image includes k articles of third line segment being parallel to each other, the k item At least two adjacent third line segments are covered in the pickup area in third line segment, k >=2;
The 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 first distance and second distance, the scaling is determined, the first distance is adjacent in the 5th image Two third line segments between vertical range, the second distance be in the 6th image adjacent two articles of third line segments it Between vertical range.
12. according to the method for claim 11, which is characterized in that the method also includes:
Rotation angle is obtained, the rotation angle is that the image that the optics module acquires in the pickup area is relatively described The angle of the image rotation of pickup area;The acquisition rotates angle, comprising:
The 6th image is analyzed by Hough transformation, and obtains first angle;
Second processing image is obtained, the second processing image is the 6th image according to the postrotational figure of the first angle Picture;
By comparing the second processing image and the 5th image, the rotation angle is determined.
13. method according to claim 1 or 2, which is characterized in that the method also includes:
The 7th image is shown on the display screen, and the 7th image includes the central point right-angled intersection in the pickup area Two straight lines;
The 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 position described in the 8th image authentication.
14. a kind of device for detecting optics module, which is characterized in that including;
Display module, for showing the first image on a display screen, the first image includes multiple images unit, the multiple Pattern is provided on each elementary area in elementary area, the pattern on each elementary area is used to indicate described each Position of the reference point in the first image in elementary area;
Processing module, the processing module are used for:
The second image is obtained by the optics module, second image is acquisition of the optics module in the display screen The image of the first image acquired in region;
Determine the pattern in second image in object-image element;
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 the first image;
According to the first position, determine that the second position, the second position are the central point of the pickup area described aobvious Position in display screen.
15. device according to claim 14, which is characterized in that the processing module is specifically used for:
According to the first position and mapping relation information, determine that the third place, the third place are the intended reference point Position on the display screen, the mapping relation information include that the first position and the first position are corresponding described The third place;
According to the third place, the second position is determined.
16. device according to claim 14 or 15, which is characterized in that the pattern on each elementary area includes cross 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 to indicate elementary area column affiliated in the first image, and the line segment in right half side region is used to indicate figure As unit row affiliated in the first image.
17. device according to claim 14 or 15, which is characterized in that the pattern on each elementary area includes cross 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 the first number, and a vertical line segment table in the lower half side region shows the second number, the upper half lateral areas A horizontal line segment table in domain shows third number.
18. device according to claim 14 or 15, which is characterized in that
The first image is array image, and each elementary area in described multiple images unit is square elementary area, The pickup area is square region;
Wherein, the processing module is also used to:
Before showing the first image on the display screen, the side length of the pickup area is determined;
According to the side length of the pickup area, determine that the side length of each elementary area, the side length of the pickup area are greater than The side length of each elementary area;
According to the side length of each elementary area, the first image is generated.
19. device according to claim 18, which is characterized in that the display module is also used to:
Third image is shown on the display screen, and the brightness value of each pixel is all larger than the first brightness in the third image Value;
Wherein, the processing module is more particularly for:
The 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 third 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 side length of the pickup area is determined.
20. device according to claim 19, which is characterized in that the processing module is more particularly for:
According to the horizontal gradient response and vertical gradient response of the bianry image, the side length of the bianry image is determined;
According to the side length of scaling and the bianry image, the side length of the pickup area is determined, the scaling is institute State the ratio of the image and the optics module of pickup area between the image acquired in the pickup area.
21. device according to claim 15, which is characterized in that the processing module is specifically used for:
According to the third place, before determining the second position, determine that the first offset, first offset are used for Correct the second position;
According to first offset and the third place, the second position is determined.
22. device according to claim 21, which is characterized in that the processing module is more particularly for:
Determine that the second offset, second offset are 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 The ratio of the image in domain and the optics module between the image acquired in the pickup area.
23. device according to claim 14 or 15, which is characterized in that the processing module is specifically used for:
Before determining the pattern in second image in object-image element, rotation angle is obtained, the rotation angle is institute State the angle of the image rotation for the relatively described pickup area of image that optics module acquires in the pickup area;
The first processing image is obtained, the first processing image is second image according to the postrotational figure of the rotation angle Picture;
By analyzing the first processing image, the pattern in the object-image element is determined.
24. device according to claim 14 or 15, which is characterized in that
The display module is also used to:
The 5th image is shown on the display screen, and the 5th image includes k articles of third line segment being parallel to each other, the k item At least two adjacent third line segments are covered in the pickup area in third line segment, k >=2;
Wherein, the processing module is also used to:
The 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 first distance and second distance, scaling, image and institute of the scaling for the pickup area are determined Ratio of the optics module between the image acquired in the pickup area is stated, the first distance is phase in the 5th image Vertical range between two adjacent third line segments, the second distance are two articles of third line segments adjacent in the 6th image Between vertical range.
25. device according to claim 24, which is characterized in that the processing module is also used to:
The 6th image is analyzed by Hough transformation, and obtains first angle;
Second processing image is obtained, the second processing image is the 6th image according to the postrotational figure of the first angle Picture;
By comparing the second processing image and the 5th image, determine that rotation angle, the rotation angle are the light Learn the angle of the image rotation for the relatively described pickup area of image that mould group acquires in the pickup area.
26. device according to claim 14 or 15, which is characterized in that the display module is also used to:
The 7th image is shown on the display screen, and the 7th image includes the central point right-angled intersection in the pickup area Two straight lines;
Wherein, the processing module is also used to:
The 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 position described in the 8th image authentication.
27. a kind of electronic equipment, which is characterized in that including detection optics module described in 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 CN107690656A (en) 2018-02-13
CN107690656B true 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

Family Cites Families (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
KR101809543B1 (en) * 2013-11-22 2017-12-18 삼성전자주식회사 Method for recognizing contectless fingerprint and electronic apparatus for performing the same.
CN105335072B (en) * 2014-06-12 2018-10-12 联想(北京)有限公司 A kind of localization method and device
CN205750806U (en) * 2016-03-07 2016-11-30 北京集创北方科技股份有限公司 Fingerprint identification device and mobile terminal
CN106839976B (en) * 2016-12-22 2020-05-12 歌尔科技有限公司 Method and device for detecting 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
CN107690656A (en) 2018-02-13

Similar Documents

Publication Publication Date Title
CN109670452A (en) Method for detecting human face, device, electronic equipment and Face datection model
CN109815770B (en) Two-dimensional code detection method, device and system
US8781221B2 (en) Hand gesture recognition system
CN105740780B (en) Method and device for detecting living human face
CN109376631A (en) A kind of winding detection method and device neural network based
CN109977191B (en) Problem map detection method, device, electronic equipment and medium
CN110147786A (en) For text filed method, apparatus, equipment and the medium in detection image
CN109598234A (en) Critical point detection method and apparatus
CN113538574B (en) Pose positioning method, device and equipment and computer readable storage medium
CN107368790B (en) Pedestrian detection method, system, computer-readable storage medium and electronic device
CN109815843A (en) Object detection method and Related product
CN109816745A (en) Human body thermodynamic chart methods of exhibiting and Related product
CN109948637A (en) Object test equipment, method for checking object and computer-readable medium
CN111220235B (en) Water level monitoring method and device
CN109949900B (en) Three-dimensional pulse wave display method and device, computer equipment and storage medium
CN110264523A (en) A kind of method and apparatus of the location information of target image in determining test image
CN111582155B (en) Living body detection method, living body detection device, computer equipment and storage medium
CN110111648A (en) A kind of programming training system and method
CN108875504A (en) Image detecting method and image detection device neural network based
CN108564569A (en) A kind of distress in concrete detection method and device based on multinuclear classification learning
CN107690656B (en) Detect the method, apparatus and electronic equipment of optics module
CN104915641B (en) The method that facial image light source orientation is obtained based on Android platform
JP7006782B2 (en) Information processing equipment, control methods, and programs
CN109816628A (en) Face evaluation method and Related product
CN108664979A (en) The construction method of Maize Leaf pest and disease damage detection model based on image recognition and application

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