CN111084606A - Vision detection method and device based on image recognition and computer equipment - Google Patents

Vision detection method and device based on image recognition and computer equipment Download PDF

Info

Publication number
CN111084606A
CN111084606A CN201910969805.XA CN201910969805A CN111084606A CN 111084606 A CN111084606 A CN 111084606A CN 201910969805 A CN201910969805 A CN 201910969805A CN 111084606 A CN111084606 A CN 111084606A
Authority
CN
China
Prior art keywords
current
value
vision
user
pixel point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910969805.XA
Other languages
Chinese (zh)
Inventor
夏新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201910969805.XA priority Critical patent/CN111084606A/en
Priority to PCT/CN2020/087032 priority patent/WO2021068486A1/en
Publication of CN111084606A publication Critical patent/CN111084606A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • A61B3/10Objective types, i.e. instruments for examining the eyes independent of the patients' perceptions or reactions
    • A61B3/14Arrangements specially adapted for eye photography
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B3/00Apparatus for testing the eyes; Instruments for examining the eyes
    • A61B3/10Objective types, i.e. instruments for examining the eyes independent of the patients' perceptions or reactions
    • A61B3/103Objective types, i.e. instruments for examining the eyes independent of the patients' perceptions or reactions for determining refraction, e.g. refractometers, skiascopes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Ophthalmology & Optometry (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Veterinary Medicine (AREA)
  • Public Health (AREA)
  • Biophysics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Biomedical Technology (AREA)
  • Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a vision detection method and device based on image recognition, computer equipment and a storage medium. The method comprises the steps of obtaining the head length or the head width in a face image of a current user; acquiring a current distance value between a user and a screen according to the length of the head or the ratio of the width of the head to the corresponding side length of a standard camera rectangular frame; according to the current distance value and a calling distance value and vision mapping relation table, acquiring a corresponding current user vision value; correspondingly constructing a vision curve according to the current user vision value and the stored historical vision value set which meets the preset screening condition in the user historical vision value set; and sending the vision curve to the user terminal for displaying. The method realizes the automatic periodic acquisition of the face images of the user to detect the vision of the user when the intelligent terminal with the front camera is used, and can also automatically generate a vision curve, thereby not only improving the detection efficiency, but also acquiring massive detection data for data analysis and use.

Description

Vision detection method and device based on image recognition and computer equipment
Technical Field
The invention relates to the technical field of image recognition, in particular to a vision detection method and device based on image recognition, computer equipment and a storage medium.
Background
The human eyes can clearly see the external things based on the convex lens imaging principle, and the scene image formed by the eyeball crystals with normal vision just falls on the retina, so that the human can clearly see the scene.
At present, when detecting eyesight, the mode that adopts the person of detection to watch the eye chart usually tests, can't carry out periodic detection through intelligent terminal, leads to detection efficiency low, and the detected data who obtains moreover is limited.
Disclosure of Invention
The embodiment of the invention provides a vision detection method, a vision detection device, computer equipment and a storage medium based on image recognition, and aims to solve the problems that in the prior art, when the vision is detected, a tester usually adopts a mode of watching an eye chart to test, periodic detection cannot be carried out through an intelligent terminal, so that the detection efficiency is low, and the obtained detection data is limited.
In a first aspect, an embodiment of the present invention provides a vision testing method based on image recognition, including:
if the difference between the current system time and the last picture acquisition time is equal to the preset picture acquisition period, receiving a face image of the current user uploaded by a user side;
acquiring the head length or the head width in the face image of the current user;
acquiring a current distance value between a user and a screen according to the length of the head or the ratio of the width of the head to the corresponding side length of the standard camera rectangular frame and the standard distance value of the standard camera rectangular frame;
according to the current distance value, calling a pre-stored distance value and vision mapping relation table to obtain a current user vision value corresponding to the current distance value;
correspondingly constructing a vision curve according to the current user vision value and the stored historical vision value set which meets the preset screening condition in the user historical vision value set; the visual curve takes a time axis as an X axis, and the visual value corresponding to each moment as a Y axis; the screening conditions comprise a screening time period and vision value values; and
and sending the vision curve to a user terminal for displaying.
In a second aspect, an embodiment of the present invention provides an image recognition-based vision testing apparatus, including:
the receiving unit is used for receiving the face image of the current user uploaded by the user side if the difference between the current system time and the previous image acquisition time is equal to the preset image acquisition period;
the size acquisition unit is used for acquiring the head length or the head width in the face image of the current user;
the current distance value acquisition unit is used for acquiring a current distance value between a user and a screen according to the head length or the ratio of the head width to the corresponding side length of the standard camera rectangular frame and the standard distance value of the standard camera rectangular frame;
the current user visual force value acquisition unit is used for calling a pre-stored distance value and visual mapping relation table according to the current distance value so as to acquire a current user visual force value corresponding to the current distance value;
the vision curve building unit is used for correspondingly building a vision curve according to the current user vision value and a historical vision value set which meets preset screening conditions in the stored historical vision value set of the user; the visual curve takes a time axis as an X axis, and the visual value corresponding to each moment as a Y axis; the screening conditions comprise a screening time period and vision value values; and
and the curve sending unit is used for sending the vision curve to the user side for displaying.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor, when executing the computer program, implements the vision detection method based on image recognition according to the first aspect.
In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, causes the processor to execute the vision detection method based on image recognition according to the first aspect.
The embodiment of the invention provides a vision detection method, a device, computer equipment and a storage medium based on image recognition, which are used for acquiring the head length or the head width in a face image of a current user, acquiring the head length or the head width according to the face image of the current user, and acquiring the current distance value between the user and a screen according to the head length or the head width so as to acquire the vision value of the current user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a vision testing method based on image recognition according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a vision testing method based on image recognition according to an embodiment of the present invention;
FIG. 3 is a sub-flowchart of a vision testing method based on image recognition according to an embodiment of the present invention;
FIG. 4 is a schematic view of another sub-flow chart of a vision testing method based on image recognition according to an embodiment of the present invention;
FIG. 5 is a schematic view of another sub-flow chart of a vision testing method based on image recognition according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a vision testing apparatus based on image recognition provided by an embodiment of the present invention;
FIG. 7 is a block diagram of a sub-unit of a vision testing apparatus based on image recognition according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of another sub-unit of the vision testing apparatus based on image recognition provided by the embodiment of the present invention;
FIG. 9 is a schematic block diagram of another sub-unit of the vision testing apparatus based on image recognition provided by the embodiment of the invention;
FIG. 10 is a schematic block diagram of a computer device provided by an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic view of an application scenario of a vision testing method based on image recognition according to an embodiment of the present invention; fig. 2 is a schematic flowchart of a vision testing method based on image recognition according to an embodiment of the present invention, where the vision testing method based on image recognition is applied in a server, and the method is executed by application software installed in the server.
As shown in fig. 2, the method includes steps S110 to S160.
And S110, receiving the face image of the current user uploaded by the user terminal if the difference between the current system time and the previous image acquisition time is equal to a preset image acquisition period.
In this embodiment, the user face images are periodically collected by a front-facing camera (i.e., a camera that can conveniently capture the face images of the user) disposed on a user side (the user side can also be understood as an intelligent terminal, such as a desktop computer, a tablet computer, a smart phone, etc.), and then the collected user face images are uploaded to a server by the intelligent terminal for image recognition to analyze the user vision value.
For example, the current system time is 9:00 am on 1 month and 1 month in 2018, the time interval between the current system time and 8:50 am on 1 month and 1 month in 2018 is 10 minutes, which is equal to the preset picture acquisition period of 10 minutes, and at this time, the user terminal automatically uploads the face image of the current user acquired at the current system time to the server. The server can estimate the distance between the human eyes and the screen of the acquired human face image of the user at each moment, and then converts the distance between the human eyes and the screen into the vision of the user, so that the periodical monitoring on the vision value is realized.
And S120, acquiring the head length or the head width in the face image of the current user.
In this embodiment, in order to obtain the head length or the head width according to the face image of the current user, the head contour of the user may be obtained through edge detection to obtain the head length or the head width of the user.
In one embodiment, as shown in fig. 3, step S120 includes:
s121, graying the face image of the current user to obtain a grayed picture;
s122, performing Gaussian filtering on the grayed picture to obtain a filtered picture;
s123, obtaining the gradient value and the direction of the filtered picture, and performing non-maximum suppression on the filtered picture to obtain a processed picture;
s124, performing double-threshold detection and edge connection on the processed picture to obtain a current face edge detection image corresponding to the current user face image;
and S125, acquiring a corresponding current face rectangular frame according to the current face edge detection image, and acquiring the head length or the head width corresponding to the current user face image according to the current face rectangular frame.
In this embodiment, since the current user face image uploaded by the user side is a color image in RGB format, in order to facilitate the contour of the face part in the image, the current user face image may be grayed to obtain a grayed image.
And then, carrying out Gaussian filtering on the gray picture, wherein the realization of the Gaussian filtering of the image can be realized by using two one-dimensional Gaussian kernels to respectively carry out weighting twice, namely, carrying out one-dimensional convolution in the X direction firstly, carrying out one-dimensional convolution in the Y direction on the obtained convolution result, and finally obtaining the filtered picture. Of course, it can also be realized by one convolution directly with a two-dimensional gaussian kernel. Through Gaussian filtering, the noise reduction processing can be effectively carried out on the gray picture.
And after the Gaussian filtering of the face image of the current user is finished, non-maximum suppression processing can be performed. Non-maxima suppression is an edge thinning technique, and the effect of non-maxima suppression is "thin" edges. After gradient computation of the image, edges extracted based on gradient values alone remain blurred. While non-maxima suppression may help suppress all gradient values outside the local maxima to 0, resulting in more accurate edge detection.
And after the filtered picture is subjected to non-maximum value suppression to obtain a processed picture, carrying out double-threshold detection and edge connection at the moment, and obtaining a current face edge detection image corresponding to the current user face image. The processed picture is detected by using a double-threshold algorithm, namely, an accumulative histogram is used for calculating two thresholds, and edges are determined when the two thresholds are greater than a high threshold; whatever is less than the low threshold is not necessarily an edge. If the detection result is larger than the low threshold value but smaller than the high threshold value, it is determined whether there is an edge pixel exceeding the high threshold value in the adjacent pixels of the pixel, if so, the pixel is an edge, otherwise, the pixel is not an edge. The above-mentioned dual-threshold algorithm detects and obtains the pixel point located on the edge in the picture after processing only. Due to the influence of noise and edge discontinuity caused by uneven illumination, an edge pixel point obtained after edge detection can rarely and completely depict an actual edge. The edge detection algorithm may be followed by a connecting method to combine edge pixels into meaningful edges, thereby obtaining a current face edge detection image corresponding to the current user face image.
And finally, when a corresponding current face rectangular frame is obtained according to the current face edge detection image, the current face rectangular frame is a rectangular frame which can just surround the current face edge detection image and has four sides externally tangent to the current face edge detection image. The length of the circumscribed rectangle frame corresponds to the head width, and the length of the circumscribed rectangle frame corresponds to the head length.
In one embodiment, as shown in fig. 4, step S121 includes:
s1211, acquiring an R channel value, a G channel value and a B channel value corresponding to each pixel point (I, J) in the face image of the current user; the total number of pixel points of the current user face image slice is M x N, wherein M represents the total number of transverse pixel points in the current user face image slice, N represents the total number of longitudinal pixel points in the current user face image slice, the value range of I is [0, M-1], and the value range of j is [0, N-1 ];
S1212、according to the R channel value R corresponding to each pixel point (I, J) in the face image of the current userIJG channel value GIJB channel value BIJAnd GrayIJ=RIJ*0.299+GIJ*0.587+BIJ0.114, correspondingly calculating and obtaining the Gray value Gray corresponding to each pixel point (I, J)IJ(ii) a Wherein, GrayIJRepresenting the gray value, R, of a pixel point (I, J)IJRepresenting R channel value and G corresponding to pixel point (I, J)IJRepresenting G channel value and B corresponding to pixel points (I, J)IJRepresenting the B channel value corresponding to the pixel point (I, J);
s1213, converting the R channel value, the G channel value and the B channel value corresponding to each pixel point (I, J) in the face image of the current user into corresponding Gray value GrayijTo obtain the corresponding gray picture.
In this embodiment, after the server obtains the current user face image, pixel matrices corresponding to the current user face image in R, G, B three channels are obtained, that is, each pixel point in the current user face image corresponds to one pixel value in R, G, B three channels. Performing graying processing on the current user face image, namely combining and processing an R channel value, a G channel value and a B channel value corresponding to each pixel point in the current user face image into a Gray value, thereby obtaining a grayed picture corresponding to the current user face image, wherein the Gray value Gray corresponding to each pixel point in the grayed picture is R0.299 + G0.587 + B0.114.
That is, the face image of the current user is read in the form of a gray scale image, and a gray scale matrix is obtained, wherein M, N is the length and width of the image. This is a lower dimension than the direct reading of RGB color images without significant loss of image information.
In one embodiment, as shown in fig. 5, step S123 includes:
s1231, comparing the gradient strength of the current pixel point in the filtered picture with the two pixel points in the positive and negative gradient directions to judge whether the gradient strength of the current pixel point is greater than the gradient strength of the two pixel points in the positive and negative gradient directions of the current pixel point; the initial value of the current pixel point (i, j) is (0,0), the total number of the pixel points in the filtered picture is m × n, wherein m represents the total number of the horizontal pixel points in the filtered picture, n represents the total number of the longitudinal pixel points in the filtered picture, the value range of i is [1, m-1], the value range of j is [1, n-1], and m and n are natural numbers larger than 1;
s1232, if the gradient strength of the current pixel point is greater than the gradient strength of two pixel points of the current pixel point along the positive and negative gradient directions, reserving the current pixel value of the current pixel point;
s1233, if the gradient strength of the current pixel point is smaller than one of the gradient strengths of the two pixel points of the current pixel point along the positive and negative gradient directions, suppressing the current pixel point to obtain a suppressed pixel point;
s1234, judging whether the current pixel point is the last pixel point in the filtered picture; if the current pixel point is the last pixel point in the filtered picture, executing the step S1235; if the current pixel point is not the last pixel point in the filtered picture, acquiring the next pixel point backward adjacent to the current pixel point to update as the current pixel point, and returning to execute the step S1231;
and S1235, outputting the current picture as the processed picture.
In this embodiment, that is, the non-maximum suppression is performed on each pixel point in the filtered picture, so as to more accurately obtain the edge point of the image. Specifically, a pixel gradient to be compared can be obtained by linear interpolation between two adjacent pixels crossing the gradient direction, that is, if the gradient strength of the current pixel point is greater than the gradient strength of two pixel points of the current pixel point along the positive and negative gradient directions, the current pixel value of the current pixel point is reserved; and if the gradient strength of the current pixel point is smaller than one of the gradient strengths of the two pixel points of the current pixel point along the positive and negative gradient directions, inhibiting the current pixel point to obtain an inhibited pixel point. By suppressing the non-maximum value, it is possible to help suppress all gradient values except for the local maximum value to 0, thereby performing edge detection more accurately.
And S130, acquiring a current distance value between the user and the screen according to the length of the head or the ratio of the width of the head to the corresponding side length of the standard camera rectangular frame and the standard distance value of the standard camera rectangular frame.
In this embodiment, because the camera of the intelligent terminal can virtualize a standard camera rectangular frame for face detection when acquiring a face image of a user, the standard camera rectangular frame is fixed and does not change in size with the change of the distance between the user and the camera, and the distance between the user and the screen can be estimated by the head length or the head width corresponding to the face image of the current user and the standard length or the standard width corresponding to the standard camera rectangular frame.
In one embodiment, step S130 includes:
acquiring a pre-stored standard camera rectangular frame and a standard length or standard width corresponding to the standard camera rectangular frame;
acquiring a current distance value between a user and a screen according to the ratio of the head length to the standard width and a standard distance value corresponding to a standard camera rectangular frame; or acquiring the current distance value between the user and the screen according to the ratio of the head width to the standard length and the standard distance value corresponding to the standard camera rectangular frame.
The distance between the user and the screen is obtained through the ratio of the head length corresponding to the current user face image to the standard width corresponding to the standard camera rectangular frame, or the distance between the user and the screen is obtained through the ratio of the head width corresponding to the current user face image to the standard length corresponding to the standard camera rectangular frame. In this way, the distance between the user and the screen can be effectively detected to estimate the visual force value.
And S140, calling a pre-stored distance value and vision mapping relation table according to the current distance value to acquire a current user vision value corresponding to the current distance value.
In this embodiment, the conversion may be performed according to a preset conversion curve of the distance value between the user and the screen and the vision value (the conversion curve may be understood as a distance value and vision mapping relationship table), that is, each distance value in the distance value and vision mapping relationship table corresponds to a vision value, and the correspondence between the distance value and the vision value in the distance value and vision mapping relationship table is valid data obtained through a plurality of tests. For example, a distance of 30cm between the user and the screen corresponds to a vision of 5.0, a distance of 32cm between the user and the screen corresponds to a vision of 5.1, etc. Through the mode, the distance value between the user and the screen can be effectively converted into the vision value, and therefore vision monitoring is carried out.
S150, correspondingly constructing a vision curve according to the current user vision value and a historical vision value set which meets preset screening conditions in the stored historical vision value set of the user; the visual curve takes a time axis as an X axis, and the visual value corresponding to each moment as a Y axis; the screening conditions comprise a screening time period and vision value values; the method is as follows.
In this embodiment, the screening condition may be based on the screening condition in the historical set of user vision values stored in the server, for example, the screening condition is a vision value with a screening time of 1 month and 1 day in 2018 to 1 month and 5 days in 2018 and not being a null value, where the vision value being the null value is an expression of the user at a time point corresponding to the vision curve when the user does not use the intelligent terminal at the current time. That is, if the vision value at a certain time is null, it is not used for drawing the vision curve graph. By drawing the vision curve, the change trend of the vision value of the user can be effectively monitored, so that whether abnormal conditions occur or not can be known, and the duration of the user using the intelligent terminal can be counted.
And S160, sending the vision curve to a user side for displaying.
In this embodiment, after the vision curve drawn according to the preset screening condition is completed in the server, the server may send the vision curve to the user side so as to perform intuitive display on the user interaction interface on the user side, thereby analyzing the vision variation trend.
In an embodiment, step S160 is followed by:
acquiring a section of the vision curve in which the change of the vision value exceeds a preset vision threshold value within unit time to form a vision value abnormal change section;
and highlighting the vision value abnormal change interval.
In this embodiment, if it is detected in the vision curve that the vision value at a certain time, the vision value at the previous time, and the vision value at the next time are all significantly changed, for example, the vision value at the current time is 4.5, the vision value at the previous time is 5.0, and the vision value at the next time is 5.0, it indicates that there may be abnormality in the vision value at the current time, and it is necessary to present a prompt to the user to pay attention to vision protection. At this time, the abnormal change interval of the vision value can be highlighted (for example, red) on the vision curve, and the visual mode can effectively prompt the client.
The method realizes the automatic periodic acquisition of the face images of the user to detect the vision of the user when the intelligent terminal with the front camera is used, and can also automatically generate a vision curve, thereby not only improving the detection efficiency, but also acquiring massive detection data for data analysis and use.
The embodiment of the invention also provides a vision detection device based on image recognition, which is used for executing any embodiment of the vision detection method based on image recognition. Specifically, referring to fig. 6, fig. 6 is a schematic block diagram of a vision detecting apparatus based on image recognition according to an embodiment of the present invention. The vision testing apparatus 100 based on image recognition may be configured in a server.
As shown in fig. 6, the vision detecting apparatus 100 based on image recognition includes a receiving unit 110, a size acquiring unit 120, a current pitch value acquiring unit 130, a current user visual force value acquiring unit 140, a visual curve constructing unit 150, and a curve transmitting unit 160.
The receiving unit 110 is configured to receive a face image of a current user uploaded by a user terminal if a difference between a current system time and a previous image acquisition time is equal to a preset image acquisition period.
In this embodiment, the user face images are periodically collected by a front-facing camera (i.e., a camera that can conveniently capture the face images of the user) disposed on a user side (the user side can also be understood as an intelligent terminal, such as a desktop computer, a tablet computer, a smart phone, etc.), and then the collected user face images are uploaded to a server by the intelligent terminal for image recognition to analyze the user vision value.
For example, the current system time is 9:00 am on 1 month and 1 month in 2018, the time interval between the current system time and 8:50 am on 1 month and 1 month in 2018 is 10 minutes, which is equal to the preset picture acquisition period of 10 minutes, and at this time, the user terminal automatically uploads the face image of the current user acquired at the current system time to the server. The server can estimate the distance between the human eyes and the screen of the acquired human face image of the user at each moment, and then converts the distance between the human eyes and the screen into the vision of the user, so that the periodical monitoring on the vision value is realized.
A size obtaining unit 120, configured to obtain a head length or a head width in the face image of the current user.
In this embodiment, in order to obtain the head length or the head width according to the face image of the current user, the head contour of the user may be obtained through edge detection to obtain the head length or the head width of the user.
In one embodiment, as shown in fig. 7, the size obtaining unit 120 includes:
the graying unit 121 is configured to gray the current user face image to obtain a grayed image;
the filtering unit 122 is configured to perform gaussian filtering on the grayed picture to obtain a filtered picture;
a non-extreme value suppression unit 123, configured to obtain a gradient value and a direction of the filtered picture, and perform non-maximum value suppression on the filtered picture to obtain a processed picture;
an edge detection unit 124, configured to perform double-threshold detection and edge connection on the processed picture to obtain a current face edge detection image corresponding to the current user face image;
a current face rectangular frame obtaining unit 125, configured to obtain a corresponding current face rectangular frame according to the current face edge detection image, so as to obtain a head length or a head width corresponding to the current user face image according to the current face rectangular frame.
In this embodiment, since the current user face image uploaded by the user side is a color image in RGB format, in order to facilitate the contour of the face part in the image, the current user face image may be grayed to obtain a grayed image.
And then, carrying out Gaussian filtering on the gray picture, wherein the realization of the Gaussian filtering of the image can be realized by using two one-dimensional Gaussian kernels to respectively carry out weighting twice, namely, carrying out one-dimensional convolution in the X direction firstly, carrying out one-dimensional convolution in the Y direction on the obtained convolution result, and finally obtaining the filtered picture. Of course, it can also be realized by one convolution directly with a two-dimensional gaussian kernel. Through Gaussian filtering, the noise reduction processing can be effectively carried out on the gray picture.
And after the Gaussian filtering of the face image of the current user is finished, non-maximum suppression processing can be performed. Non-maxima suppression is an edge thinning technique, and the effect of non-maxima suppression is "thin" edges. After gradient computation of the image, edges extracted based on gradient values alone remain blurred. While non-maxima suppression may help suppress all gradient values outside the local maxima to 0, resulting in more accurate edge detection.
And after the filtered picture is subjected to non-maximum value suppression to obtain a processed picture, carrying out double-threshold detection and edge connection at the moment, and obtaining a current face edge detection image corresponding to the current user face image. The processed picture is detected by using a double-threshold algorithm, namely, an accumulative histogram is used for calculating two thresholds, and edges are determined when the two thresholds are greater than a high threshold; whatever is less than the low threshold is not necessarily an edge. If the detection result is larger than the low threshold value but smaller than the high threshold value, it is determined whether there is an edge pixel exceeding the high threshold value in the adjacent pixels of the pixel, if so, the pixel is an edge, otherwise, the pixel is not an edge. The above-mentioned dual-threshold algorithm detects and obtains the pixel point located on the edge in the picture after processing only. Due to the influence of noise and edge discontinuity caused by uneven illumination, an edge pixel point obtained after edge detection can rarely and completely depict an actual edge. The edge detection algorithm may be followed by a connecting method to combine edge pixels into meaningful edges, thereby obtaining a current face edge detection image corresponding to the current user face image.
And finally, when a corresponding current face rectangular frame is obtained according to the current face edge detection image, the current face rectangular frame is a rectangular frame which can just surround the current face edge detection image and has four sides externally tangent to the current face edge detection image. The length of the circumscribed rectangle frame corresponds to the head width, and the length of the circumscribed rectangle frame corresponds to the head length.
In one embodiment, as shown in fig. 8, the graying unit 121 includes:
an RGB channel value obtaining unit 1211, configured to obtain an R channel value, a G channel value, and a B channel value corresponding to each pixel point (I, J) in the current user face image; the total number of pixel points of the current user face image slice is M x N, wherein M represents the total number of transverse pixel points in the current user face image slice, N represents the total number of longitudinal pixel points in the current user face image slice, the value range of I is [0, M-1], and the value range of j is [0, N-1 ];
a gray value calculating unit 1212, configured to calculate an R channel value R corresponding to each pixel point (I, J) in the current user face imageIJG channel value GIJB channel value BIJAnd GrayIJ=RIJ*0.299+GIJ*0.587+BIJ0.114, correspondingly calculating and obtaining the Gray value Gray corresponding to each pixel point (I, J)IJ(ii) a Wherein, GrayIJRepresenting the gray value, R, of a pixel point (I, J)IJRepresenting R channel value and G corresponding to pixel point (I, J)IJRepresenting pairs of pixel points (I, J)Corresponding G channel value, BIJRepresenting the B channel value corresponding to the pixel point (I, J);
a Gray level conversion unit 1213, configured to convert the R channel value, the G channel value, and the B channel value corresponding to each pixel point (I, J) in the current user face image into corresponding Gray level GrayijTo obtain the corresponding gray picture.
In this embodiment, after the server obtains the current user face image, pixel matrices corresponding to the current user face image in R, G, B three channels are obtained, that is, each pixel point in the current user face image corresponds to one pixel value in R, G, B three channels. Performing graying processing on the current user face image, namely combining and processing an R channel value, a G channel value and a B channel value corresponding to each pixel point in the current user face image into a Gray value, thereby obtaining a grayed picture corresponding to the current user face image, wherein the Gray value Gray corresponding to each pixel point in the grayed picture is R0.299 + G0.587 + B0.114.
That is, the face image of the current user is read in the form of a gray scale image, and a gray scale matrix is obtained, wherein M, N is the length and width of the image. This is a lower dimension than the direct reading of RGB color images without significant loss of image information.
In one embodiment, as shown in fig. 9, the non-extremum suppressing unit 123 includes:
a gradient strength comparing unit 1231, configured to compare the gradient strength of the current pixel point in the filtered picture with two pixel points in the positive and negative gradient directions, so as to determine whether the gradient strength of the current pixel point is greater than the gradient strength of the current pixel point in the positive and negative gradient directions; the initial value of the current pixel point (i, j) is (0,0), the total number of the pixel points in the filtered picture is m × n, wherein m represents the total number of the horizontal pixel points in the filtered picture, n represents the total number of the longitudinal pixel points in the filtered picture, the value range of i is [1, m-1], the value range of j is [1, n-1], and m and n are natural numbers larger than 1;
the pixel retaining unit 1232 is configured to retain a current pixel value of the current pixel point if the gradient strength of the current pixel point is greater than the gradient strength of two pixel points of the current pixel point in the positive and negative gradient directions;
the pixel suppression unit 1233 is configured to suppress the current pixel if the gradient strength of the current pixel is less than one of the gradient strengths of the two pixels of the current pixel in the positive and negative gradient directions, so as to obtain a suppressed pixel;
a pixel end judgment unit 1234, configured to judge whether the current pixel is the last pixel in the filtered picture; if the current pixel point is the last pixel point in the filtered picture, executing the step of outputting the current picture as a processed picture; if the current pixel point is not the last pixel point in the filtered picture, acquiring the next pixel point backward adjacent to the current pixel point to be updated as the current pixel point, and returning to execute the step of comparing the gradient strength of the current pixel point in the filtered picture with the two pixel points along the positive and negative gradient directions so as to judge whether the gradient strength of the current pixel point is greater than the gradient strength of the current pixel point along the positive and negative gradient directions;
a current picture obtaining unit 1235, configured to output the current picture as a processed picture.
In this embodiment, that is, the non-maximum suppression is performed on each pixel point in the filtered picture, so as to more accurately obtain the edge point of the image. Specifically, a pixel gradient to be compared can be obtained by linear interpolation between two adjacent pixels crossing the gradient direction, that is, if the gradient strength of the current pixel point is greater than the gradient strength of two pixel points of the current pixel point along the positive and negative gradient directions, the current pixel value of the current pixel point is reserved; and if the gradient strength of the current pixel point is smaller than one of the gradient strengths of the two pixel points of the current pixel point along the positive and negative gradient directions, inhibiting the current pixel point to obtain an inhibited pixel point. By suppressing the non-maximum value, it is possible to help suppress all gradient values except for the local maximum value to 0, thereby performing edge detection more accurately.
A current distance value obtaining unit 130, configured to obtain a current distance value between the user and the screen according to the head length or the ratio of the head width to the corresponding side length of the standard camera rectangular frame, and the standard distance value of the standard camera rectangular frame.
In this embodiment, because the camera of the intelligent terminal can virtualize a standard camera rectangular frame for face detection when acquiring a face image of a user, the standard camera rectangular frame is fixed and does not change in size with the change of the distance between the user and the camera, and the distance between the user and the screen can be estimated by the head length or the head width corresponding to the face image of the current user and the standard length or the standard width corresponding to the standard camera rectangular frame.
In one embodiment, the current pitch value obtaining unit 130 includes:
the standard camera rectangular frame acquisition unit is used for acquiring a pre-stored standard camera rectangular frame and a standard length or standard width corresponding to the standard camera rectangular frame;
the distance conversion unit is used for acquiring a current distance value between a user and a screen according to the ratio of the head length to the standard width and a standard distance value corresponding to a standard camera rectangular frame; or acquiring the current distance value between the user and the screen according to the ratio of the head width to the standard length and the standard distance value corresponding to the standard camera rectangular frame.
The distance between the user and the screen is obtained through the ratio of the head length corresponding to the current user face image to the standard width corresponding to the standard camera rectangular frame, or the distance between the user and the screen is obtained through the ratio of the head width corresponding to the current user face image to the standard length corresponding to the standard camera rectangular frame. In this way, the distance between the user and the screen can be effectively detected to estimate the visual force value.
The current user visual force value obtaining unit 140 is configured to call a pre-stored distance value and visual mapping relationship table according to the current distance value, so as to obtain a current user visual force value corresponding to the current distance value.
In this embodiment, the conversion may be performed according to a preset conversion curve of the distance value between the user and the screen and the vision value (the conversion curve may be understood as a distance value and vision mapping relationship table), that is, each distance value in the distance value and vision mapping relationship table corresponds to a vision value, and the correspondence between the distance value and the vision value in the distance value and vision mapping relationship table is valid data obtained through a plurality of tests. For example, a distance of 30cm between the user and the screen corresponds to a vision of 5.0, a distance of 32cm between the user and the screen corresponds to a vision of 5.1, etc. Through the mode, the distance value between the user and the screen can be effectively converted into the vision value, and therefore vision monitoring is carried out.
The vision curve constructing unit 150 is used for correspondingly constructing a vision curve according to the current user vision value and a historical vision value set which meets preset screening conditions in the stored historical vision value set of the user; the visual curve takes a time axis as an X axis, and the visual value corresponding to each moment as a Y axis; the screening conditions comprise a screening time period and a vision value.
In this embodiment, the screening condition may be based on the screening condition in the historical set of user vision values stored in the server, for example, the screening condition is a vision value with a screening time of 1 month and 1 day in 2018 to 1 month and 5 days in 2018 and not being a null value, where the vision value being the null value is an expression of the user at a time point corresponding to the vision curve when the user does not use the intelligent terminal at the current time. That is, if the vision value at a certain time is null, it is not used for drawing the vision curve graph. By drawing the vision curve, the change trend of the vision value of the user can be effectively monitored, so that whether abnormal conditions occur or not can be known, and the duration of the user using the intelligent terminal can be counted.
And a curve sending unit 160, configured to send the vision curve to the user end for display.
In this embodiment, after the vision curve drawn according to the preset screening condition is completed in the server, the server may send the vision curve to the user side so as to perform intuitive display on the user interaction interface on the user side, thereby analyzing the vision variation trend.
In one embodiment, the vision testing apparatus 100 based on image recognition further comprises:
the abnormal interval acquiring unit is used for acquiring an interval, within the vision curve, of which the change of the vision value exceeds a preset vision threshold value in unit time so as to form an abnormal change interval of the vision value;
and the highlight prompting unit is used for highlighting the vision value abnormal change interval.
In this embodiment, if it is detected in the vision curve that the vision value at a certain time, the vision value at the previous time, and the vision value at the next time are all significantly changed, for example, the vision value at the current time is 4.5, the vision value at the previous time is 5.0, and the vision value at the next time is 5.0, it indicates that there may be abnormality in the vision value at the current time, and it is necessary to present a prompt to the user to pay attention to vision protection. At this time, the abnormal change interval of the vision value can be highlighted (for example, red) on the vision curve, and the visual mode can effectively prompt the client.
The device has realized automatic periodic acquisition user's face image when using the intelligent terminal who has leading camera in order to detect user's eyesight, still can the automatic generation eyesight curve, has not only improved detection efficiency, has obtained massive detection data moreover and has used for data analysis.
The vision detection apparatus based on image recognition described above may be implemented in the form of a computer program that can be run on a computer device as shown in fig. 10.
Referring to fig. 10, fig. 10 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer device 500 is a server, and the server may be an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 10, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform a vision detection method based on image recognition.
The processor 502 is used to provide computing and control capabilities that support the operation of the overall computer device 500.
The internal memory 504 provides an environment for running the computer program 5032 in the non-volatile storage medium 503, and when the computer program 5032 is executed by the processor 502, the processor 502 can be caused to execute a vision detection method based on image recognition.
The network interface 505 is used for network communication, such as providing transmission of data information. Those skilled in the art will appreciate that the configuration shown in fig. 10 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing device 500 to which aspects of the present invention may be applied, and that a particular computing device 500 may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The processor 502 is configured to run the computer program 5032 stored in the memory to implement the vision detection method based on image recognition disclosed in the embodiment of the present invention.
Those skilled in the art will appreciate that the embodiment of a computer device illustrated in fig. 10 does not constitute a limitation on the specific construction of the computer device, and that in other embodiments a computer device may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 10, and are not described herein again.
It should be understood that, in the embodiment of the present invention, the Processor 502 may be a Central Processing Unit (CPU), and the Processor 502 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the invention, a computer-readable storage medium is provided. The computer readable storage medium may be a non-volatile computer readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the vision testing method based on image recognition disclosed in the embodiments of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided by the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only a logical division, and there may be other divisions when the actual implementation is performed, or units having the same function may be grouped into one unit, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a 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 stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present invention essentially or partially contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A vision testing method based on image recognition is characterized by comprising the following steps:
if the difference between the current system time and the last picture acquisition time is equal to the preset picture acquisition period, receiving a face image of the current user uploaded by a user side;
acquiring the head length or the head width in the face image of the current user;
acquiring a current distance value between a user and a screen according to the length of the head or the ratio of the width of the head to the corresponding side length of the standard camera rectangular frame and the standard distance value of the standard camera rectangular frame;
according to the current distance value, calling a pre-stored distance value and vision mapping relation table to obtain a current user vision value corresponding to the current distance value;
correspondingly constructing a vision curve according to the current user vision value and the stored historical vision value set which meets the preset screening condition in the user historical vision value set; the visual curve takes a time axis as an X axis, and the visual value corresponding to each moment as a Y axis; the screening conditions comprise a screening time period and vision value values; and
and sending the vision curve to a user terminal for displaying.
2. The vision detection method based on image recognition of claim 1, wherein the obtaining of the head length or the head width in the face image of the current user comprises:
graying the face image of the current user to obtain a grayed image;
performing Gaussian filtering on the grayed picture to obtain a filtered picture;
acquiring the gradient value and the direction of the filtered picture, and performing non-maximum suppression on the filtered picture to obtain a processed picture;
carrying out double-threshold detection and edge connection on the processed picture to obtain a current face edge detection image corresponding to the current user face image;
and acquiring a corresponding current face rectangular frame according to the current face edge detection image, and acquiring the head length or the head width corresponding to the current user face image according to the current face rectangular frame.
3. The method for vision detection based on image recognition of claim 2, wherein the non-maxima suppression of the filtered picture to obtain a processed picture comprises:
comparing the gradient strength of the current pixel point in the filtered picture with the two pixel points along the positive and negative gradient directions to judge whether the gradient strength of the current pixel point is greater than the gradient strength of the two pixel points along the positive and negative gradient directions of the current pixel point; the initial value of the current pixel point (i, j) is (0,0), the total number of the pixel points in the filtered picture is m × n, wherein m represents the total number of the horizontal pixel points in the filtered picture, n represents the total number of the longitudinal pixel points in the filtered picture, the value range of i is [1, m-1], the value range of j is [1, n-1], and m and n are natural numbers larger than 1;
if the gradient strength of the current pixel point is greater than the gradient strength of two pixel points of the current pixel point along the positive and negative gradient directions, the current pixel value of the current pixel point is reserved;
if the gradient strength of the current pixel point is smaller than one of the gradient strengths of the two pixel points of the current pixel point along the positive and negative gradient directions, inhibiting the current pixel point to obtain an inhibited pixel point;
judging whether the current pixel point is the last pixel point in the filtered picture; if the current pixel point is the last pixel point in the filtered picture, executing the step of outputting the current picture as a processed picture; if the current pixel point is not the last pixel point in the filtered picture, acquiring the next pixel point backward adjacent to the current pixel point to be updated as the current pixel point, and returning to execute the step of comparing the gradient strength of the current pixel point in the filtered picture with the two pixel points along the positive and negative gradient directions so as to judge whether the gradient strength of the current pixel point is greater than the gradient strength of the current pixel point along the positive and negative gradient directions;
and outputting the current picture as a processed picture.
4. The vision detection method based on image recognition of claim 1, wherein the graying the face image of the current user to obtain a grayed picture comprises:
acquiring an R channel value, a G channel value and a B channel value corresponding to each pixel point (I, J) in the face image of the current user; the total number of pixel points of the current user face image slice is M x N, wherein M represents the total number of transverse pixel points in the current user face image slice, N represents the total number of longitudinal pixel points in the current user face image slice, the value range of I is [0, M-1], and the value range of j is [0, N-1 ];
according to the R channel value R corresponding to each pixel point (I, J) in the face image of the current userIJG channel value GIJB channel value BIJAnd GrayIJ=RIJ*0.299+GIJ*0.587+BIJ0.114, correspondingly calculating and obtaining the Gray value Gray corresponding to each pixel point (I, J)IJ(ii) a Wherein, GrayIJRepresenting the gray value, R, of a pixel point (I, J)IJRepresenting R channel value and G corresponding to pixel point (I, J)IJRepresenting G channel value and B corresponding to pixel points (I, J)IJRepresenting the B channel value corresponding to the pixel point (I, J);
converting the R channel value, the G channel value and the B channel value corresponding to each pixel point (I, J) in the face image of the current user into corresponding Gray value GrayijTo obtain the corresponding gray picture.
5. The vision testing method based on image recognition of claim 1, wherein the obtaining of the current distance value between the user and the screen according to the head length or the ratio of the head width to the corresponding side length of the standard camera rectangular frame and the standard distance value of the standard camera rectangular frame comprises:
acquiring a pre-stored standard camera rectangular frame and a standard length or standard width corresponding to the standard camera rectangular frame;
acquiring a current distance value between a user and a screen according to the ratio of the head length to the standard width and a standard distance value corresponding to a standard camera rectangular frame; or acquiring the current distance value between the user and the screen according to the ratio of the head width to the standard length and the standard distance value corresponding to the standard camera rectangular frame.
6. The vision testing method based on image recognition of claim 1, wherein after sending the vision curve to a user terminal for display, the method further comprises:
acquiring a section of the vision curve in which the change of the vision value exceeds a preset vision threshold value within unit time to form a vision value abnormal change section;
and highlighting the vision value abnormal change interval.
7. A vision testing device based on image recognition, comprising:
the receiving unit is used for receiving the face image of the current user uploaded by the user side if the difference between the current system time and the previous image acquisition time is equal to the preset image acquisition period;
the size acquisition unit is used for acquiring the head length or the head width in the face image of the current user;
the current distance value acquisition unit is used for acquiring a current distance value between a user and a screen according to the head length or the ratio of the head width to the corresponding side length of the standard camera rectangular frame and the standard distance value of the standard camera rectangular frame;
the current user visual force value acquisition unit is used for calling a pre-stored distance value and visual mapping relation table according to the current distance value so as to acquire a current user visual force value corresponding to the current distance value;
the vision curve building unit is used for correspondingly building a vision curve according to the current user vision value and a historical vision value set which meets preset screening conditions in the stored historical vision value set of the user; the visual curve takes a time axis as an X axis, and the visual value corresponding to each moment as a Y axis; the screening conditions comprise a screening time period and vision value values; and
and the curve sending unit is used for sending the vision curve to the user side for displaying.
8. The vision inspection device based on image recognition of claim 7, wherein the size acquisition unit includes:
the graying unit is used for graying the face image of the current user to obtain a grayed image;
the filtering unit is used for carrying out Gaussian filtering on the grayed picture to obtain a filtered picture;
the non-extreme value suppression unit is used for acquiring the gradient value and the direction of the filtered picture and performing non-maximum value suppression on the filtered picture to obtain a processed picture;
the edge detection unit is used for carrying out double-threshold detection and edge connection on the processed picture to obtain a current face edge detection image corresponding to the current user face image;
and the current face rectangular frame acquiring unit is used for acquiring a corresponding current face rectangular frame according to the current face edge detection image so as to acquire the head length or the head width corresponding to the current user face image according to the current face rectangular frame.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the image recognition based vision detection method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to execute the image recognition-based vision detection method according to any one of claims 1 to 6.
CN201910969805.XA 2019-10-12 2019-10-12 Vision detection method and device based on image recognition and computer equipment Pending CN111084606A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910969805.XA CN111084606A (en) 2019-10-12 2019-10-12 Vision detection method and device based on image recognition and computer equipment
PCT/CN2020/087032 WO2021068486A1 (en) 2019-10-12 2020-04-26 Image recognition-based vision detection method and apparatus, and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910969805.XA CN111084606A (en) 2019-10-12 2019-10-12 Vision detection method and device based on image recognition and computer equipment

Publications (1)

Publication Number Publication Date
CN111084606A true CN111084606A (en) 2020-05-01

Family

ID=70392968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910969805.XA Pending CN111084606A (en) 2019-10-12 2019-10-12 Vision detection method and device based on image recognition and computer equipment

Country Status (2)

Country Link
CN (1) CN111084606A (en)
WO (1) WO2021068486A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113344999A (en) * 2021-06-28 2021-09-03 北京市商汤科技开发有限公司 Depth detection method and device, electronic equipment and storage medium
CN113674272A (en) * 2021-09-06 2021-11-19 上海集成电路装备材料产业创新中心有限公司 Image detection method and device
WO2021248671A1 (en) * 2020-06-12 2021-12-16 海信视像科技股份有限公司 Display device
CN114840086A (en) * 2022-05-10 2022-08-02 Oppo广东移动通信有限公司 Control method, electronic device and computer storage medium
CN114863503A (en) * 2022-01-26 2022-08-05 平安国际智慧城市科技股份有限公司 In-vehicle retention alarm method and device based on image acquisition
CN115732091A (en) * 2022-11-24 2023-03-03 深圳安视信息技术有限公司 Self-service vision screening system
CN118629080A (en) * 2024-08-12 2024-09-10 江苏振通门业有限公司 Face image optimization recognition method for intelligent door lock

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114190880A (en) * 2021-12-09 2022-03-18 深圳创维-Rgb电子有限公司 Vision detection method and device, electronic equipment and storage medium
CN114331991B (en) * 2021-12-21 2024-03-15 国能朔黄铁路发展有限责任公司 Method, system, device and computer equipment for monitoring small-radius curve seamless line
CN114463326B (en) * 2022-03-14 2022-06-21 深圳灿维科技有限公司 Mobile phone middle frame visual detection algorithm, device, equipment and storage medium
CN115187552B (en) * 2022-07-14 2023-04-25 南京思飞捷软件科技有限公司 Vehicle body door seam detection method based on edge detection
CN115029704B (en) * 2022-08-09 2022-12-09 江苏贯森新材料科技有限公司 Intelligent control method and device for stainless steel pickling process
CN116385706B (en) * 2023-06-06 2023-08-25 山东外事职业大学 Signal detection method and system based on image recognition technology
CN116485884B (en) * 2023-06-28 2023-09-12 四川君安天源精酿啤酒有限公司 Real-time positioning method and system for finish brewing beer bottle mouth based on computer vision
CN116630321B (en) * 2023-07-24 2023-10-03 铁正检测科技有限公司 Intelligent bridge health monitoring system based on artificial intelligence
CN117455908B (en) * 2023-12-22 2024-04-09 山东济矿鲁能煤电股份有限公司阳城煤矿 Visual detection method and system for belt conveyor deviation
CN118071739B (en) * 2024-04-18 2024-06-28 山东北宏新材料科技有限公司 Masterbatch coloring visual detection method based on image enhancement

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533327A (en) * 2008-03-13 2009-09-16 英业达股份有限公司 Window adjusting interface and adjusting method thereof
CN106022209A (en) * 2016-04-29 2016-10-12 杭州华橙网络科技有限公司 Distance estimation and processing method based on face detection and device based on face detection
CN106548135A (en) * 2016-10-17 2017-03-29 北海益生源农贸有限责任公司 A kind of road barrier detection method
CN109326339A (en) * 2018-12-07 2019-02-12 北京大学第三医院 A kind of visual function evaluation suggestion determines method, apparatus, equipment and medium
CN109464118A (en) * 2018-12-10 2019-03-15 刘珉恺 One kind is based on the detection of mobile phone eyesight and glasses preparation method
US20190246896A1 (en) * 2016-09-15 2019-08-15 Essilor International Measurement method for the determination of a value of a visual correction need for near vision of an individual
CN110251066A (en) * 2013-06-06 2019-09-20 6超越6视觉有限公司 Based on the not positive system and method for subjective distance measuring measurement ophthalmic refractive

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8757805B2 (en) * 2009-08-17 2014-06-24 Allan N. Hytowitz Animated image vision test
CN106491075B (en) * 2016-11-29 2017-12-08 珠海格力电器股份有限公司 Vision detection device and vision detector
CN106725288A (en) * 2016-11-29 2017-05-31 珠海格力电器股份有限公司 Vision detection method and device and mobile terminal
CN107198505A (en) * 2017-04-07 2017-09-26 天津市天中依脉科技开发有限公司 Visual function detecting system and method based on smart mobile phone
JP7063045B2 (en) * 2018-03-26 2022-05-09 株式会社Jvcケンウッド Line-of-sight detection device, line-of-sight detection method and line-of-sight detection program
CN108652579A (en) * 2018-04-25 2018-10-16 珠海格力电器股份有限公司 Method and terminal for detecting eyesight
CN109330556A (en) * 2018-09-29 2019-02-15 杭州艾斯凯尔科技有限公司 Utilize the vision testing method and system of image technique and cloud control technology
CN110123257A (en) * 2019-03-29 2019-08-16 深圳和而泰家居在线网络科技有限公司 A kind of vision testing method, device, sight tester and computer storage medium
CN110279391B (en) * 2019-05-30 2021-11-30 汕头市荣亮科技有限公司 Eyesight detection algorithm for portable infrared camera

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533327A (en) * 2008-03-13 2009-09-16 英业达股份有限公司 Window adjusting interface and adjusting method thereof
CN110251066A (en) * 2013-06-06 2019-09-20 6超越6视觉有限公司 Based on the not positive system and method for subjective distance measuring measurement ophthalmic refractive
CN106022209A (en) * 2016-04-29 2016-10-12 杭州华橙网络科技有限公司 Distance estimation and processing method based on face detection and device based on face detection
US20190246896A1 (en) * 2016-09-15 2019-08-15 Essilor International Measurement method for the determination of a value of a visual correction need for near vision of an individual
CN106548135A (en) * 2016-10-17 2017-03-29 北海益生源农贸有限责任公司 A kind of road barrier detection method
CN109326339A (en) * 2018-12-07 2019-02-12 北京大学第三医院 A kind of visual function evaluation suggestion determines method, apparatus, equipment and medium
CN109464118A (en) * 2018-12-10 2019-03-15 刘珉恺 One kind is based on the detection of mobile phone eyesight and glasses preparation method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021248671A1 (en) * 2020-06-12 2021-12-16 海信视像科技股份有限公司 Display device
CN113344999A (en) * 2021-06-28 2021-09-03 北京市商汤科技开发有限公司 Depth detection method and device, electronic equipment and storage medium
WO2023273498A1 (en) * 2021-06-28 2023-01-05 上海商汤智能科技有限公司 Depth detection method and apparatus, electronic device, and storage medium
CN113674272A (en) * 2021-09-06 2021-11-19 上海集成电路装备材料产业创新中心有限公司 Image detection method and device
CN113674272B (en) * 2021-09-06 2024-03-15 上海集成电路装备材料产业创新中心有限公司 Image detection method and device
CN114863503A (en) * 2022-01-26 2022-08-05 平安国际智慧城市科技股份有限公司 In-vehicle retention alarm method and device based on image acquisition
CN114840086A (en) * 2022-05-10 2022-08-02 Oppo广东移动通信有限公司 Control method, electronic device and computer storage medium
CN114840086B (en) * 2022-05-10 2024-07-30 Oppo广东移动通信有限公司 Control method, electronic equipment and computer storage medium
CN115732091A (en) * 2022-11-24 2023-03-03 深圳安视信息技术有限公司 Self-service vision screening system
CN118629080A (en) * 2024-08-12 2024-09-10 江苏振通门业有限公司 Face image optimization recognition method for intelligent door lock

Also Published As

Publication number Publication date
WO2021068486A1 (en) 2021-04-15

Similar Documents

Publication Publication Date Title
CN111084606A (en) Vision detection method and device based on image recognition and computer equipment
US9888186B2 (en) Image acquisition method and image acquisition apparatus
US10321072B2 (en) Image obtaining apparatus and method for obtaining an image based on pixel binning
EP3046072B1 (en) Temporal noise reduction method of noise image, and related device
US9445022B2 (en) Image processing apparatus and image processing method, and program
EP2544452A2 (en) Image processing device, image processing method, and program
US20150324961A1 (en) Method and apparatus for adjusting image brightness
CN111444555B (en) Temperature measurement information display method and device and terminal equipment
JP2015019958A5 (en) Magnetic resonance imaging apparatus, image processing apparatus, image processing method, and image processing program
CN111368717A (en) Sight line determining method and device, electronic equipment and computer readable storage medium
JP6115263B2 (en) Pulse wave detection device, pulse wave detection method, and pulse wave detection program
CN110059666A (en) A kind of attention detection method and device
CN104867127A (en) Image Processing Device, Image Processing Method, And Program
WO2018090450A1 (en) Uniformity measurement method and system for display screen
JP7076168B1 (en) How to enhance the object contour of an image in real-time video
US9147115B2 (en) Method and device for detecting an object in an image
CN116167932A (en) Image quality optimization method, device, equipment and storage medium
CN103313068A (en) White balance corrected image processing method and device based on gray edge constraint gray world
CN114140481A (en) Edge detection method and device based on infrared image
RU2715548C2 (en) Device, method and system for graphical representation of signals depending on resolution
CN104010134A (en) System and method for creating an image with a wide dynamic range
US10728476B2 (en) Image processing device, image processing method, and image processing program for determining a defective pixel
CN108805883B (en) Image segmentation method, image segmentation device and electronic equipment
JP2021023490A (en) Biological information detection device
CN114720812A (en) Method and system for processing and positioning faults of power distribution network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200501