WO2019201337A1 - 光斑提取方法 - Google Patents

光斑提取方法 Download PDF

Info

Publication number
WO2019201337A1
WO2019201337A1 PCT/CN2019/083496 CN2019083496W WO2019201337A1 WO 2019201337 A1 WO2019201337 A1 WO 2019201337A1 CN 2019083496 W CN2019083496 W CN 2019083496W WO 2019201337 A1 WO2019201337 A1 WO 2019201337A1
Authority
WO
WIPO (PCT)
Prior art keywords
spot
target
boundary
spots
coordinate
Prior art date
Application number
PCT/CN2019/083496
Other languages
English (en)
French (fr)
Inventor
刘伟
王健
宫小虎
田咪
杨孟
Original Assignee
北京七鑫易维信息技术有限公司
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 北京七鑫易维信息技术有限公司 filed Critical 北京七鑫易维信息技术有限公司
Publication of WO2019201337A1 publication Critical patent/WO2019201337A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/77Determining position or orientation of objects or cameras using statistical methods

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a spot extraction method.
  • the number of spots that can be generally extracted is two. If the user uses the device, the spot needs to be extracted, and when the spot is extracted, the extracted spot is manually performed on site. Correction, this spot correction method needs to calculate the slope of two spots to achieve. For this method of extracting light spots, there are great drawbacks. First, the number of extracted spots is small, only two, which cannot meet the calculation requirements of multiple spots (such as four spots) after hardware upgrade. Additional spot correction is also required, which increases labor costs, ultimately resulting in less efficient spot extraction and a significant amount of time was wasted during the calibration process.
  • the embodiment of the invention provides a light spot extraction method to at least solve the technical problem that the number of extracted spots in the spot extraction process is small and the extraction efficiency is low.
  • a method for extracting a spot includes: determining a distance between each spot of the plurality of spots and a center of the pupil to obtain a plurality of spot distance parameters; and according to the plurality of spot distance parameters Deriving a preset number of spots in the plurality of spots; acquiring distance information between each of the preset number of spots to obtain a plurality of distance information; determining the plurality of distance information in a preset direction
  • the first spot set is obtained by the two spots corresponding to the smallest value, wherein two spots in the first spot set spot are on the first side of the pupil center; and the judgment is not in the first spot set Whether the remaining spot is on the second side, wherein the second side is centered on the center of the pupil, opposite to the other side of the first side; if the remaining spot is not on the second side, And outputting a spot extraction result, wherein the spot extraction result includes at least: a spot in the first spot set and a spot in the remaining spot that is closest to
  • the preset direction includes: a first preset direction and a second preset direction, where the two spots corresponding to the minimum value in the preset direction among the plurality of distance information are determined to obtain the first
  • the light spot set includes: determining two spots corresponding to the smallest value in the first preset direction among the plurality of distance information, to obtain the first spot set; and adding the spot of the first spot set to the preset The target spot extraction list.
  • each of the light spots has an X coordinate and a Y coordinate.
  • the method further includes: selecting a target spot in the first spot set to obtain a first target spot; acquiring the first Determining an X coordinate of the target spot in the first preset direction to obtain a first target coordinate; determining a boundary of the first preset direction according to the first target coordinate to obtain a first target boundary.
  • the method further includes: if the remaining spot is the same as the second side, selecting the remaining spot from the first target in the first preset direction a spot closest to the boundary, obtaining a second target spot; selecting an X coordinate of the second target spot in the first preset direction to obtain a first candidate spot coordinate; determining a first candidate according to the first candidate spot coordinate a spot boundary; adding the first candidate spot boundary to the first candidate spot boundary list.
  • the method further includes: constructing a spot connection frame corresponding to each spot of the target spot extraction list; and comparing the first candidate a distance value of the spot in the spot boundary list and the spot connection frame to obtain a first distance value; if the first distance value is lower than a preset threshold, adding a spot in the first candidate spot boundary list to the Target spot extraction list.
  • the method further includes: determining two spots corresponding to the smallest value in the second preset direction among the plurality of distance information, to obtain a second spot set, wherein the second spot set is in the spot Two spots are on a third side of the center of the pupil, and the center of the pupil is centered, and the other side of the third side is a fourth side; if the target spot of the second spot is not In the first spot set, the target spot is added to the target spot extraction list.
  • each of the light spots has an X coordinate and a Y coordinate.
  • the method further includes: selecting a target spot in the second spot set to obtain a third target spot. Obtaining a Y coordinate of the third target spot in the second preset direction to obtain a second target coordinate; determining a boundary of the second preset direction according to the second target coordinate to obtain a second target boundary .
  • the method further includes: if the remaining spot of the second spot set is not in the fourth side, outputting a spot extraction result, wherein the spot extraction The result includes: a spot of the second spot set and a spot that is not closest to the center of the pupil in the remaining spot of the second spot set; if the remaining spot of the second spot set is the same a fourth side, selecting a spot in the second spot set that is closest to the second target boundary in the second preset direction to obtain a fourth target spot; and selecting the fourth target spot in the second Determining a Y coordinate of the direction to obtain a second candidate spot coordinate; determining a second candidate spot boundary according to the second candidate spot coordinate; adding the second candidate spot boundary to the second candidate spot boundary list.
  • the method further includes: constructing a spot connection frame corresponding to each spot of the target spot extraction list; and comparing the second candidate spot a distance value of the spot in the boundary list and the spot connection frame to obtain a second distance value; if the second distance value is lower than a preset threshold, adding a spot in the second candidate spot boundary list to the target Spot extraction list.
  • the method further includes: determining whether a rectangular range ratio corresponding to the spot of the target spot extraction list is a preset ratio, wherein the rectangular range ratio is the target spot Extracting a range ratio corresponding to the rectangle formed by the spot connection of the list; if it is determined that the rectangular range ratio of the spot of the target spot extraction list is not a preset ratio, cutting the spot to achieve a rectangular range ratio of the spot Determining a preset ratio; determining each spot center coordinate in the target spot extraction list to obtain a plurality of spot center coordinates; and obtaining a distance between each of the spot centers and the pupil center according to the plurality of spot center coordinates The parameter obtains a plurality of spot center distance values; and outputs a center coordinate of the spot corresponding to the smallest value among the plurality of spot center distance values.
  • determining a distance between each of the plurality of spots and the center of the pupil, and obtaining a plurality of spot distance parameters includes: determining whether the current number of spots is greater than a preset number of extractions; if the current number of spots is greater than the preset number of extractions Performing image binarization processing on the plurality of spots to obtain a plurality of binarized spots; calculating a distance between each of the plurality of binarized spots and the center of the pupils to obtain the plurality of spot distance parameters; The current number of spots is lower than or equal to the preset number of extractions, and all the spots are output.
  • a method for extracting a spot includes: acquiring distance information between every two spots of a preset number of spots to obtain a plurality of distance information; determining the plurality of distances a first spot set is obtained by the two spots corresponding to the smallest value in the preset direction, wherein the two spots in the first spot set spot are on the first side of the pupil center; Whether the remaining spot in a set of spots is the same as the second side, wherein the second side is centered on the center of the pupil, opposite to the other side of the first side; if the remaining spot is not the same
  • the output spot extraction result wherein the spot extraction result comprises at least a spot in the first spot set and a spot closest to the center of the pupil in the remaining spot.
  • the preset direction includes: a first preset direction and a second preset direction, where the two spots corresponding to the minimum value in the preset direction among the plurality of distance information are determined to obtain the first
  • the light spot set includes: determining two spots corresponding to the smallest value in the first preset direction among the plurality of distance information, to obtain the first spot set; and adding the spot of the first spot set to the preset The target spot extraction list.
  • each of the light spots has an X coordinate and a Y coordinate.
  • the method further includes: selecting a target spot in the first spot set to obtain a first target spot; acquiring the first Determining an X coordinate of the target spot in the first preset direction to obtain a first target coordinate; determining a boundary of the first preset direction according to the first target coordinate to obtain a first target boundary.
  • the method further includes: if the remaining spot is the same as the second side, selecting the remaining spot from the first target in the first preset direction a spot closest to the boundary, obtaining a second target spot; selecting an X coordinate of the second target spot in the first preset direction to obtain a first candidate spot coordinate; determining a first candidate according to the first candidate spot coordinate a spot boundary; adding the first candidate spot boundary to the first candidate spot boundary list.
  • the method further includes: constructing a spot connection frame corresponding to each spot of the target spot extraction list; and comparing the first candidate a distance value of the spot in the spot boundary list and the spot connection frame to obtain a first distance value; if the first distance value is lower than a preset threshold, adding a spot in the first candidate spot boundary list to the Target spot extraction list.
  • the method further includes: determining two spots corresponding to the smallest value in the second preset direction among the plurality of distance information, to obtain a second spot set, wherein the second spot set is in the spot Two spots are on a third side of the center of the pupil, and the center of the pupil is centered, and the other side of the third side is a fourth side; if the target spot of the second spot is not In the first spot set, the target spot is added to the target spot extraction list.
  • each of the light spots has an X coordinate and a Y coordinate.
  • the method further includes: selecting a target spot in the second spot set to obtain a third target spot;
  • the third target spot is in the Y coordinate of the second preset direction to obtain a second target coordinate; and the boundary of the second preset direction is determined according to the second target coordinate to obtain a second target boundary.
  • the method further includes: if the remaining spot of the second spot set is not in the fourth side, outputting a spot extraction result, wherein the spot extraction The result includes: a spot of the second spot set and a spot that is not closest to the center of the pupil in the remaining spot of the second spot set; if the remaining spot of the second spot set is the same a fourth side, selecting a spot in the second spot set that is closest to the second target boundary in the second preset direction to obtain a fourth target spot; and selecting the fourth target spot in the second Determining a Y coordinate of the direction to obtain a second candidate spot coordinate; determining a second candidate spot boundary according to the second candidate spot coordinate; adding the second candidate spot boundary to the second candidate spot boundary list.
  • the method further includes: constructing a spot connection frame corresponding to each spot of the target spot extraction list; and comparing the second candidate spot a distance value of the spot in the boundary list and the spot connection frame to obtain a second distance value; if the second distance value is lower than a preset threshold, adding a spot in the second candidate spot boundary list to the target Spot extraction list.
  • the method further includes: determining whether a rectangular range ratio corresponding to the spot of the target spot extraction list is a preset ratio, wherein the rectangular range ratio is the target spot Extracting a range ratio corresponding to the rectangle formed by the spot connection of the list; if it is determined that the rectangular range ratio of the spot of the target spot extraction list is not a preset ratio, cutting the spot to achieve a rectangular range ratio of the spot Determining a preset ratio; determining each spot center coordinate in the target spot extraction list to obtain a plurality of spot center coordinates; and obtaining a distance between each of the spot centers and the pupil center according to the plurality of spot center coordinates The parameter obtains a plurality of spot center distance values; and outputs a center coordinate of the spot corresponding to the smallest value among the plurality of spot center distance values.
  • the method further includes: determining a distance between each of the plurality of spots and the center of the pupil, Obtaining a plurality of spot distance parameters; extracting a predetermined number of spots from the plurality of spots according to the plurality of spot distance parameters.
  • determining a distance between each of the plurality of spots and the center of the pupil, and obtaining a plurality of spot distance parameters includes: determining whether the current number of spots is greater than a preset number of extractions; if the current number of spots is greater than the preset Extracting the quantity, performing image binarization processing on the plurality of spots to obtain a plurality of binarized spots; calculating a distance between each of the plurality of binarized spots and the center of the pupils to obtain the plurality of spot distance parameters.
  • a light spot extraction apparatus including: a first determining unit configured to determine a distance between each of the plurality of light spots and the center of the pupil to obtain a plurality of spot distance parameters; a unit, configured to extract a preset number of spots in the plurality of spots according to the plurality of spot distance parameters; and the acquiring unit is configured to acquire distance information between each of the preset number of spots, Obtaining a plurality of distance information; the second determining unit is configured to determine two spots corresponding to the smallest value in the preset direction among the plurality of distance information, to obtain a first spot set, wherein the first spot set spot a second spot in the first side of the center of the pupil; a determining unit configured to determine whether the remaining spot in the first spot set is the same as the second side, wherein the second side is The center of the pupil is centered with respect to the other side of the first side; the output unit is configured to output a light spot if the remaining spot is not the same
  • the preset direction includes: a first preset direction and a second preset direction
  • the second determining unit includes: a first determining module, configured to determine that the plurality of distance information is in the The two spots corresponding to the smallest value in the first preset direction are obtained to obtain the first spot set
  • the first adding module is configured to add the spot of the first spot set to the preset target spot extraction list.
  • each of the light spots has an X coordinate and a Y coordinate
  • the device further includes: a first selection module, configured to: after obtaining the first spot set, select a target spot in the first spot set to obtain a first target module, configured to acquire an X coordinate of the first target spot in the first preset direction to obtain a first target coordinate, and a first determining module configured to be according to the first target And determining a boundary of the first preset direction to obtain a first target boundary.
  • the device further includes: a second selecting module, configured to: after the first target boundary is obtained, if the remaining spot is on the second side, select the remaining spot in the first Determining a spot closest to the first target boundary to obtain a second target spot; and a third selecting module, configured to select an X coordinate of the second target spot in the first preset direction to obtain a first candidate a second coordinate determining module, configured to determine a first candidate spot boundary according to the first candidate spot coordinate; and a second adding module configured to add the first candidate spot boundary to the first candidate spot boundary list.
  • a second selecting module configured to: after the first target boundary is obtained, if the remaining spot is on the second side, select the remaining spot in the first Determining a spot closest to the first target boundary to obtain a second target spot
  • a third selecting module configured to select an X coordinate of the second target spot in the first preset direction to obtain a first candidate
  • a second coordinate determining module configured to determine a first candidate spot boundary according to the first candidate spot coordinate
  • the apparatus further includes: a first building block, configured to, after adding the first candidate spot boundary to the first candidate spot boundary list, construct a spot corresponding to each spot of the target spot extraction list a first comparison module, configured to compare a distance between the spot in the first candidate spot boundary list and the spot connection frame to obtain a first distance value; and a third adding module, configured to be the first The distance value is lower than a preset threshold, and the spot in the first candidate spot boundary list is added to the target spot extraction list.
  • a first building block configured to, after adding the first candidate spot boundary to the first candidate spot boundary list, construct a spot corresponding to each spot of the target spot extraction list
  • a first comparison module configured to compare a distance between the spot in the first candidate spot boundary list and the spot connection frame to obtain a first distance value
  • a third adding module configured to be the first The distance value is lower than a preset threshold, and the spot in the first candidate spot boundary list is added to the target spot extraction list.
  • the device further includes: a third determining module, configured to determine two spots corresponding to the smallest value in the second preset direction among the plurality of distance information, to obtain a second spot set, wherein Two of the second spot collection spots are on a third side of the center of the pupil, and are centered on the center of the pupil, and the other side of the third side is a fourth side; a fourth increase And a module configured to add the target spot to the target spot extraction list if a target spot of the second spot set is not in the first spot set.
  • a third determining module configured to determine two spots corresponding to the smallest value in the second preset direction among the plurality of distance information, to obtain a second spot set, wherein Two of the second spot collection spots are on a third side of the center of the pupil, and are centered on the center of the pupil, and the other side of the third side is a fourth side
  • a fourth increase And a module configured to add the target spot to the target spot extraction list if a target spot of the second spot set is
  • each of the light spots has an X coordinate and a Y coordinate
  • the device further includes: a fourth selection module, configured to select a target spot in the second spot set after obtaining the second spot set Obtaining a third target spot; the second acquiring module is configured to acquire a Y coordinate of the third target spot in the second preset direction to obtain a second target coordinate; and a fourth determining module, configured to be according to the first Two target coordinates, determining a boundary of the second preset direction to obtain a second target boundary.
  • the device further includes: a first output module, configured to output a spot extraction result if the remaining spot of the second spot set is not the same as the fourth side after the second target boundary is obtained,
  • the light spot extraction result includes: a spot of the second spot set and a spot not closest to the center of the pupil in the remaining spot of the second spot set; and a fifth selection module, if not The remaining spot of the second spot set is the same as the fourth side, and a spot in the second spot set that is closest to the second target boundary in the second preset direction is selected to obtain a fourth target spot.
  • a sixth selection module configured to select a Y coordinate of the fourth target spot in the second preset direction to obtain a second candidate spot coordinate
  • a fifth determining module configured to be according to the second candidate spot coordinate, Determining a second candidate spot boundary; a fifth increasing module configured to add the second candidate spot boundary to the second candidate spot boundary list.
  • the apparatus further includes: a second building block, configured to, after adding the second candidate spot boundary to the second candidate spot boundary list, construct a spot connection corresponding to each spot of the target spot extraction list a second comparing module, configured to compare a distance between the spot in the second candidate spot boundary list and the spot connecting frame to obtain a second distance value; and a sixth adding module, configured to be the second distance The value is lower than a preset threshold, and the spot in the second candidate spot boundary list is added to the target spot extraction list.
  • a second building block configured to, after adding the second candidate spot boundary to the second candidate spot boundary list, construct a spot connection corresponding to each spot of the target spot extraction list
  • a second comparing module configured to compare a distance between the spot in the second candidate spot boundary list and the spot connecting frame to obtain a second distance value
  • a sixth adding module configured to be the second distance The value is lower than a preset threshold, and the spot in the second candidate spot boundary list is added to the target spot extraction list.
  • the device further includes: a second output module, configured to output the spot in the target spot extraction list after determining that the number of spots in the target spot extraction list reaches a preset number of extractions.
  • a second output module configured to output the spot in the target spot extraction list after determining that the number of spots in the target spot extraction list reaches a preset number of extractions.
  • the device further includes: a first determining module, configured to determine, after obtaining the target spot extraction list, whether a rectangular range ratio corresponding to the spot of the target spot extraction list is a preset ratio, where The rectangular range ratio is a range ratio corresponding to a rectangle formed by the spot connection of the target spot extraction list; and the cutting module is configured to determine that a rectangular range ratio of the spot of the target spot extraction list is not a preset ratio, the cutting place a light spot to obtain a ratio of a rectangular range of the spot to the preset ratio; a sixth determining module configured to determine a center coordinate of each spot in the target spot extraction list to obtain a plurality of spot center coordinates; Obtaining a module, configured to acquire a distance parameter between each of the spot center and the pupil center according to the plurality of spot center coordinates, to obtain a plurality of spot center distance values; and a third output module configured to output the plurality of The center coordinate of the spot corresponding to the smallest value in the center distance value of the spot.
  • the first determining unit includes: a second determining module, configured to determine whether the current number of spots is greater than a preset number of extractions; and the processing module is configured to: if the current number of spots is greater than the preset number of extractions, Performing image binarization processing on the plurality of spots to obtain a plurality of binarized spots; and calculating a module, configured to calculate a distance between each spot of the plurality of binarized spots and the center of the pupils, to obtain the plurality of spot distance parameters And a fourth output module, configured to output all the spots if the current number of spots is less than or equal to the preset number of extractions.
  • a second determining module configured to determine whether the current number of spots is greater than a preset number of extractions
  • the processing module is configured to: if the current number of spots is greater than the preset number of extractions, Performing image binarization processing on the plurality of spots to obtain a plurality of binarized spots; and calculating a module, configured to calculate a distance
  • a light spot extracting apparatus including: a second acquiring unit, configured to acquire distance information between each two of the preset number of light spots to obtain a plurality of distance information a third determining unit, configured to determine two spots corresponding to the smallest value in the preset direction among the plurality of distance information, to obtain a first spot set, wherein two spots in the first spot set spot a first side of the center of the pupil; a second determining unit configured to determine whether the remaining spot in the first set of spots is the same as the second side, wherein the second side is centered on the center of the pupil
  • the second output unit is configured to output a spot extraction result when the remaining spot is not the same as the second side, wherein the spot extraction result includes at least: a spot in the first set of spots and a spot in the remaining spot that is closest to the center of the pupil.
  • a storage medium configured to store a program, wherein the program, when executed by a processor, controls a device in which the storage medium is located to perform any one of the above The spot extraction method.
  • a processor configured to execute a program, wherein the program is executed to perform the spot extraction method according to any one of the above.
  • a distance between each spot of the plurality of spots and the center of the pupil may be determined to obtain a plurality of spot distance parameters, and a preset number of spots are extracted from the plurality of spots according to the plurality of spot distance parameters. Then, the distance information between each two spots in the preset number of spots can be obtained, and multiple distance information is obtained, and two spots corresponding to the smallest value in the preset direction among the plurality of distance information are determined to obtain the first spot set. Wherein the two spots in the first spot collection spot are on the first side of the center of the pupil, and it is determined whether the remaining spot in the first spot set is the same as the second side, wherein the second side is centered on the pupil center.
  • the light spot extraction result is output, wherein the spot extraction result includes at least: the spot in the first spot set and the remaining spot in the remaining spot from the center of the pupil Spot.
  • a preset number of spots can be extracted, such as extracting spots beyond two spots, and the spot that needs to be outputted can be determined according to the distance between the spot and the center of the pupil, and the number of spots outputted is large (eg, More than or equal to four), the spot can be corrected for the current position of the spot, thereby solving the technical problem that the number of extracted spots in the spot extraction process is small and the extraction efficiency is low.
  • FIG. 1 is a flow chart of a light spot extraction method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of spot extraction according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of another alternative spot extraction device in accordance with an embodiment of the present invention.
  • an embodiment of a method of spot extraction is provided, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and, although The logical order is shown in the flowcharts, but in some cases the steps shown or described may be performed in a different order than the ones described herein.
  • a VR device can be taken as an example for description.
  • a preset number of pieces need to be extracted ( For example, if there are four target light spots, the number of spot extractions may be plural in the present invention, for example, four. If the image is processed and less than four spots are found, all the spots may be directly outputted. If the number of spots is larger than 4, spot extraction is required to obtain 4 target spots, and according to the following embodiment of the present invention, the adhered spots can be cut to obtain a predetermined proportion of spots.
  • the gaze point of the eyeball can be confirmed.
  • the infrared ray can be projected to the eye through a plurality of infrared light sources.
  • the infrared camera takes photos of the spots formed by the infrared rays on the cornea, thereby taking an image of the eyeball with the spot.
  • the eyeball rotates, the relative position of the pupil and the spot changes, and the change is used to calculate the position of the pupil.
  • the eye gaze point is thus calculated, and the position of each spot can be calculated by the contents of the following embodiments of the present invention, thereby determining the position of the gaze point.
  • FIG. 1 is a flow chart of a method for extracting a spot according to an embodiment of the present invention. As shown in FIG. 1, the method includes the following steps:
  • Step S102 determining a distance between each of the plurality of spots and the center of the pupil to obtain a plurality of spot distance parameters
  • determining the distance between each spot of the plurality of spots and the center of the pupil, and obtaining the plurality of spot distance parameters includes: determining whether the current number of spots is greater than a preset number of extractions; if the current number of spots is greater than the preset number of extractions, The image is binarized to obtain a plurality of binarized spots; the distance between each spot of the plurality of binarized spots and the center of the pupil is calculated to obtain a plurality of spot distance parameters; if the current number of spots is lower than or equal to the preset Extract the quantity and output all the spots.
  • the number of spots is greater than a preset number of extractions. If the number of spots is lower than the preset number of extractions, all the spots can be directly output, and if the number of spots is larger than the preset number of extractions, the following spot extraction can be performed.
  • the desired target spot If the number of spots is lower than the preset number of extractions, all the spots can be directly output, and if the number of spots is larger than the preset number of extractions, the following spot extraction can be performed. The desired target spot.
  • the image binarization processing on the plurality of spots may be performed after the complex color image or the plurality of types of images are obtained, and the image is subjected to initial binarization processing to obtain the binarized spot.
  • Step S104 extracting a preset number of spots in the plurality of spots according to the plurality of spot distance parameters.
  • the preset number is not specifically limited.
  • the preset number is four. That is, in the above steps, four spots closest to the center of the pupil can be extracted as candidate spots, and in the subsequent steps, it is determined whether the spots are the final desired target spots (ie, after the candidate spots are obtained, the candidate spots are performed. Spot correction). Thus, after determining the four target spots, the target spot is output to determine the position of the user's gaze point.
  • Step S106 Obtain distance information between each of the preset number of spots to obtain a plurality of distance information.
  • Step S108 determining two spots corresponding to the smallest value in the preset direction among the plurality of distance information, to obtain a first spot set, wherein two spots in the first spot set spot are on the first side of the center of the pupil.
  • the preset direction in the embodiment of the present invention includes: a first preset direction and a second preset direction.
  • the first preset direction and the second preset direction may be set by themselves, for example,
  • the left and right direction relative to the center of the pupil is the first predetermined direction, and the direction corresponding to the coordinate axis may correspond to the X direction; and the up and down direction relative to the center of the pupil is the second preset direction, and the direction corresponding to the coordinate axis may be Corresponds to the Y direction.
  • determining two spots corresponding to the smallest value in the preset direction among the plurality of distance information includes: determining that the plurality of distance information corresponds to the smallest value in the first preset direction. The two spots are obtained to obtain a first spot set; the spot of the first spot set is added to the preset target spot extract list.
  • each of the spots may have an X coordinate and a Y coordinate.
  • the coordinate with respect to the first preset direction may be set to an X coordinate, and the setting is relative to the second preset.
  • the coordinates of the direction are the Y coordinate.
  • the method may further select a target spot in the first spot set to obtain a first target spot; obtain an X coordinate of the first target spot in the first preset direction to obtain a first target coordinate;
  • the first target coordinate determines a boundary of the first preset direction to obtain a first target boundary.
  • any one of the first spot sets may be selected, and the X coordinate of the target spot is used as the boundary of the first preset direction to obtain the first target boundary.
  • the target boundary set by the embodiment of the present invention may be a boundary set when the spot is extracted, and a spot beyond the boundary is not extracted.
  • the remaining spot in the first spot set is the same as the second side, the remaining spot is selected to be closest to the first target boundary in the first preset direction.
  • Spot obtain a second target spot; select an X coordinate of the second target spot in the first preset direction to obtain a first candidate spot coordinate; determine a first candidate spot boundary according to the first candidate spot coordinate; and set the first candidate spot
  • the boundary is added to the first candidate spot boundary list. That is, by selecting the spot of the remaining spot in the first preset direction from the boundary, selecting the X coordinate and adding it to the candidate boundary list, the spot in the selected remaining spot can be used as the candidate spot.
  • the method further includes: constructing a spot connection frame corresponding to each spot of the target spot extraction list; comparing the spot in the first candidate spot boundary list And the distance value of the spot connection frame is obtained, and the first distance value is obtained; if the first distance value is lower than the preset threshold, the spot in the first candidate spot boundary list is added to the target spot extraction list.
  • Step S110 determining whether the remaining spot in the first spot set is the same as the second side, wherein the second side is centered on the pupil center and opposite to the other side of the first side.
  • Step S112 if the remaining spot is not the same as the second side, outputting a spot extraction result, wherein the spot extraction result includes at least: a spot in the first spot set and a spot closest to the center of the pupil in the remaining spot.
  • the embodiment of the present invention further includes: determining two spots corresponding to the smallest value in the second preset direction among the plurality of distance information, to obtain a second spot set, wherein two of the second spot set spots The spot is on the third side of the center of the pupil, and is centered on the center of the pupil, and the other side of the third side is the fourth side; if the target spot of the second spot is not in the first spot set, the target spot is added Target spot extraction list.
  • each spot corresponds to an X coordinate and a Y coordinate.
  • the target spot in the second spot set may be selected to obtain a third target spot; and the third target is obtained.
  • the Y coordinate of the spot in the second preset direction obtains the second target coordinate; according to the second target coordinate, the boundary of the second preset direction is determined to obtain the second target boundary.
  • the spot extraction result may be output when the remaining spot that is not in the second spot set is not the same as the fourth side, wherein the spot extraction result includes : a spot of the second spot set and a spot that is not closest to the center of the pupil in the remaining spot of the second spot set; if the remaining spot of the second spot set is not on the fourth side, the second spot set is selected a second target spot having a position closest to the second target boundary to obtain a fourth target spot; a Y coordinate of the fourth target spot in the second preset direction is selected to obtain a second candidate spot coordinate; and the second candidate spot coordinate is determined according to the second candidate spot coordinate Two candidate spot boundaries; the second candidate spot boundary is added to the second candidate spot boundary list.
  • first side and the second side in the embodiment of the present invention are opposite to the first preset direction, and the third side and the fourth side are opposite to the second preset direction. The situation is finalized.
  • the method further includes: constructing a spot connection frame corresponding to each spot of the target spot extraction list; comparing the spot and the spot connection in the second candidate spot boundary list The distance value of the frame is obtained as a second distance value; if the second distance value is lower than the preset threshold, the spot in the second candidate spot boundary list is added to the target spot extraction list.
  • the spot in the target spot extraction list is output. That is, if the spot in the target spot extraction list is obtained and the spot that the spot finally desires is determined, the spot in the target spot extraction list can be output.
  • the number of spots in the target spot extraction list may be a preset number, for example, the preset number is 4. If the spot is found to be less than 4 when the spot is started to be extracted, all the spots may be directly output. If the number of spots is found to exceed 4 after the start of the extraction of the spot, the target spot extraction list can be obtained by the above embodiment to obtain the final four spots, so that after the spot in the final target spot extraction list is obtained, Output all 4 spots.
  • the following processing can be performed.
  • An optional implementation manner of the present invention may further determine, after obtaining the target spot extraction list, whether the ratio of the rectangular range corresponding to the spot of the target spot extraction list is a preset ratio, wherein the rectangular range ratio is the target spot extraction.
  • the range ratio of the rectangle formed by the spot connection of the list is determined; if it is determined that the ratio of the rectangular range of the spot of the target spot extraction list is not a preset ratio, the spot is cut to achieve a preset ratio of the rectangular range of the spot; determining the target spot extraction
  • the center coordinates of each spot in the list are obtained, and the coordinates of the center of each spot are obtained.
  • the distance parameter between the center of each spot and the center of the pupil is obtained, and the distance values of the plurality of spot centers are obtained; and the distance values of the plurality of spot centers are output.
  • the center coordinate of the spot corresponding to the smallest median value.
  • the rectangular shape formed by the spot of the extraction list of the target spot in the embodiment of the present invention is not specifically limited.
  • the rectangle may be a rectangle or a square, etc.
  • the preset ratio may be a preset ratio of a rectangle.
  • the range ratio of the rectangle is set to 1:1.
  • the present invention is not specifically limited to this embodiment.
  • the distance between each spot of the plurality of spots and the center of the pupil can be determined first, and a plurality of spot distance parameters are obtained, and a preset number of spots are extracted from the plurality of spots according to the plurality of spot distance parameters, and the preset number is obtained.
  • the distance information between each two spots in the light spot obtains a plurality of distance information, and determines two spots corresponding to the smallest value in the preset direction among the plurality of distance information, to obtain a first spot set, wherein the first spot is obtained Locating two spots in the spot on the first side of the center of the pupil, determining whether the remaining spot in the first spot set is the same as the second side, wherein the second side is centered on the center of the pupil, relative to the first side On the other hand, if the remaining spot is not the same as the second side, the spot extraction result is output, wherein the spot extraction result includes at least: a spot in the first spot set and a spot in the remaining spot closest to the center of the pupil.
  • a preset number of spots can be extracted, such as extracting spots beyond two spots (4), and according to the distance between the spot and the center of the pupil, the final output spot is determined, and the number of output spots is compared.
  • the spot correction can be performed for the current position of the spot, thereby solving the technical problem that the number of extracted spots in the spot extraction process is small and the extraction efficiency is low.
  • FIG. 2 is a schematic diagram of spot extraction according to an embodiment of the present invention.
  • FIG. 2 includes a pupil center, an X boundary, and a Y boundary, and determines light spots such as x1, y1, and y2.
  • the number of extracted spots is four, corresponding to the preset number, and the first preset direction is the X direction, and the second preset direction is the Y direction.
  • the specific implementation of the extraction can be as follows:
  • Step 201 Start extracting a spot.
  • Step 202 Determine whether the number of spots is not less than 4.
  • step 203 If yes, go to step 203. If no, go to step 214.
  • Step 203 The four spots with the smallest retention distance are candidate spots.
  • Step 204 starting a spot correction section.
  • Step 205 Select an X coordinate X1 of one of the two closest spots in the X direction as a boundary in the X direction, and add the two spots to the mandatory list.
  • Step 206 Determine whether the remaining two spots are on the same side. That is, whether the two spots in the above-mentioned mandatory list are on the other side of the center of the pupil.
  • step 207 If yes, go to step 207. If no, go to step 214.
  • Step 207 Select one of the remaining two spots closest to X1 in the X direction, and select the X coordinate X2 to add the X direction candidate boundary list.
  • Step 208 Select a y coordinate Y1 of one of the two closest spots in the Y direction as a boundary in the y direction, and add a spot in which the mandatory list has not been added to the mandatory list.
  • Step 209 Determine whether the remaining two spots are on the same side. That is, whether the two spots closest to the distance in the Y direction are selected on the other side of the center of the pupil with respect to the above.
  • step 210 If yes, go to step 210, if no, go to step 214.
  • Step 210 Select one of the remaining two spots closest to Y1 in the Y direction, and select the Y coordinate Y2 to add the Y direction candidate boundary list.
  • Step 211 Determine whether the distance of the candidate list element coordinate distance from the mandatory list connection frame is lower than a preset threshold.
  • step 212 If yes, go to step 212. If no, output the spot in all the required lists.
  • Step 212 Add the current element of the candidate list to the mandatory list.
  • Step 213 If the minimum aspect ratio rectangle of the required list element is not a preset ratio (such as 1:1), the minimum bracket of the sticking spot is cut into a part of the preset proportion, and the central coordinate of each part is calculated, and the distance is reserved at the center of the pupil. The most recent one is the center coordinates of the spot.
  • the specific ratio is not limited in the present invention, and may be 1:1 or 0.9:1.1, or 1.2:0.8 or the like.
  • Step 214 Output a spot that satisfies the condition.
  • a preset number of 4 spots can be extracted, and finally a desired spot is outputted to determine the current gaze point of the user by the spot position and the spot size.
  • a storage medium configured to store a program, wherein the program, when executed by the processor, controls a device in which the storage medium is located to perform the spot extraction method of any of the above.
  • a processor configured to execute a program, wherein the program is executed to perform a spot extraction method of any of the above.
  • the device may include: a first determining unit 31 configured to determine each of the plurality of spots and the pupil center a distance, a plurality of spot distance parameters are obtained; the extracting unit 32 is configured to extract a preset number of spots in the plurality of spots according to the plurality of spot distance parameters; and the obtaining unit 33 is configured to acquire each of the preset number of spots
  • the distance information between the spots is obtained by the plurality of distance information; the second determining unit 34 is configured to determine two spots corresponding to the smallest value in the preset direction among the plurality of distance information, to obtain the first spot set, wherein a spot in the spot gathers the first spot on the center of the pupil; the determining unit 35 is configured to determine whether the remaining spot in the first spot set is the same as the second side, wherein the second side is at the center of the pupil a center, opposite to the other side of the first side; the output unit 36 is configured to output a
  • the distance between each spot of the plurality of spots and the center of the pupil can be determined by the first determining unit 31, and a plurality of spot distance parameters are obtained, and are extracted by the extracting unit 32 according to the plurality of spot distance parameters in the plurality of spots.
  • the first spot set is obtained by the two spots corresponding to the minimum value, wherein two spots in the first spot set spot are on the first side of the pupil center, and the remaining unit in the first spot set is judged by the determining unit 35.
  • the spot extraction result includes at least a spot in the first spot set and a spot closest to the center of the pupil in the remaining spot.
  • a preset number of spots can be extracted, such as extracting spots beyond two spots, and determining the final output spot according to the distance between the spot and the pupil center, and the number of output spots is larger.
  • the spot correction is performed on the current position of the spot, thereby solving the technical problem that the number of extracted spots in the spot extraction process is small and the extraction efficiency is low.
  • the preset direction includes: a first preset direction and a second preset direction
  • the second determining unit includes: a first determining module, configured to determine a value in the first preset direction among the plurality of distance information The minimum corresponding two spots obtain the first spot set
  • the first adding module is configured to add the spot of the first spot set to the preset target spot extraction list.
  • each of the light spots has an X coordinate and a Y coordinate
  • the device further includes: a first selection module, configured to: after obtaining the first spot set, select a target spot in the first spot set to obtain the first target.
  • a first acquiring module configured to acquire an X coordinate of the first target spot in the first preset direction to obtain a first target coordinate; and a first determining module configured to determine the first preset direction according to the first target coordinate Boundary, get the first target boundary.
  • the device further includes: a second selecting module, configured to: after obtaining the first target boundary, if the remaining spot is on the second side, select a spot in the remaining spot that is closest to the first target boundary in the first preset direction, to obtain the first a second target module, configured to select an X coordinate of the second target spot in the first preset direction to obtain a first candidate spot coordinate; and a second determining module configured to determine the first according to the first candidate spot coordinate a candidate spot boundary; a second adding module configured to add the first candidate spot boundary to the first candidate spot boundary list.
  • a second selecting module configured to: after obtaining the first target boundary, if the remaining spot is on the second side, select a spot in the remaining spot that is closest to the first target boundary in the first preset direction, to obtain the first
  • a second target module configured to select an X coordinate of the second target spot in the first preset direction to obtain a first candidate spot coordinate
  • a second determining module configured to determine the first according to the first candidate spot coordinate a candidate spot boundary
  • the device further includes: a first building block, configured to: after adding the first candidate spot boundary to the first candidate spot boundary list, construct a spot connecting frame corresponding to each spot of the target spot extraction list; a comparison module is configured to compare the distance between the spot and the spot connection frame in the first candidate spot boundary list to obtain a first distance value; and the third increase module is set to be if the first distance value is lower than a preset threshold, A spot in a candidate spot boundary list is added to the target spot extraction list.
  • a first building block configured to: after adding the first candidate spot boundary to the first candidate spot boundary list, construct a spot connecting frame corresponding to each spot of the target spot extraction list
  • a comparison module is configured to compare the distance between the spot and the spot connection frame in the first candidate spot boundary list to obtain a first distance value
  • the third increase module is set to be if the first distance value is lower than a preset threshold, A spot in a candidate spot boundary list is added to the target spot extraction list.
  • the apparatus further includes: a third determining module, configured to determine two spots corresponding to the smallest value in the second preset direction among the plurality of distance information, to obtain a second spot set, wherein The second spot in the second spot collection spot is on the third side of the center of the pupil, and is centered on the center of the pupil, and the other side is the fourth side with respect to the other side of the third side; the fourth adding module is set to be the second The target spot of the spot set is not in the first spot set, and the target spot is added to the target spot extract list.
  • a third determining module configured to determine two spots corresponding to the smallest value in the second preset direction among the plurality of distance information, to obtain a second spot set, wherein The second spot in the second spot collection spot is on the third side of the center of the pupil, and is centered on the center of the pupil, and the other side is the fourth side with respect to the other side of the third side; the fourth adding module is set to be the second The target spot of the spot set is not in the first
  • each of the light spots has an X coordinate and a Y coordinate
  • the device further includes: a fourth selection module, configured to: after obtaining the second spot set, select a target spot in the second spot set to obtain a third target a second acquiring module, configured to acquire a Y coordinate of the third target spot in the second preset direction to obtain a second target coordinate; and a fourth determining module configured to determine the second preset direction according to the second target coordinate Boundary, get the second target boundary.
  • the device further includes: a first output module, configured to output a spot extraction result if the remaining spot of the second spot set is not the same as the fourth side after the second target boundary is obtained, wherein the spot extraction is performed
  • the result includes: a spot of the second spot set and a spot not closest to the center of the pupil in the remaining spot of the second spot set; and a fifth selecting module, configured to be the same if the remaining spot of the second spot set is the same a side spot, selecting a spot in the second spot set that is closest to the second target boundary in the second preset direction to obtain a fourth target spot; and a sixth selecting module, configured to select a Y coordinate of the fourth target spot in the second preset direction Obtaining a second candidate spot coordinate; the fifth determining module is configured to determine a second candidate spot boundary according to the second candidate spot coordinate; the fifth adding module is configured to add the second candidate spot boundary to the second candidate spot boundary list .
  • the apparatus further includes: a second building module, configured to: after adding the second candidate spot boundary to the second candidate spot boundary list, construct a spot connection frame corresponding to each spot of the target spot extraction list; and the second comparison module And setting a distance value of the spot and the spot connecting frame in the second candidate spot boundary list to obtain a second distance value; and a sixth increasing module, configured to set the second candidate spot if the second distance value is lower than a preset threshold The spot in the boundary list is added to the target spot extraction list.
  • a second building module configured to: after adding the second candidate spot boundary to the second candidate spot boundary list, construct a spot connection frame corresponding to each spot of the target spot extraction list
  • the second comparison module And setting a distance value of the spot and the spot connecting frame in the second candidate spot boundary list to obtain a second distance value
  • a sixth increasing module configured to set the second candidate spot if the second distance value is lower than a preset threshold The spot in the boundary list is added to the target spot extraction list.
  • the device further includes: a second output module, configured to output the spot in the target spot extraction list after determining that the number of spots in the target spot extraction list reaches a preset number of extractions.
  • a second output module configured to output the spot in the target spot extraction list after determining that the number of spots in the target spot extraction list reaches a preset number of extractions.
  • the device further includes: a first determining module, configured to determine, after obtaining the target spot extraction list, whether the ratio of the rectangular range corresponding to the spot of the target spot extraction list is a preset ratio, wherein The rectangular range ratio is a range ratio corresponding to the rectangle formed by the spot connection of the target spot extraction list; the cutting module is configured to cut the spot to determine the rectangular range ratio of the spot of the target spot extraction list, The rectangular range ratio of the spot reaches a preset ratio; the sixth determining module is configured to determine each spot center coordinate in the target spot extraction list to obtain a plurality of spot center coordinates; and the third obtaining module is set to be based on the plurality of spot center coordinates Obtaining the distance parameter between the center of each spot and the center of the pupil to obtain a plurality of spot center distance values; and the third output module is configured to output a center coordinate of the spot corresponding to the smallest value among the plurality of spot center distance values.
  • a first determining module configured to determine, after obtaining the target spot extraction list,
  • the first determining unit includes: a second determining module, configured to determine whether the current number of spots is greater than a preset number of extractions; and the processing module is configured to perform image binarization on the plurality of spots if the current number of spots is greater than a preset number of extractions Processing, obtaining a plurality of binarized spots; the calculating module is configured to calculate a distance between each spot of the plurality of binarized spots and the center of the pupil to obtain a plurality of spot distance parameters; and the fourth output module is set to the current number of spots All spots are output below and equal to the preset number of extractions.
  • the above-described spot extracting apparatus may further include a processor and a memory, and the first determining unit 31, the extracting unit 32, the obtaining unit 33, the second determining unit 34, the determining unit 35, the output unit 36, and the like are all stored as a program unit in the memory.
  • the above-described program unit stored in the memory is executed by the processor to implement the corresponding function.
  • the processor contains a kernel, and the kernel removes the corresponding program unit from the memory.
  • the kernel can be set to one or more, and the target number of spots can be output by adjusting the kernel parameters.
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory (flash RAM), the memory including at least one Memory chip.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash memory
  • An embodiment of the present invention provides a device, including a processor, a memory, and a program stored on the memory and executable on the processor.
  • the processor executes the program, the following steps are performed: determining each spot and pupil of the plurality of spots a distance of the center, obtaining a plurality of spot distance parameters; extracting a preset number of spots from the plurality of spots according to the plurality of spot distance parameters; obtaining distance information between each of the preset number of spots to obtain a plurality of distances Information; determining two spots corresponding to the smallest value in the preset direction in the plurality of distance information, to obtain a first spot set, wherein two spots in the first spot set spot are on the first side of the center of the pupil; Whether the remaining spot in the first spot set is the same as the second side, wherein the second side is centered on the pupil center, opposite to the other side of the first side; if the remaining spot is not on the second side, the output spot is extracted As a result, wherein the spot extraction result includes at
  • the preset direction includes: a first preset direction and a second preset direction, and when the processor executes the program, the two spots corresponding to the minimum value in the first preset direction among the plurality of distance information may also be determined.
  • each spot corresponds to an X coordinate and a Y coordinate.
  • the processor executes the program, after the first spot set is obtained, the target spot in the first spot set is selected to obtain the first target spot; and the first spot is obtained.
  • the X-coordinate of the target spot in the first preset direction obtains the first target coordinate; and the boundary of the first preset direction is determined according to the first target coordinate to obtain the first target boundary.
  • the processor executes the program, after the first target boundary is obtained, if the remaining spot is on the second side, the spot in the remaining spot that is closest to the first target boundary in the first preset direction is selected, and the first a second target spot; selecting an X coordinate of the second target spot in the first preset direction to obtain a first candidate spot coordinate; determining a first candidate spot boundary according to the first candidate spot coordinate; adding the first candidate spot boundary to the first candidate In the spot boundary list.
  • the spot connection frame corresponding to each spot of the target spot extraction list may be constructed; and the first candidate spot is compared.
  • the distance between the spot and the spot connecting frame in the boundary list is obtained as a first distance value; if the first distance value is lower than the preset threshold, the spot in the first candidate spot boundary list is added to the target spot extraction list.
  • the two spots corresponding to the smallest value in the second preset direction of the plurality of distance information may be determined to obtain a second spot set, wherein the second spot set spots are two The spot is on the third side of the center of the pupil, and is centered on the center of the pupil, and the other side of the third side is the fourth side; if the target spot of the second spot is not in the first spot set, the target spot is Join the target spot extraction list.
  • the target spot in the second spot set may be selected to obtain a third target spot; the Y coordinate of the third target spot in the second preset direction is obtained, and the second target coordinate is obtained; The second target coordinate determines a boundary of the second preset direction to obtain a second target boundary.
  • the spot spot extraction result may also be output on the remaining spot that is not in the second spot set, and the spot extraction result includes: the spot of the second spot set and the a spot closest to the center of the pupil in the remaining spot of the second spot set; if the remaining spot of the second spot set is not on the fourth side, the second target set is selected in the second preset direction from the second target boundary a fourth spot of the nearest target spot; a Y coordinate of the fourth target spot in the second predetermined direction is selected to obtain a second candidate spot coordinate; and a second candidate spot boundary is determined according to the second candidate spot coordinate; the second candidate is selected The spot boundary is added to the second candidate spot boundary list.
  • the spot connection frame corresponding to each spot of the target spot extraction list may be constructed; comparing the second candidate spot boundary The distance between the spot and the spot connecting frame in the list is obtained as a second distance value; if the second distance value is lower than the preset threshold, the spot in the second candidate spot boundary list is added to the target spot extraction list.
  • the spot in the target spot extraction list may be output after determining that the number of spots in the target spot extraction list reaches the preset number of extractions.
  • the processor executes the program, after determining the target spot extraction list, determining whether the ratio of the rectangular range corresponding to the spot of the target spot extraction list is a preset ratio, wherein the rectangular range ratio is the target spot extraction.
  • the range ratio of the rectangle formed by the spot connection of the list is determined; if it is determined that the ratio of the rectangular range of the spot of the target spot extraction list is not a preset ratio, the spot is cut to achieve a preset ratio of the rectangular range of the spot; determining the target spot extraction
  • the center coordinates of each spot in the list are obtained, and the coordinates of the center of each spot are obtained.
  • the distance parameter between the center of each spot and the center of the pupil is obtained, and the distance values of the plurality of spot centers are obtained; and the distance values of the plurality of spot centers are output.
  • the center coordinate of the spot corresponding to the smallest median value.
  • the processor when the processor executes the program, it may also determine whether the current number of spots is greater than a preset number of extractions; if the current number of spots is greater than the preset number of extractions, performing image binarization on multiple spots to obtain multiple binarizations Spot; calculate the distance between each spot of the plurality of binarized spots and the center of the pupil to obtain a plurality of spot distance parameters; if the current number of spots is less than or equal to the preset number of extractions, all the spots are output.
  • the disclosed technical contents may be implemented in other manners.
  • the device embodiments described above are only schematic.
  • the division of the unit may be a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, and the like. .
  • the solution provided by the embodiment of the present application may be used to extract a plurality of spots.
  • the method may be applied to a VR device or other desktop device, and the user may extract the pre-view when watching the corresponding video or animation.
  • the output spot is more than the related technology, and the spot correction can be performed for the current position of the spot, thereby solving the related art.
  • the process of spot extraction there are technical problems that the number of extracted spots is small and the efficiency of extraction is low.
  • the gaze point of the eyeball is confirmed. When the eyeball rotates, the relative position of the pupil and the spot changes, and the change is used to calculate the position of the pupil.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Eye Examination Apparatus (AREA)

Abstract

一种光斑提取方法,该方法包括:确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数(S102);根据多个光斑距离参数在多个光斑中提取预设数量个光斑(S104);获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息(S106);确定多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面(S108);判断未在第一光斑集合中的剩余光斑是否同在第二侧面,其中,第二侧面以瞳孔中心为中心,相对于第一侧面的另一侧面(S110);若剩余光斑不是同在第二侧面,输出光斑提取结果,其中,光斑提取结果中至少包括:第一光斑集合中的光斑和剩余光斑中距离瞳孔中心最近的光斑(S112)。

Description

光斑提取方法
本申请要求于2018年04月19日提交中国专利局、申请号为201810354501.8、申请名称“光斑提取方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及图像处理技术领域,具体而言,涉及一种光斑提取方法。
背景技术
在相关技术中,对于桌面设备或者VR等设备的光斑提取中,一般能够提取的光斑数量为两个,若用户使用该设备,需要提取光斑,会出现提取光斑时,对提取的光斑进行现场人工校正,这种光斑校正方式需要计算两个光斑的斜率来实现。而对于这种提取光斑的方式,存在很大的弊端,首先,其提取的光斑的数量较少,只有两个,无法满足硬件升级后多个光斑(如四个光斑)的计算需求,另外,还需要额外的光斑校正,提高人力成本,最终会导致光斑提取的效率较低,并且在校正过程中浪费大量的时间。
针对上述的相关技术中光斑提取过程中出现提取光斑数量较少,并且提取的效率较低的技术问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例提供了一种光斑提取方法,以至少解决相关技术中光斑提取过程中出现提取光斑数量较少,并且提取的效率较低的技术问题。
根据本发明实施例的一个方面,提供了一种光斑提取方法,包括:确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;根据所述多个光斑距离参数在所述多个光斑中提取预设数量个光斑;获取所述预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息;确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,所述第一光斑集合光斑中的两个光斑在所述瞳孔中心的第一侧面;判断未在所述第一光斑集合中的剩余光斑是否同在第二侧面,其中,所述第二侧面以所述瞳孔中心为中心,相对于所述第一侧面的另一侧面; 若所述剩余光斑不是同在所述第二侧面,输出光斑提取结果,其中,所述光斑提取结果中至少包括:第一光斑集合中的光斑和所述剩余光斑中距离所述瞳孔中心最近的光斑。
可选地,所述预设方向包括:第一预设方向和第二预设方向,其中,确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合包括:确定所述多个距离信息中在所述第一预设方向上数值最小所对应的两个光斑,得到所述第一光斑集合;将所述第一光斑集合的光斑加入预设的目标光斑提取列表。
可选地,每个光斑对应有X坐标和Y坐标,在得到所述第一光斑集合之后,还包括:选取所述第一光斑集合中的目标光斑,得到第一目标光斑;获取所述第一目标光斑在所述第一预设方向的X坐标,得到第一目标坐标;根据所述第一目标坐标,确定所述第一预设方向的边界,得到第一目标边界。
可选地,在得到所述第一目标边界之后,还包括:若所述剩余光斑同在所述第二侧面,选取所述剩余光斑中在所述第一预设方向距离所述第一目标边界最近的光斑,得到第二目标光斑;选取所述第二目标光斑在所述第一预设方向的X坐标,得到第一候选光斑坐标;根据所述第一候选光斑坐标,确定第一候选光斑边界;将所述第一候选光斑边界加入第一候选光斑边界列表中。
可选地,在将所述第一候选光斑边界加入第一候选光斑边界列表中之后,还包括:构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;比较所述第一候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第一距离值;若所述第一距离值低于预设阈值,将所述第一候选光斑边界列表中的光斑加入所述目标光斑提取列表。
可选地,还包括:确定所述多个距离信息中在所述第二预设方向上数值最小所对应的两个光斑,得到第二光斑集合,其中,所述第二光斑集合光斑中的两个光斑在所述瞳孔中心的第三侧面,且以所述瞳孔中心为中心,相对于所述第三侧面的另一侧面为第四侧面;若所述第二光斑集合的目标光斑未在所述第一光斑集合中,将所述目标光斑加入所述目标光斑提取列表。
可选地,每个所述光斑对应有X坐标和Y坐标,在得到所述第二光斑集合后,所述方法还包括:选取所述第二光斑集合中的目标光斑,得到第三目标光斑;获取所述第三目标光斑在所述第二预设方向的Y坐标,得到第二目标坐标;根据所述第二目标坐标,确定所述第二预设方向的边界,得到第二目标边界。
可选地,在得到所述第二目标边界之后,所述方法还包括:若未在所述第二光斑集合的剩余光斑不是同在第四侧面,输出光斑提取结果,其中,所述光斑提取结果中 包括:所述第二光斑集合的光斑和未在所述第二光斑集合的剩余光斑中距离所述瞳孔中心最近的光斑;若未在所述第二光斑集合的剩余光斑是同在所述第四侧面,选取所述第二光斑集合中在所述第二预设方向距离所述第二目标边界最近的光斑,得到第四目标光斑;选取所述第四目标光斑在所述第二预设方向的Y坐标,得到第二候选光斑坐标;根据所述第二候选光斑坐标,确定第二候选光斑边界;将所述第二候选光斑边界加入第二候选光斑边界列表中。
可选地,在将所述第二候选光斑边界加入第二候选光斑边界列表之后,还包括:构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;比较所述第二候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第二距离值;若所述第二距离值低于预设阈值,将所述第二候选光斑边界列表中的光斑加入所述目标光斑提取列表。
可选地,在确定所述目标光斑提取列表中的光斑数量达到预设提取数量后,输出所述目标光斑提取列表中的光斑。
可选地,在得到所述目标光斑提取列表后,还包括:判断所述目标光斑提取列表的光斑所对应的矩形范围比值是否为预设比值,其中,所述矩形范围比值为所述目标光斑提取列表的光斑连接所形成的矩形对应的范围比值;若判断出所述目标光斑提取列表的光斑的矩形范围比值不是预设比值,切割所述光斑,以将所述光斑的矩形范围比值达到所述预设比值;确定所述目标光斑提取列表中的每个光斑中心坐标,得到多个光斑中心坐标;根据所述多个光斑中心坐标,获取每个所述光斑中心与所述瞳孔中心的距离参数,得到多个光斑中心距离值;输出所述多个光斑中心距离值中数值最小所对应的光斑的中心坐标。
可选地,确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数包括:判断当前光斑数量是否大于预设提取数量;若所述当前光斑数量大于所述预设提取数量,对多个光斑进行图像二值化处理,得到多个二值化光斑;计算多个二值化光斑中每个光斑与所述瞳孔中心的距离,得到所述多个光斑距离参数;若所述当前光斑数量低于等于所述预设提取数量,输出所有的光斑。
根据本发明实施例的另一方面,还提供了一种光斑提取方法,包括:获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息;确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,所述第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面;判断未在所述第一光斑集合中的剩余光斑是否同在第二侧面,其中,所述第二侧面以所述瞳孔中心为中心,相对于所述第一侧面的另一侧面;若所述剩余光斑不是同在所述第二侧面,输出光斑提取结果,其中,所述光斑提取结果中至少包括:第一光斑集合中的光斑和所述剩余光斑中距离 所述瞳孔中心最近的光斑。
可选地,所述预设方向包括:第一预设方向和第二预设方向,其中,确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合包括:确定所述多个距离信息中在所述第一预设方向上数值最小所对应的两个光斑,得到所述第一光斑集合;将所述第一光斑集合的光斑加入预设的目标光斑提取列表。
可选地,每个光斑对应有X坐标和Y坐标,在得到所述第一光斑集合之后,还包括:选取所述第一光斑集合中的目标光斑,得到第一目标光斑;获取所述第一目标光斑在所述第一预设方向的X坐标,得到第一目标坐标;根据所述第一目标坐标,确定所述第一预设方向的边界,得到第一目标边界。
可选地,在得到所述第一目标边界之后,还包括:若所述剩余光斑同在所述第二侧面,选取所述剩余光斑中在所述第一预设方向距离所述第一目标边界最近的光斑,得到第二目标光斑;选取所述第二目标光斑在所述第一预设方向的X坐标,得到第一候选光斑坐标;根据所述第一候选光斑坐标,确定第一候选光斑边界;将所述第一候选光斑边界加入第一候选光斑边界列表中。
可选地,在将所述第一候选光斑边界加入第一候选光斑边界列表中之后,还包括:构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;比较所述第一候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第一距离值;若所述第一距离值低于预设阈值,将所述第一候选光斑边界列表中的光斑加入所述目标光斑提取列表。
可选地,还包括:确定所述多个距离信息中在所述第二预设方向上数值最小所对应的两个光斑,得到第二光斑集合,其中,所述第二光斑集合光斑中的两个光斑在所述瞳孔中心的第三侧面,且以所述瞳孔中心为中心,相对于所述第三侧面的另一侧面为第四侧面;若所述第二光斑集合的目标光斑未在所述第一光斑集合中,将所述目标光斑加入所述目标光斑提取列表。
可选地,每个光斑对应有X坐标和Y坐标,在得到所述第二光斑集合后,所述方法还包括:选取所述第二光斑集合中的目标光斑,得到第三目标光斑;获取所述第三目标光斑在所述第二预设方向的Y坐标,得到第二目标坐标;根据所述第二目标坐标,确定所述第二预设方向的边界,得到第二目标边界。
可选地,在得到所述第二目标边界之后,所述方法还包括:若未在所述第二光斑集合的剩余光斑不是同在第四侧面,输出光斑提取结果,其中,所述光斑提取结果中包括:所述第二光斑集合的光斑和未在所述第二光斑集合的剩余光斑中距离所述瞳孔中心最近的光斑;若未在所述第二光斑集合的剩余光斑是同在所述第四侧面,选取所 述第二光斑集合中在所述第二预设方向距离所述第二目标边界最近的光斑,得到第四目标光斑;选取所述第四目标光斑在所述第二预设方向的Y坐标,得到第二候选光斑坐标;根据所述第二候选光斑坐标,确定第二候选光斑边界;将所述第二候选光斑边界加入第二候选光斑边界列表中。
可选地,在将所述第二候选光斑边界加入第二候选光斑边界列表之后,还包括:构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;比较所述第二候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第二距离值;若所述第二距离值低于预设阈值,将所述第二候选光斑边界列表中的光斑加入所述目标光斑提取列表。
可选地,在得到所述目标光斑提取列表后,还包括:判断所述目标光斑提取列表的光斑所对应的矩形范围比值是否为预设比值,其中,所述矩形范围比值为所述目标光斑提取列表的光斑连接所形成的矩形对应的范围比值;若判断出所述目标光斑提取列表的光斑的矩形范围比值不是预设比值,切割所述光斑,以将所述光斑的矩形范围比值达到所述预设比值;确定所述目标光斑提取列表中的每个光斑中心坐标,得到多个光斑中心坐标;根据所述多个光斑中心坐标,获取每个所述光斑中心与所述瞳孔中心的距离参数,得到多个光斑中心距离值;输出所述多个光斑中心距离值中数值最小所对应的光斑的中心坐标。
可选地,在获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息的步骤之前,还包括:确定多个光斑中每个光斑与所述瞳孔中心的距离,得到多个光斑距离参数;根据所述多个光斑距离参数在所述多个光斑中提取预设数量个光斑。
可选地,确定多个光斑中每个光斑与所述瞳孔中心的距离,得到多个光斑距离参数包括:判断当前光斑数量是否大于预设提取数量;若所述当前光斑数量大于所述预设提取数量,对多个光斑进行图像二值化处理,得到多个二值化光斑;计算多个二值化光斑中每个光斑与所述瞳孔中心的距离,得到所述多个光斑距离参数。
根据本发明实施例的另一方面,还提供了一种光斑提取装置,包括:第一确定单元,设置为确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;提取单元,设置为根据所述多个光斑距离参数在所述多个光斑中提取预设数量个光斑;获取单元,设置为获取所述预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息;第二确定单元,设置为确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,所述第一光斑集合光斑中的两个光斑在所述瞳孔中心的第一侧面;判断单元,设置为判断未在所述第一光斑集合中的剩余光斑是否同在第二侧面,其中,所述第二侧面以所述瞳孔中心为中心,相对于所述第一侧面的另一侧面;输出单元,设置为若所述剩余光斑不是同在所述第二侧面,输出光 斑提取结果,其中,所述光斑提取结果中至少包括:第一光斑集合中的光斑和所述剩余光斑中距离所述瞳孔中心最近的光斑。
可选地,所述预设方向包括:第一预设方向和第二预设方向,其中,所述第二确定单元包括:第一确定模块,设置为确定所述多个距离信息中在所述第一预设方向上数值最小所对应的两个光斑,得到所述第一光斑集合;第一增加模块,设置为将所述第一光斑集合的光斑加入预设的目标光斑提取列表。
可选地,每个光斑对应有X坐标和Y坐标,上述装置还包括:第一选取模块,设置为在得到所述第一光斑集合之后,选取所述第一光斑集合中的目标光斑,得到第一目标光斑;第一获取模块,设置为获取所述第一目标光斑在所述第一预设方向的X坐标,得到第一目标坐标;第一确定模块,设置为根据所述第一目标坐标,确定所述第一预设方向的边界,得到第一目标边界。
可选地,该装置还包括:第二选取模块,设置为在得到所述第一目标边界之后,若所述剩余光斑同在所述第二侧面,选取所述剩余光斑中在所述第一预设方向距离所述第一目标边界最近的光斑,得到第二目标光斑;第三选取模块,设置为选取所述第二目标光斑在所述第一预设方向的X坐标,得到第一候选光斑坐标;第二确定模块,设置为根据所述第一候选光斑坐标,确定第一候选光斑边界;第二增加模块,设置为将所述第一候选光斑边界加入第一候选光斑边界列表中。
可选地,该装置还包括:第一构建模块,设置为在将所述第一候选光斑边界加入第一候选光斑边界列表中之后,构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;第一比较模块,设置为比较所述第一候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第一距离值;第三增加模块,设置为若所述第一距离值低于预设阈值,将所述第一候选光斑边界列表中的光斑加入所述目标光斑提取列表。
可选地,该装置还包括:第三确定模块,设置为确定所述多个距离信息中在所述第二预设方向上数值最小所对应的两个光斑,得到第二光斑集合,其中,所述第二光斑集合光斑中的两个光斑在所述瞳孔中心的第三侧面,且以所述瞳孔中心为中心,相对于所述第三侧面的另一侧面为第四侧面;第四增加模块,设置为若所述第二光斑集合的目标光斑未在所述第一光斑集合中,将所述目标光斑加入所述目标光斑提取列表。
可选地,每个所述光斑对应有X坐标和Y坐标,上述装置还包括:第四选取模块,设置为在得到所述第二光斑集合后,选取所述第二光斑集合中的目标光斑,得到第三目标光斑;第二获取模块,设置为获取所述第三目标光斑在所述第二预设方向的Y坐标,得到第二目标坐标;第四确定模块,设置为根据所述第二目标坐标,确定所述第 二预设方向的边界,得到第二目标边界。
可选地,该装置还包括:第一输出模块,设置为在得到所述第二目标边界之后,若未在所述第二光斑集合的剩余光斑不是同在第四侧面,输出光斑提取结果,其中,所述光斑提取结果中包括:所述第二光斑集合的光斑和未在所述第二光斑集合的剩余光斑中距离所述瞳孔中心最近的光斑;第五选取模块,设置为若未在所述第二光斑集合的剩余光斑是同在所述第四侧面,选取所述第二光斑集合中在所述第二预设方向距离所述第二目标边界最近的光斑,得到第四目标光斑;第六选取模块,设置为选取所述第四目标光斑在所述第二预设方向的Y坐标,得到第二候选光斑坐标;第五确定模块,设置为根据所述第二候选光斑坐标,确定第二候选光斑边界;第五增加模块,设置为将所述第二候选光斑边界加入第二候选光斑边界列表中。
可选地,该装置还包括:第二构建模块,设置为在将所述第二候选光斑边界加入第二候选光斑边界列表之后,构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;第二比较模块,设置为比较所述第二候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第二距离值;第六增加模块,设置为若所述第二距离值低于预设阈值,将所述第二候选光斑边界列表中的光斑加入所述目标光斑提取列表。
可选地,该装置还包括:第二输出模块,设置为在确定所述目标光斑提取列表中的光斑数量达到预设提取数量后,输出所述目标光斑提取列表中的光斑。
可选地,该装置还包括:第一判断模块,设置为在得到所述目标光斑提取列表后,判断所述目标光斑提取列表的光斑所对应的矩形范围比值是否为预设比值,其中,所述矩形范围比值为所述目标光斑提取列表的光斑连接所形成的矩形对应的范围比值;切割模块,设置为在判断出所述目标光斑提取列表的光斑的矩形范围比值不是预设比值,切割所述光斑,以将所述光斑的矩形范围比值达到所述预设比值;第六确定模块,设置为确定所述目标光斑提取列表中的每个光斑中心坐标,得到多个光斑中心坐标;第三获取模块,设置为根据所述多个光斑中心坐标,获取每个所述光斑中心与所述瞳孔中心的距离参数,得到多个光斑中心距离值;第三输出模块,设置为输出所述多个光斑中心距离值中数值最小所对应的光斑的中心坐标。
可选地,所述第一确定单元包括:第二判断模块,设置为判断当前光斑数量是否大于预设提取数量;处理模块,设置为若所述当前光斑数量大于所述预设提取数量,对多个光斑进行图像二值化处理,得到多个二值化光斑;计算模块,设置为计算多个二值化光斑中每个光斑与所述瞳孔中心的距离,得到所述多个光斑距离参数;第四输出模块,设置为若所述当前光斑数量低于等于所述预设提取数量,输出所有的光斑。
根据本发明实施例的另一方面,还提供了一种光斑提取装置,包括:第二获取单元,设置为获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息;第三确定单元,设置为确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,所述第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面;第二判断单元,设置为判断未在所述第一光斑集合中的剩余光斑是否同在第二侧面,其中,所述第二侧面以所述瞳孔中心为中心,相对于所述第一侧面的另一侧面;第二输出单元,设置为在所述剩余光斑不是同在所述第二侧面时,输出光斑提取结果,其中,所述光斑提取结果中至少包括:第一光斑集合中的光斑和所述剩余光斑中距离所述瞳孔中心最近的光斑。
根据本发明实施例的另一方面,还提供了一种存储介质,所述存储介质设置为存储程序,其中,所述程序在被处理器执行时控制所述存储介质所在设备执行上述任意一项所述的光斑提取方法。
根据本发明实施例的另一方面,还提供了一种处理器,所述处理器设置为运行程序,其中,所述程序运行时执行上述任意一项所述的光斑提取方法。
在本发明实施例中,可以采用确定出多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数,并根据多个光斑距离参数在多个光斑中提取预设数量个光斑,然后可获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息,确定多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面,判断未在第一光斑集合中的剩余光斑是否同在第二侧面,其中,第二侧面以瞳孔中心为中心,相对于第一侧面的另一侧面,若剩余光斑不是同在第二侧面,输出光斑提取结果,其中,光斑提取结果中至少包括:第一光斑集合中的光斑和剩余光斑中距离瞳孔中心最近的光斑。在该实施例中,可以提取出预设个数量的光斑,如提取超出两个光斑的光斑,可根据光斑与瞳孔中心的距离,确定出最终需要输出的光斑,输出的光斑数量较多(如大于等于四个),还可以针对光斑的当前位置对光斑进行校正,进而解决相关技术中光斑提取过程中出现提取光斑数量较少,并且提取的效率较低的技术问题。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明设置为解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据本发明实施例的光斑提取方法的流程图;
图2是根据本发明实施例的一种光斑提取的示意图;
图3是根据本发明实施例的另一种可选的光斑提取装置示意图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是设置为区别类似的对象,而不必设置为描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
根据本发明实施例,提供了一种光斑提取的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
本发明下述实施例,可以应用于各个VR设备或者桌面设备中,应用于需要进行图像处理或者需要提取图像中的光斑,都可以使用本发明的下述技术方案。本申请可使用的环境,包括但不限于:桌面设备中,VR设备中,在本申请中,可以以VR设备为例做出说明,在用户佩戴VR眼镜后,需要提取出预设数量个(如4个)目标光斑,光斑提取的数量在本发明中可以是多个,例如,4个,如果在对图像进行处理后,发现光斑少于4个,这时可以直接输出所有的光斑,而如果光斑数量大于4个,则需要进行光斑提取,得到4个目标光斑,并且根据本发明下述实施例可以对粘连的光斑进行切割,得到预设比例的光斑。
可选的,本发明下述实施例中还可以在找到各个光斑后,确认眼球的注视点,其中,在利用瞳孔角膜反射法求解眼球注视点时,可以通过多个红外光源向眼球投射红外光线,红外摄像机对这些红外光线在角膜上形成的光斑进行拍照,由此拍摄带有光斑的眼球图像,当眼球转动时,瞳孔与光斑的相对位置发生变化,利用这样的变化来 计算瞳孔的位置,由此计算眼球注视点,而通过本发明下述实施例中的内容可以计算得到各个光斑的位置,从而确定出注视点的位置。
下面结合优选的实施步骤对本发明进行说明,图1是根据本发明实施例的光斑提取方法的流程图,如图1所示,该方法包括如下步骤:
步骤S102,确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;
需要说明的是,确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数包括:判断当前光斑数量是否大于预设提取数量;若当前光斑数量大于预设提取数量,对多个光斑进行图像二值化处理,得到多个二值化光斑;计算多个二值化光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;若当前光斑数量低于等于预设提取数量,输出所有的光斑。
即可以判断光斑数量是否大于预设的提取数量,若低于预设的提取数量,则可以直接输出所有的光斑,而如果光斑数量大于预设的提取数量,则可以进行如下的光斑提取,得到想要的目标光斑。
可选的,上述对多个光斑进行图像二值化处理可以是在得到复杂的彩色图像或者多种类型的图像后,对图形进行初始的二值化处理,以得到二值化后的光斑。
步骤S104,根据多个光斑距离参数在多个光斑中提取预设数量个光斑。
其中,本发明中对预设数量并不会做具体限定,优选的,预设数量为4个。即在上述步骤中,可以提取4个距离瞳孔中心最近的光斑作为候选光斑,并且在后续的步骤中确定这些光斑是否为最终的想要的目标光斑(即在得到候选光斑后,对候选光斑进行光斑校正)。从而在确定出4个目标光斑后,将目标光斑输出,以确定出用户的注视点的位置。
步骤S106,获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息。
步骤S108,确定多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面。
可选的,本发明实施例中的预设方向包括:第一预设方向和第二预设方向,本发明实施例中可以自行设定第一预设方向和第二预设方向,例如,相对于瞳孔中心的左右方向为第一预设方向,其坐标轴所对应的方向可以对应于X方向;而相对于瞳孔中心的上下方向为第二预设方向,其坐标轴所对应的方向可以对应于Y方向。而上述步骤S108,在确定多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一 光斑集合包括:确定多个距离信息中在第一预设方向上数值最小所对应的两个光斑,得到第一光斑集合;将第一光斑集合的光斑加入预设的目标光斑提取列表。
一种可选的实施方式,每个光斑可以对应有X坐标和Y坐标,在本发明实施例中可以设定相对于第一预设方向的坐标为X坐标,设定相对于第二预设方向的坐标为Y坐标。本发明在得到第一光斑集合之后,还可以选取第一光斑集合中的目标光斑,得到第一目标光斑;获取第一目标光斑在第一预设方向的X坐标,得到第一目标坐标;根据第一目标坐标,确定第一预设方向的边界,得到第一目标边界。在选取第一光斑集合中的目标光斑时,可以是选取第一光斑集合中的任意一个光斑坐标目标光斑,并以该目标光斑的X坐标作为第一预设方向的边界,得到第一目标边界,本发明实施例设置的目标边界可以是在提取光斑时设定的边界,不提取超出该边界的光斑。
另一种可选的实施方式,在得到第一目标边界之后,若未在第一光斑集合中的剩余光斑同在第二侧面,选取剩余光斑中在第一预设方向距离第一目标边界最近的光斑,得到第二目标光斑;选取第二目标光斑在第一预设方向的X坐标,得到第一候选光斑坐标;根据第一候选光斑坐标,确定第一候选光斑边界;将第一候选光斑边界加入第一候选光斑边界列表中。即可以通过选取剩余光斑在第一预设方向距离边界最近的光斑,选取其X坐标,将其加入候选边界列表,即可以将选取的剩余光斑中的光斑作为候选的光斑。
可选的,在将第一候选光斑边界加入第一候选光斑边界列表中之后,还包括:构建与目标光斑提取列表的各项光斑对应的光斑连接框;比较第一候选光斑边界列表中的光斑和光斑连接框的距离值,得到第一距离值;若第一距离值低于预设阈值,将第一候选光斑边界列表中的光斑加入目标光斑提取列表。
步骤S110,判断未在第一光斑集合中的剩余光斑是否同在第二侧面,其中,第二侧面以瞳孔中心为中心,相对于第一侧面的另一侧面。
步骤S112,若剩余光斑不是同在第二侧面,输出光斑提取结果,其中,光斑提取结果中至少包括:第一光斑集合中的光斑和剩余光斑中距离瞳孔中心最近的光斑。
可选的,本发明实施例还包括:确定多个距离信息中在第二预设方向上数值最小所对应的两个光斑,得到第二光斑集合,其中,第二光斑集合光斑中的两个光斑在瞳孔中心的第三侧面,且以瞳孔中心为中心,相对于第三侧面的另一侧面为第四侧面;若第二光斑集合的目标光斑未在第一光斑集合中,将目标光斑加入目标光斑提取列表。
另一种可选的实施方式,每个光斑对应有X坐标和Y坐标,在得到第二光斑集合后,还可以选取第二光斑集合中的目标光斑,得到第三目标光斑;获取第三目标光斑 在第二预设方向的Y坐标,得到第二目标坐标;根据第二目标坐标,确定第二预设方向的边界,得到第二目标边界。
对于本发明中的可选的实施方式,在得到第二目标边界之后还可以将未在第二光斑集合的剩余光斑不是同在第四侧面时,输出光斑提取结果,其中,光斑提取结果中包括:第二光斑集合的光斑和未在第二光斑集合的剩余光斑中距离瞳孔中心最近的光斑;若未在第二光斑集合的剩余光斑是同在第四侧面,选取第二光斑集合中在第二预设方向距离第二目标边界最近的光斑,得到第四目标光斑;选取第四目标光斑在第二预设方向的Y坐标,得到第二候选光斑坐标;根据第二候选光斑坐标,确定第二候选光斑边界;将第二候选光斑边界加入第二候选光斑边界列表中。
可选的,本发明实施例中的第一侧面和第二侧面是相对于第一预设方向,而第三侧面和第四侧面是相对于第二预设方向的,在判断时,根据实际情况做出最终的侧面确定。
另外,在将第二候选光斑边界加入第二候选光斑边界列表之后,还包括:构建与目标光斑提取列表的各项光斑对应的光斑连接框;比较第二候选光斑边界列表中的光斑和光斑连接框的距离值,得到第二距离值;若第二距离值低于预设阈值,将第二候选光斑边界列表中的光斑加入目标光斑提取列表。
可选的,在确定目标光斑提取列表中的光斑数量达到预设提取数量后,输出目标光斑提取列表中的光斑。即若得到目标光斑提取列表中的光斑后,并确定这些光斑最终想要的光斑,则可以输出目标光斑提取列表中的光斑。其中,所述目标光斑提取列表中的光斑数量可以为预设数量,如预设数量为4个,如果在开始提取光斑时,发现光斑达不到4个,则可以直接输出所有的光斑,而如果在开始提取光斑后,发现光斑数量超出4个,则可以通过上述实施例,得到目标光斑提取列表,得到最终想要的4个光斑,从而在得到最终的目标光斑提取列表中的光斑后,输出所有的4个光斑。
而对于光斑中粘连或者距离较近的光斑,可以进行如下方式的处理。
本发明一种可选的实施方式,在得到目标光斑提取列表后,还可以判断目标光斑提取列表的光斑所对应的矩形范围比值是否为预设比值,其中,矩形范围比值为所述目标光斑提取列表的光斑连接所形成的矩形对应的范围比值;若判断出目标光斑提取列表的光斑的矩形范围比值不是预设比值,切割光斑,以将光斑的矩形范围比值达到预设比值;确定目标光斑提取列表中的每个光斑中心坐标,得到多个光斑中心坐标;根据多个光斑中心坐标,获取每个光斑中心与瞳孔中心的距离参数,得到多个光斑中心距离值;输出多个光斑中心距离值中数值最小所对应的光斑的中心坐标。
其中,本发明实施例中对于目标光斑的提取列表的光斑所形成的矩形形状不做具体限定,优选的,在目标光斑提取列表中的光斑为4个时,矩形可以是长方形或者正方形等,而预设比值可以预先设定的矩形的比值,例如,设置长方形的范围比值为1:1,本发明对于该种实施方式并未做具体限定。
通过上述步骤,可以先确定出多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数,根据多个光斑距离参数在多个光斑中提取预设数量个光斑,获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息,确定多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面,判断未在第一光斑集合中的剩余光斑是否同在第二侧面,其中,第二侧面以瞳孔中心为中心,相对于第一侧面的另一侧面,若剩余光斑不是同在第二侧面,输出光斑提取结果,其中,光斑提取结果中至少包括:第一光斑集合中的光斑和剩余光斑中距离瞳孔中心最近的光斑。在该实施例中,可以提取出预设个数量的光斑,如提取超出两个光斑(4个)的光斑,并且根据光斑与瞳孔中心的距离,确定出最终输出的光斑,输出的光斑数量较多,还可以针对光斑的当前位置进行光斑校正,进而解决相关技术中光斑提取过程中出现提取光斑数量较少,并且提取的效率较低的技术问题。
下面结合图2对本发明进行说明,图2是根据本发明实施例的一种光斑提取的示意图,图2中包括了瞳孔中心、X边界、Y边界,并且确定出x1、y1和y2等光斑点,在该实施例中,提取的光斑数量为4个,对应于上述的预设个数量,而第一预设方向为X方向,第二预设方向为Y方向。其提取的具体实现方式可以如下所述:
步骤201、开始提取光斑。
步骤202、判断光斑数量是否不小于4。
若是,执行步骤203,若否,执行步骤214。
步骤203、保留距离最小的四个光斑为候选光斑。
步骤204、开始光斑校正部分。
步骤205、选取X方向上距离最近的两个光斑之一的X坐标X1为一个X方向上的边界,并将这两个光斑加入必选列表。
步骤206、判断剩余两个光斑是否在同一侧面。即相对于上述必选列表中的两个光斑是否在瞳孔中心的另一侧面。
若是,执行步骤207,若否,执行步骤214。
步骤207、选取剩余两光斑在X方向上距离X1最近的一个,选取其X坐标X2加入X方向候选边界列表。
步骤208、选取Y方向上距离最近的两光斑之一的y坐标Y1为一个y方向上的边界,并将其中尚未加入必选列表的光斑加入必选列表。
步骤209、判断剩余两个光斑是否在同一侧面。即相对于上述选取Y方向上距离最近的两光斑是否在瞳孔中心的另一侧面。
若是,执行步骤210,若否,执行步骤214。
步骤210、选取剩余两光斑在Y方向上距离Y1最近的一个,选取其Y坐标Y2加入Y方向候选边界列表。
步骤211、判断候选列表元素坐标距离必选列表连接框的距离是否低于预设阈值。
若是,执行步骤212,若否,输出当前所有的必选列表中的光斑。
步骤212、将候选列表当前元素加入必选列表。
步骤213、若必选列表元素最小范围矩形长宽比不是为预设比例(如1:1),将粘连光斑最小包围切割为预设比例的几部分,计算每部分中心坐标,保留距离瞳孔中心最近的一个作为光斑中心坐标。本发明中对于具体的比例不做限定,可以为1:1,也可以为0.9:1.1,或者1.2:0.8等。
步骤214、输出满足条件的光斑。
通过上述方式,可以对预设数量为4个的光斑进行提取,并最终输出想要的光斑,以通过光斑位置和光斑大小确定出用户当前的注视点。
根据本发明实施例的另一方面,还提供了一种存储介质,存储介质设置为存储程序,其中,程序在被处理器执行时控制存储介质所在设备执行上述任意一项的光斑提取方法。
根据本发明实施例的另一方面,还提供了一种处理器,处理器设置为运行程序,其中,程序运行时执行上述任意一项的光斑提取方法。
图3是根据本发明实施例的另一种可选的光斑提取装置示意图,如图3所示,该装置可以包括:第一确定单元31,设置为确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;提取单元32,设置为根据多个光斑距离参数在多个光斑中提取预设数量个光斑;获取单元33,设置为获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息;第二确定单元34,设置为确定多个距离信息中在预设方 向上数值最小所对应的两个光斑,得到第一光斑集合,其中,第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面;判断单元35,设置为判断未在第一光斑集合中的剩余光斑是否同在第二侧面,其中,第二侧面以瞳孔中心为中心,相对于第一侧面的另一侧面;输出单元36,设置为若剩余光斑不是同在第二侧面,输出光斑提取结果,其中,光斑提取结果中至少包括:第一光斑集合中的光斑和剩余光斑中距离瞳孔中心最近的光斑。
上述光斑提取装置,可以通过第一确定单元31确定出多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数,并通过提取单元32根据多个光斑距离参数在多个光斑中提取预设数量个光斑,通过获取单元33获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息,通过第二确定单元34确定多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面,通过判断单元35判断未在第一光斑集合中的剩余光斑是否同在第二侧面,其中,第二侧面以瞳孔中心为中心,相对于第一侧面的另一侧面,若剩余光斑不是同在第二侧面,通过输出单元36输出光斑提取结果,其中,光斑提取结果中至少包括:第一光斑集合中的光斑和剩余光斑中距离瞳孔中心最近的光斑。在该实施例中,可以提取出预设个数量的光斑,如提取超出两个光斑的光斑,并且根据光斑与瞳孔中心的距离,确定出最终输出的光斑,输出的光斑数量较多,还可以针对光斑的当前位置进行光斑校正,进而解决相关技术中光斑提取过程中出现提取光斑数量较少,并且提取的效率较低的技术问题。
可选的,预设方向包括:第一预设方向和第二预设方向,其中,第二确定单元包括:第一确定模块,设置为确定多个距离信息中在第一预设方向上数值最小所对应的两个光斑,得到第一光斑集合;第一增加模块,设置为将第一光斑集合的光斑加入预设的目标光斑提取列表。
需要说明的是,每个光斑对应有X坐标和Y坐标,上述装置还包括:第一选取模块,设置为在得到第一光斑集合之后,选取第一光斑集合中的目标光斑,得到第一目标光斑;第一获取模块,设置为获取第一目标光斑在第一预设方向的X坐标,得到第一目标坐标;第一确定模块,设置为根据第一目标坐标,确定第一预设方向的边界,得到第一目标边界。
该装置还包括:第二选取模块,设置为在得到第一目标边界之后,若剩余光斑同在第二侧面,选取剩余光斑中在第一预设方向距离第一目标边界最近的光斑,得到第二目标光斑;第三选取模块,设置为选取第二目标光斑在第一预设方向的X坐标,得到第一候选光斑坐标;第二确定模块,设置为根据第一候选光斑坐标,确定第一候选 光斑边界;第二增加模块,设置为将第一候选光斑边界加入第一候选光斑边界列表中。
可选的,该装置还包括:第一构建模块,设置为在将第一候选光斑边界加入第一候选光斑边界列表中之后,构建与目标光斑提取列表的各项光斑对应的光斑连接框;第一比较模块,设置为比较第一候选光斑边界列表中的光斑和光斑连接框的距离值,得到第一距离值;第三增加模块,设置为若第一距离值低于预设阈值,将第一候选光斑边界列表中的光斑加入目标光斑提取列表。
另一种可选的实施方式,该装置还包括:第三确定模块,设置为确定多个距离信息中在第二预设方向上数值最小所对应的两个光斑,得到第二光斑集合,其中,第二光斑集合光斑中的两个光斑在瞳孔中心的第三侧面,且以瞳孔中心为中心,相对于第三侧面的另一侧面为第四侧面;第四增加模块,设置为若第二光斑集合的目标光斑未在第一光斑集合中,将目标光斑加入目标光斑提取列表。
对于上述实施方式,每个光斑对应有X坐标和Y坐标,上述装置还包括:第四选取模块,设置为在得到第二光斑集合后,选取第二光斑集合中的目标光斑,得到第三目标光斑;第二获取模块,设置为获取第三目标光斑在第二预设方向的Y坐标,得到第二目标坐标;第四确定模块,设置为根据第二目标坐标,确定第二预设方向的边界,得到第二目标边界。
可选的,该装置还包括:第一输出模块,设置为在得到第二目标边界之后,若未在第二光斑集合的剩余光斑不是同在第四侧面,输出光斑提取结果,其中,光斑提取结果中包括:第二光斑集合的光斑和未在第二光斑集合的剩余光斑中距离瞳孔中心最近的光斑;第五选取模块,设置为若未在第二光斑集合的剩余光斑是同在第四侧面,选取第二光斑集合中在第二预设方向距离第二目标边界最近的光斑,得到第四目标光斑;第六选取模块,设置为选取第四目标光斑在第二预设方向的Y坐标,得到第二候选光斑坐标;第五确定模块,设置为根据第二候选光斑坐标,确定第二候选光斑边界;第五增加模块,设置为将第二候选光斑边界加入第二候选光斑边界列表中。
另外,该装置还包括:第二构建模块,设置为在将第二候选光斑边界加入第二候选光斑边界列表之后,构建与目标光斑提取列表的各项光斑对应的光斑连接框;第二比较模块,设置为比较第二候选光斑边界列表中的光斑和光斑连接框的距离值,得到第二距离值;第六增加模块,设置为若第二距离值低于预设阈值,将第二候选光斑边界列表中的光斑加入目标光斑提取列表。
可选的,该装置还包括:第二输出模块,设置为在确定目标光斑提取列表中的光斑数量达到预设提取数量后,输出目标光斑提取列表中的光斑。
另一种可选的实施方式,该装置还包括:第一判断模块,设置为在得到目标光斑提取列表后,判断目标光斑提取列表的光斑所对应的矩形范围比值是否为预设比值,其中,矩形范围比值为所述目标光斑提取列表的光斑连接所形成的矩形对应的范围比值;切割模块,设置为在判断出目标光斑提取列表的光斑的矩形范围比值不是预设比值,切割光斑,以将光斑的矩形范围比值达到预设比值;第六确定模块,设置为确定目标光斑提取列表中的每个光斑中心坐标,得到多个光斑中心坐标;第三获取模块,设置为根据多个光斑中心坐标,获取每个光斑中心与瞳孔中心的距离参数,得到多个光斑中心距离值;第三输出模块,设置为输出多个光斑中心距离值中数值最小所对应的光斑的中心坐标。
另外,第一确定单元包括:第二判断模块,设置为判断当前光斑数量是否大于预设提取数量;处理模块,设置为若当前光斑数量大于预设提取数量,对多个光斑进行图像二值化处理,得到多个二值化光斑;计算模块,设置为计算多个二值化光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;第四输出模块,设置为若当前光斑数量低于等于预设提取数量,输出所有的光斑。
上述的光斑提取装置还可以包括处理器和存储器,上述第一确定单元31、提取单元32、获取单元33、第二确定单元34、判断单元35、输出单元36等均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。
处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来输出目标数量个光斑。
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。
本发明实施例提供了一种设备,设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序,处理器执行程序时实现以下步骤:确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;根据多个光斑距离参数在多个光斑中提取预设数量个光斑;获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息;确定多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面;判断未在第一光斑集合中的剩余光斑是否同在第二侧面,其中,第二侧面以瞳孔中心为中心,相对于第一侧面的另一侧面;若剩余光斑不是同在第二侧面,输出光斑提取结果,其中,光斑提取结果中至少包括:第一光斑集合中的光斑和剩余光斑中距离瞳孔中心最近的光斑。
可选的,预设方向包括:第一预设方向和第二预设方向,处理器执行程序时,还可以确定多个距离信息中在第一预设方向上数值最小所对应的两个光斑,得到第一光斑集合;将第一光斑集合的光斑加入预设的目标光斑提取列表。
可选的,每个光斑对应有X坐标和Y坐标,处理器执行程序时,还可以在得到第一光斑集合之后,选取第一光斑集合中的目标光斑,得到第一目标光斑;获取第一目标光斑在第一预设方向的X坐标,得到第一目标坐标;根据第一目标坐标,确定第一预设方向的边界,得到第一目标边界。
可选的,处理器执行程序时,还可以在得到第一目标边界之后,若剩余光斑同在第二侧面,选取剩余光斑中在第一预设方向距离第一目标边界最近的光斑,得到第二目标光斑;选取第二目标光斑在第一预设方向的X坐标,得到第一候选光斑坐标;根据第一候选光斑坐标,确定第一候选光斑边界;将第一候选光斑边界加入第一候选光斑边界列表中。
可选的,处理器执行程序时,还可以在将第一候选光斑边界加入第一候选光斑边界列表中之后,构建与目标光斑提取列表的各项光斑对应的光斑连接框;比较第一候选光斑边界列表中的光斑和光斑连接框的距离值,得到第一距离值;若第一距离值低于预设阈值,将第一候选光斑边界列表中的光斑加入目标光斑提取列表。
可选的,处理器执行程序时,还可以确定多个距离信息中在第二预设方向上数值最小所对应的两个光斑,得到第二光斑集合,其中,第二光斑集合光斑中的两个光斑在瞳孔中心的第三侧面,且以瞳孔中心为中心,相对于第三侧面的另一侧面为第四侧面;若第二光斑集合的目标光斑未在第一光斑集合中,将目标光斑加入目标光斑提取列表。
可选的,处理器执行程序时,还可以选取第二光斑集合中的目标光斑,得到第三目标光斑;获取第三目标光斑在第二预设方向的Y坐标,得到第二目标坐标;根据第二目标坐标,确定第二预设方向的边界,得到第二目标边界。
可选的,处理器执行程序时,还可以在未在第二光斑集合的剩余光斑不是同在第四侧面,输出光斑提取结果,其中,光斑提取结果中包括:第二光斑集合的光斑和未在第二光斑集合的剩余光斑中距离瞳孔中心最近的光斑;若未在第二光斑集合的剩余光斑是同在第四侧面,选取第二光斑集合中在第二预设方向距离第二目标边界最近的光斑,得到第四目标光斑;选取第四目标光斑在第二预设方向的Y坐标,得到第二候选光斑坐标;根据第二候选光斑坐标,确定第二候选光斑边界;将第二候选光斑边界加入第二候选光斑边界列表中。
可选的,处理器执行程序时,还可以在将第二候选光斑边界加入第二候选光斑边界列表之后,构建与目标光斑提取列表的各项光斑对应的光斑连接框;比较第二候选光斑边界列表中的光斑和光斑连接框的距离值,得到第二距离值;若第二距离值低于预设阈值,将第二候选光斑边界列表中的光斑加入目标光斑提取列表。
可选的,处理器执行程序时,还可以在确定目标光斑提取列表中的光斑数量达到预设提取数量后,输出目标光斑提取列表中的光斑。
可选的,处理器执行程序时,还可以在得到目标光斑提取列表后,判断目标光斑提取列表的光斑所对应的矩形范围比值是否为预设比值,其中,矩形范围比值为所述目标光斑提取列表的光斑连接所形成的矩形对应的范围比值;若判断出目标光斑提取列表的光斑的矩形范围比值不是预设比值,切割光斑,以将光斑的矩形范围比值达到预设比值;确定目标光斑提取列表中的每个光斑中心坐标,得到多个光斑中心坐标;根据多个光斑中心坐标,获取每个光斑中心与瞳孔中心的距离参数,得到多个光斑中心距离值;输出多个光斑中心距离值中数值最小所对应的光斑的中心坐标。
可选的,处理器执行程序时,还可以判断当前光斑数量是否大于预设提取数量;若当前光斑数量大于预设提取数量,对多个光斑进行图像二值化处理,得到多个二值化光斑;计算多个二值化光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;若当前光斑数量低于等于预设提取数量,输出所有的光斑。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以 是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。
工业实用性
本申请实施例提供的方案可以用于提取多个光斑,在本申请实施例提供的技术方案中,可以应用于VR设备或者其它桌面设备中,在用户观看相应的视频或者动画时,可以提取预设数量的光斑,并根据光斑与瞳孔中心的距离,确定出最终需要输出的光斑,输出的光斑与相关技术相比数量较多,还可以针对光斑的当前位置进行光斑校正,进而解决相关技术中光斑提取过程中出现提取光斑数量较少,并且提取的效率较低的技术问题。本申请实施例可以在找到各个光斑后,确认眼球的注视点,当眼球转动时,瞳孔与光斑的相对位置发生变化,利用这样的变化来计算瞳孔的位置。

Claims (20)

  1. 一种光斑提取方法,其中,包括:
    确定多个光斑中每个光斑与瞳孔中心的距离,得到多个光斑距离参数;
    根据所述多个光斑距离参数在所述多个光斑中提取预设数量个光斑;
    获取所述预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息;
    确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,所述第一光斑集合光斑中的两个光斑在所述瞳孔中心的第一侧面;
    判断未在所述第一光斑集合中的剩余光斑是否同在第二侧面,其中,所述第二侧面以所述瞳孔中心为中心,相对于所述第一侧面的另一侧面;
    若所述剩余光斑不是同在所述第二侧面,输出光斑提取结果,其中,所述光斑提取结果中至少包括:第一光斑集合中的光斑和所述剩余光斑中距离所述瞳孔中心最近的光斑。
  2. 根据权利要求1所述的方法,其中,所述预设方向包括:第一预设方向和第二预设方向,其中,确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合包括:
    确定所述多个距离信息中在所述第一预设方向上数值最小所对应的两个光斑,得到所述第一光斑集合;
    将所述第一光斑集合的光斑加入预设的目标光斑提取列表。
  3. 根据权利要求2所述的方法,其中,每个光斑对应有X坐标和Y坐标,在得到所述第一光斑集合之后,还包括:
    选取所述第一光斑集合中的目标光斑,得到第一目标光斑;
    获取所述第一目标光斑在所述第一预设方向的X坐标,得到第一目标坐标;
    根据所述第一目标坐标,确定所述第一预设方向的边界,得到第一目标边界。
  4. 根据权利要求3所述的方法,其中,在得到所述第一目标边界之后,还包括:
    若所述剩余光斑同在所述第二侧面,选取所述剩余光斑中在所述第一预设方向距离所述第一目标边界最近的光斑,得到第二目标光斑;
    选取所述第二目标光斑在所述第一预设方向的X坐标,得到第一候选光斑坐标;
    根据所述第一候选光斑坐标,确定第一候选光斑边界;
    将所述第一候选光斑边界加入第一候选光斑边界列表中。
  5. 根据权利要求4所述的方法,其中,在将所述第一候选光斑边界加入第一候选光斑边界列表中之后,还包括:
    构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;
    比较所述第一候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第一距离值;
    若所述第一距离值低于预设阈值,将所述第一候选光斑边界列表中的光斑加入所述目标光斑提取列表。
  6. 根据权利要求2所述的方法,其中,还包括:
    确定所述多个距离信息中在所述第二预设方向上数值最小所对应的两个光斑,得到第二光斑集合,其中,所述第二光斑集合光斑中的两个光斑在所述瞳孔中心的第三侧面,且以所述瞳孔中心为中心,相对于所述第三侧面的另一侧面为第四侧面;
    若所述第二光斑集合的目标光斑未在所述第一光斑集合中,将所述目标光斑加入所述目标光斑提取列表。
  7. 根据权利要求6所述的方法,其中,每个光斑对应有X坐标和Y坐标,在得到所述第二光斑集合后,所述方法还包括:
    选取所述第二光斑集合中的目标光斑,得到第三目标光斑;
    获取所述第三目标光斑在所述第二预设方向的Y坐标,得到第二目标坐标;
    根据所述第二目标坐标,确定所述第二预设方向的边界,得到第二目标边界。
  8. 根据权利要求7所述的方法,其中,在得到所述第二目标边界之后,所述方法还包括:
    若未在所述第二光斑集合的剩余光斑不是同在第四侧面,输出光斑提取结果,其中,所述光斑提取结果中包括:所述第二光斑集合的光斑和未在所述第二光斑集合的剩余光斑中距离所述瞳孔中心最近的光斑;
    若未在所述第二光斑集合的剩余光斑是同在所述第四侧面,选取所述第二光斑集合中在所述第二预设方向距离所述第二目标边界最近的光斑,得到第四目标光斑;
    选取所述第四目标光斑在所述第二预设方向的Y坐标,得到第二候选光斑坐标;
    根据所述第二候选光斑坐标,确定第二候选光斑边界;
    将所述第二候选光斑边界加入第二候选光斑边界列表中。
  9. 根据权利要求8所述的方法,其中,在将所述第二候选光斑边界加入第二候选光斑边界列表之后,还包括:
    构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;
    比较所述第二候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第二距离值;
    若所述第二距离值低于预设阈值,将所述第二候选光斑边界列表中的光斑加入所述目标光斑提取列表。
  10. 根据权利要求9所述的方法,其中,在得到所述目标光斑提取列表后,还包括:
    判断所述目标光斑提取列表的光斑所对应的矩形范围比值是否为预设比值,其中,所述矩形范围比值为所述目标光斑提取列表的光斑连接所形成的矩形对应的范围比值;
    若判断出所述目标光斑提取列表的光斑的矩形范围比值不是预设比值,切割所述光斑,以将所述光斑的矩形范围比值达到所述预设比值;
    确定所述目标光斑提取列表中的每个光斑中心坐标,得到多个光斑中心坐标;
    根据所述多个光斑中心坐标,获取每个所述光斑中心与所述瞳孔中心的距离参数,得到多个光斑中心距离值;
    输出所述多个光斑中心距离值中数值最小所对应的光斑的中心坐标。
  11. 一种光斑提取方法,包括:
    获取预设数量个光斑中每两个光斑之间的距离信息,得到多个距离信息;
    确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合,其中,所述第一光斑集合光斑中的两个光斑在瞳孔中心的第一侧面;
    判断未在所述第一光斑集合中的剩余光斑是否同在第二侧面,其中,所述第二侧面以所述瞳孔中心为中心,相对于所述第一侧面的另一侧面;
    若所述剩余光斑不是同在所述第二侧面,输出光斑提取结果,其中,所述光斑提取结果中至少包括:第一光斑集合中的光斑和所述剩余光斑中距离所述瞳孔中心最近的光斑。
  12. 根据权利要求11所述的方法,其中,所述预设方向包括:第一预设方向和第二预设方向,其中,确定所述多个距离信息中在预设方向上数值最小所对应的两个光斑,得到第一光斑集合包括:
    确定所述多个距离信息中在所述第一预设方向上数值最小所对应的两个光斑,得到所述第一光斑集合;
    将所述第一光斑集合的光斑加入预设的目标光斑提取列表。
  13. 根据权利要求12所述的方法,其中,每个光斑对应有X坐标和Y坐标,在得到所述第一光斑集合之后,还包括:
    选取所述第一光斑集合中的目标光斑,得到第一目标光斑;
    获取所述第一目标光斑在所述第一预设方向的X坐标,得到第一目标坐标;
    根据所述第一目标坐标,确定所述第一预设方向的边界,得到第一目标边界。
  14. 根据权利要求13所述的方法,其中,在得到所述第一目标边界之后,还包括:
    若所述剩余光斑同在所述第二侧面,选取所述剩余光斑中在所述第一预设方向距离所述第一目标边界最近的光斑,得到第二目标光斑;
    选取所述第二目标光斑在所述第一预设方向的X坐标,得到第一候选光斑坐标;
    根据所述第一候选光斑坐标,确定第一候选光斑边界;
    将所述第一候选光斑边界加入第一候选光斑边界列表中。
  15. 根据权利要求14所述的方法,其中,在将所述第一候选光斑边界加入第一候选光斑边界列表中之后,还包括:
    构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;
    比较所述第一候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第一距离值;
    若所述第一距离值低于预设阈值,将所述第一候选光斑边界列表中的光斑加入所述目标光斑提取列表。
  16. 根据权利要求12所述的方法,其中,还包括:
    确定所述多个距离信息中在所述第二预设方向上数值最小所对应的两个光斑,得到第二光斑集合,其中,所述第二光斑集合光斑中的两个光斑在所述瞳孔中心的第三侧面,且以所述瞳孔中心为中心,相对于所述第三侧面的另一侧面为第四侧面;
    若所述第二光斑集合的目标光斑未在所述第一光斑集合中,将所述目标光斑加入所述目标光斑提取列表。
  17. 根据权利要求16所述的方法,其中,每个光斑对应有X坐标和Y坐标,在得到所述第二光斑集合后,所述方法还包括:
    选取所述第二光斑集合中的目标光斑,得到第三目标光斑;
    获取所述第三目标光斑在所述第二预设方向的Y坐标,得到第二目标坐标;
    根据所述第二目标坐标,确定所述第二预设方向的边界,得到第二目标边界。
  18. 根据权利要求17所述的方法,其中,在得到所述第二目标边界之后,所述方法还包括:
    若未在所述第二光斑集合的剩余光斑不是同在第四侧面,输出光斑提取结果,其中,所述光斑提取结果中包括:所述第二光斑集合的光斑和未在所述第二光斑集合的剩余光斑中距离所述瞳孔中心最近的光斑;
    若未在所述第二光斑集合的剩余光斑是同在所述第四侧面,选取所述第二光斑集合中在所述第二预设方向距离所述第二目标边界最近的光斑,得到第四目标光斑;
    选取所述第四目标光斑在所述第二预设方向的Y坐标,得到第二候选光斑坐标;
    根据所述第二候选光斑坐标,确定第二候选光斑边界;
    将所述第二候选光斑边界加入第二候选光斑边界列表中。
  19. 根据权利要求18所述的方法,其中,在将所述第二候选光斑边界加入第二候选光斑边界列表之后,还包括:
    构建与所述目标光斑提取列表的各项光斑对应的光斑连接框;
    比较所述第二候选光斑边界列表中的光斑和所述光斑连接框的距离值,得到第二距离值;
    若所述第二距离值低于预设阈值,将所述第二候选光斑边界列表中的光斑加入所述目标光斑提取列表。
  20. 根据权利要求19所述的方法,其中,在得到所述目标光斑提取列表后,还包括:
    判断所述目标光斑提取列表的光斑所对应的矩形范围比值是否为预设比值,其中,所述矩形范围比值为所述目标光斑提取列表的光斑连接所形成的矩形对应的范围比值;
    若判断出所述目标光斑提取列表的光斑的矩形范围比值不是预设比值,切割所述光斑,以将所述光斑的矩形范围比值达到所述预设比值;
    确定所述目标光斑提取列表中的每个光斑中心坐标,得到多个光斑中心坐标;
    根据所述多个光斑中心坐标,获取每个所述光斑中心与所述瞳孔中心的距离参数,得到多个光斑中心距离值;
    输出所述多个光斑中心距离值中数值最小所对应的光斑的中心坐标。
PCT/CN2019/083496 2018-04-19 2019-04-19 光斑提取方法 WO2019201337A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810354501.8 2018-04-19
CN201810354501.8A CN108898572B (zh) 2018-04-19 2018-04-19 光斑提取方法

Publications (1)

Publication Number Publication Date
WO2019201337A1 true WO2019201337A1 (zh) 2019-10-24

Family

ID=64342318

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/083496 WO2019201337A1 (zh) 2018-04-19 2019-04-19 光斑提取方法

Country Status (3)

Country Link
CN (1) CN108898572B (zh)
TW (1) TWI701940B (zh)
WO (1) WO2019201337A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108898572B (zh) * 2018-04-19 2020-11-13 北京七鑫易维信息技术有限公司 光斑提取方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100103375A1 (en) * 2008-10-27 2010-04-29 Utechzone Co., Ltd. Eye-tracking method and system for implementing the same
CN102930252A (zh) * 2012-10-26 2013-02-13 广东百泰科技有限公司 一种基于神经网络头部运动补偿的视线跟踪方法
CN107506705A (zh) * 2017-08-11 2017-12-22 西安工业大学 一种瞳孔‑普尔钦斑视线跟踪与注视提取方法
CN107831900A (zh) * 2017-11-22 2018-03-23 中国地质大学(武汉) 一种眼控鼠标的人机交互方法及系统
CN108898572A (zh) * 2018-04-19 2018-11-27 北京七鑫易维信息技术有限公司 光斑提取方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013106645A (ja) * 2011-11-17 2013-06-06 Toyota Central R&D Labs Inc 視線計測装置及びプログラム
CN102520796B (zh) * 2011-12-08 2014-10-08 华南理工大学 一种基于逐步回归分析映射模型的视线跟踪方法
CN104809424B (zh) * 2014-01-23 2020-11-10 北京七鑫易维信息技术有限公司 一种基于虹膜特征实现视线追踪的方法
CN105094300B (zh) * 2014-05-16 2017-12-12 北京七鑫易维信息技术有限公司 一种基于标准化眼睛图像的视线追踪系统及方法
CN104739367B (zh) * 2015-03-14 2016-07-06 中国科学院苏州生物医学工程技术研究所 一种双目瞳孔对光综合检测系统
JP6764728B2 (ja) * 2016-08-26 2020-10-07 株式会社トプコン 眼科装置、及び眼科装置のアライメント方法
CN106778641B (zh) * 2016-12-23 2020-07-03 北京七鑫易维信息技术有限公司 视线估计方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100103375A1 (en) * 2008-10-27 2010-04-29 Utechzone Co., Ltd. Eye-tracking method and system for implementing the same
CN102930252A (zh) * 2012-10-26 2013-02-13 广东百泰科技有限公司 一种基于神经网络头部运动补偿的视线跟踪方法
CN107506705A (zh) * 2017-08-11 2017-12-22 西安工业大学 一种瞳孔‑普尔钦斑视线跟踪与注视提取方法
CN107831900A (zh) * 2017-11-22 2018-03-23 中国地质大学(武汉) 一种眼控鼠标的人机交互方法及系统
CN108898572A (zh) * 2018-04-19 2018-11-27 北京七鑫易维信息技术有限公司 光斑提取方法

Also Published As

Publication number Publication date
CN108898572A (zh) 2018-11-27
CN108898572B (zh) 2020-11-13
TW201944769A (zh) 2019-11-16
TWI701940B (zh) 2020-08-11

Similar Documents

Publication Publication Date Title
KR102667525B1 (ko) Ar/vr 디지털 콘텐츠를 생성하기 위한 디지털 이미지 적합성 결정
US20210350136A1 (en) Method, apparatus, device, and storage medium for determining implantation location of recommendation information
EP2567536B1 (en) Generating a combined image from multiple images
KR102081842B1 (ko) 자동 가이드식 이미지 캡쳐 및 프레젠테이션
US20190294241A1 (en) Method and apparatus for user interface using gaze interaction
US20210312212A1 (en) Product image generation system
EP3243162A1 (en) Gaze detection offset for gaze tracking models
AU2014275410A1 (en) Evaluating image sharpness
CN109635669B (zh) 图像分类方法、装置及分类模型的训练方法、装置
JP2013500536A5 (zh)
CN108628442B (zh) 一种信息提示方法、装置以及电子设备
WO2014070145A1 (en) Object segmentation
CN108846899B (zh) 提高用户对房源中每个功能间的面积感知的方法及系统
WO2019201337A1 (zh) 光斑提取方法
US20200334731A1 (en) Product comparison techniques
TWI703348B (zh) 影像處理系統及影像處理方法
CN111881365A (zh) 内容推荐方法及装置
WO2019154012A1 (zh) 匹配光源与光斑的方法和装置
US20180210611A1 (en) Television virtual touch control method and system
CN112817447B (zh) 一种ar内容显示方法及系统
CN106360941A (zh) 一种指甲定位方法及美甲设备
CN107479902B (zh) 控件处理方法及装置,存储介质、处理器和终端
WO2023093329A1 (zh) 信息输出方法、头戴式显示设备及可读存储介质
CN106778803A (zh) 一种基于红外图像识别技术的指甲定位方法及美甲设备
CN115457646A (zh) 用于对眼底周边的病灶进行识别的装置、方法和相关产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19788785

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19788785

Country of ref document: EP

Kind code of ref document: A1