Retinal stimulator with grating vision test
By performing grayscale and binarization processing on the initial image of the retinal stimulator, combined with histogram analysis and projection analysis, the problem of difficulty in identifying high-vision-requiring raster vision images in the existing technology is solved, and the raster vision is achieved. effective identification and efficient detection.
Patent Information
- Application Number
- CN202110944423.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-01
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-04-01
AI Technical Summary
It is difficult for existing retinal stimulators to recognize raster vision images that require high visual acuity, especially images with a logarithm of 2.3 smaller than the minimum resolution viewing angle, because the image processing device usually processes the image signal through a compression method, resulting in difficulty in recognition.
Obtain the initial image through the camera device, perform grayscale processing and histogram analysis, obtain the characteristic information of the grayscale image, determine whether it is a raster vision image, and perform binarization processing and projection analysis to determine the direction of the raster on the image. , to achieve effective recognition of bar vision.
It can effectively identify raster visual acuity images with a small amount of calculation, and can identify images with high visual acuity requirements that are difficult to identify, thereby improving the detection capability of the retinal stimulator.
Smart Images

Figure CN113643373B_ABST
Abstract
Description
[0001] This application is filed on April 01, 2020 、Application No. 2020102514518 、The name of the invention is Retina Method for testing grating vision of stimulator A divisional application for a patent application. Technical Field
[0002] The present disclosure particularly relates to a retinal stimulator with grating vision detection. Background Art
[0003] Retinal diseases such as RP (retinitis pigmentosa) and AMD (age-related macular degeneration) are important blinding diseases. Patients suffer from decreased vision or blindness due to obstruction of the photosensitive pathway. With the research and development of technology, technical means such as the use of retinal stimulators to repair the above-mentioned retinal diseases have emerged. Existing retinal stimulators generally include a camera device arranged outside the patient's body, an image processing device, and an implant placed in the patient's eyeball (also referred to as an "implant device"). Among them, the external camera device captures images of the outside world to obtain image signals, and the image processing device processes the image signals and sends the processed image signals (also referred to as "visual signals") to the implant. The implant further converts these image signals into electrical stimulation signals to stimulate the ganglion cells or bipolar cells on the retina, thereby giving the patient a sense of light.
[0004] In the prior art, grating vision is usually used as the main evaluation index of retinal stimulators. However, since image processing devices usually process image signals directly by compression, it is difficult for retinal stimulators to identify grating vision images that require higher vision requirements, such as 2.3 logarithms less than the minimum resolution angle of view. Existing image processing devices compress image signals. Summary of the invention
[0005] The present disclosure is proposed in view of the above-mentioned situation, and its purpose is to provide a method for detecting the stripe vision of a retinal stimulator that can effectively identify the stripe vision image and has a small amount of calculation.
[0006] To this end, the present disclosure provides a method for detecting the stripe vision of a retinal stimulator, wherein the retinal stimulator includes a camera device located outside the body, and is characterized in that it includes the following steps: (a) using the camera device to obtain an initial image; (b) graying the initial image to obtain a grayscale image, obtaining a histogram of pixel distribution of the grayscale image based on the grayscale image, and obtaining feature information of the grayscale image based on the grayscale image and the histogram; (c) judging whether the grayscale image is a stripe vision image based on the feature information and a first type predetermined threshold; (d) if the grayscale image is the stripe vision image, then The grayscale image is binarized to obtain a binary image; (e) a target pixel value is selected from the binary image, and the number of corresponding pixel points having the target pixel value projection on each predetermined mapping line is obtained according to whether the target pixel value for projection exists in the vertical direction of multiple predetermined mapping lines set in the binary image; and (f) a target predetermined mapping line is determined according to the number of corresponding pixel points of the target pixel value projection on each predetermined mapping line and a second type of predetermined threshold value, thereby determining the stripe direction on the binary image, wherein the stripe direction on the binary image is perpendicular to the direction of the target predetermined mapping line.
[0007] In the present disclosure, a retinal stimulator uses a camera device to obtain an initial image, grayscales the initial image to obtain a grayscale image, obtains a histogram of the grayscale image based on the grayscale image, obtains feature information of the grayscale image based on the grayscale image and the histogram, and then determines whether the grayscale image is a stripe vision image based on a first type of predetermined threshold. If the grayscale image is a stripe vision image, the grayscale image is binarized to obtain a binary image, and the number of corresponding pixel points with target pixel value projections on each predetermined mapping line is obtained based on the binary image and a plurality of predetermined mapping lines, and the target predetermined mapping line is determined based on the number of corresponding pixel points with target pixel value projections on each predetermined mapping line and the second type of predetermined threshold, thereby determining the stripe direction on the binary image. In this way, the stripe vision image can be effectively identified with a small amount of computation.
[0008] In the detection method involved in the present disclosure, optionally, the feature information includes a first pixel number, a grayscale mean, and a region centroid coordinate obtained from the grayscale image, wherein the first pixel number is the number of pixels with grayscale values in each pixel interval in the grayscale image obtained based on the histogram, and the grayscale mean is the average value of the grayscale values of all pixels in the grayscale image. In this way, the feature information of the grayscale image can be obtained.
[0009] In the detection method involved in the present disclosure, optionally, the feature information further includes a second number of pixels, wherein the second number of pixels is the number of pixels in the grayscale image whose grayscale value is less than the grayscale mean and / or the number of pixels whose grayscale value is greater than the grayscale mean. Thus, the second number of pixels can be obtained.
[0010] In the detection method involved in the present disclosure, optionally, the pixel interval includes a black pixel interval, a white pixel interval and a plurality of other pixel intervals, and the feature information includes the difference and sum of the number of pixels in the black pixel interval and the number of pixels in the white pixel interval, and the sum of the number of pixels in the plurality of other pixel intervals, wherein the black pixel interval includes pixels with grayscale values of 0 to 50, and the white pixel interval includes pixels with grayscale values of 201 to 255. In this way, the feature information of the grayscale image can be obtained.
[0011] In the detection method involved in the present disclosure, optionally, the feature information includes the first number of pixels, the grayscale mean, the coordinates of the region centroid, and the second number of pixels, and the first type of predetermined threshold has a threshold range corresponding to each type of feature information. Thus, the first type of predetermined threshold and the feature information can be compared accordingly.
[0012] In the detection method involved in the present disclosure, optionally, the stripe direction of the stripe vision image is selected from one of a horizontal direction, a vertical direction, a first direction having an angle of 45° with the horizontal direction, and a second direction having an angle of 135° with the horizontal direction. This facilitates the subsequent determination of the stripe direction of the stripe vision image.
[0013] In the detection method involved in the present disclosure, optionally, each predetermined mapping line is from one side of the binary image to the other side of the binary image, and the directions of each predetermined mapping line are respectively a horizontal direction, a vertical direction, a first direction having an angle of 45° with the horizontal direction, and a second direction having an angle of 135° with the horizontal direction. This makes it easy to determine the predetermined mapping lines.
[0014] In the detection method involved in the present disclosure, optionally, the target pixel value is the minimum grayscale value in the binary image, thereby being able to select the target pixel value from the binary image.
[0015] In the detection method involved in the present disclosure, optionally, in step (f), the number of corresponding pixel points of the target pixel value projection on each predetermined mapping line is compared with the second type of predetermined threshold value to determine whether the corresponding pixel points on each predetermined mapping line are continuous, thereby determining the target predetermined mapping line. In this way, the target predetermined mapping line can be determined.
[0016] In the detection method disclosed herein, optionally, before step (e), the binary image is further subjected to dilation and erosion processing, thereby facilitating the subsequent identification of the direction of the stripes in the stripe vision image.
[0017] According to the detection method involved in the present disclosure, the stripe vision image can be effectively identified with a small amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a schematic diagram showing the structure of a retinal stimulator involved in an example of the present disclosure.
[0019] Figure 2 1 is a flow chart showing a method for detecting the grating vision of a retinal stimulator involved in an example of the present disclosure.
[0020] Figure 3 Schematic diagram of a grayscale image and a histogram showing a method for detecting the stripe vision of a retinal stimulator involved in an example of the present disclosure.
[0021] Figure 4 is a schematic diagram showing the application of a method for detecting the stripe vision of a retinal stimulator involved in an example of the present disclosure.
[0022] Figure 5 is a schematic diagram showing a direction template involved in an example of the present disclosure.
[0023] Figure 6 Schematic diagram showing the configuration position of the stimulation electrode array involved in the example of the present disclosure. DETAILED DESCRIPTION
[0024] Hereinafter, the preferred embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In the following description, the same symbols are assigned to the same components, and repeated descriptions are omitted. In addition, the accompanying drawings are only schematic diagrams, and the ratio of the dimensions of the components or the shapes of the components may be different from the actual ones.
[0025] The present disclosure provides a method for detecting stripe vision. In the present disclosure, the stripe vision image can be effectively identified with a small amount of calculation. The present disclosure is described in detail below in conjunction with the accompanying drawings.
[0026] Figure 1 is a schematic diagram showing the structure of a retinal stimulator 1 involved in an example of the present disclosure. The retinal stimulator 1 involved in the present disclosure can be particularly suitable for patients who are blind due to retinal lesions but whose visual pathways such as bipolar cells and ganglion cells are intact. In the present disclosure, the retinal stimulator 1 is sometimes also referred to as an "artificial retina", "artificial retina", "artificial retina system", "artificial retina system", etc.
[0027] In some examples, such as Figure 1 As shown, the retinal stimulator 1 may include an implant device 10, a camera device 20, and an image processing device 30. The implant device 10 may receive a visual signal and generate an electrical stimulation signal based on the visual signal to enable the patient to sense light. The visual signal may be collected by the camera device 20 and obtained by processing the image processing device 30.
[0028] In some examples, implant device 10 may include stimulation electrode array 11 (see Figure 6 ). The stimulation electrode array 11 may include a predetermined number of stimulation electrodes (sometimes also referred to as "electrodes"), for example Figure 6 The stimulation electrodes 101, 102, and 103 in the implant device 100 are provided. The stimulation electrodes can generate electrical stimulation signals according to visual signals. Specifically, the implant device 10 can receive visual signals, and the stimulation electrodes can convert the received visual signals into bidirectional pulse current signals as electrical stimulation signals, thereby emitting bidirectional pulse current signals to the ganglion cells or bipolar cells of the retina to generate light sensation. In addition, the implant device 10 can be implanted in the human body, for example, in the eyeball. In some examples, the image processing device 30 can have a transmitting antenna for transmitting visual signals, and the implant device 10 can have a receiving antenna for receiving visual signals.
[0029] In some examples, the visual signal received by the implant device 10 may be collected and processed by the camera device 20 and the image processing device 30 .
[0030] In some examples, the camera 20 may be used to capture images and convert the captured images into visual signals. For example, the camera 20 may capture images of the patient's environment.
[0031] In some examples, the camera device 20 may be a device with a camera function, such as a video camera, a still camera, etc. For ease of use, a camera with a relatively small volume may be designed to be mounted on (eg, embedded in) glasses.
[0032] In other examples, the patient may also capture images by wearing lightweight glasses with a camera function as the camera device 20. The camera device 20 may also be implemented using Google Glass, etc. In addition, the camera device 20 may be mounted on smart wearable devices such as smart glasses, smart headsets, and smart bracelets.
[0033] In some examples, the image processing device 30 can receive the visual signal generated by the camera device 20. The image processing device 30 can process the visual signal and send it to the implant device 10 via the transmitting antenna.
[0034] In some examples, the image processing device 30 may be connected to the camera device 20. The connection between the camera device 20 and the image processing device 30 may be a wired connection or a wireless connection. The wired connection may be a data line connection, and the wireless connection may be a Bluetooth connection, a WiFi connection, an infrared connection, an NFC connection, or a radio frequency connection.
[0035] In some examples, the camera device 20 and the image processing device 30 may be configured outside the patient's body. For example, the patient may wear the camera device 20 on glasses. The patient may also wear the camera device 20 on wearable accessories such as headwear, hairbands, or brooches. In addition, the patient may wear the image processing device 30 around the waist, and the patient may also wear the image processing device 30 on parts such as arms and legs. The examples disclosed herein are not limited thereto, and for example, the patient may also place the image processing device 30 in, for example, a handbag or backpack that is carried with him.
[0036] The process of the method for detecting the stripe vision of the retinal stimulator 1 is described in detail below with reference to the accompanying drawings. Figure 2 It is a flowchart showing a method for detecting the stripe vision of the retinal stimulator 1 involved in the example of the present disclosure. Figure 3 1 is a grayscale image and a histogram schematic diagram showing a method for detecting the stripe vision of the retinal stimulator 1 involved in the example of the present disclosure.
[0037] In this embodiment, if Figure 2 As shown, the detection method of the stripe vision of the retinal stimulator 1 includes the following steps: (a) using the camera device 20 to obtain an initial image (step S10); (b) graying the initial image to obtain a grayscale image, obtaining a histogram of pixel distribution of the grayscale image based on the grayscale image, and obtaining feature information of the grayscale image based on the grayscale image and the histogram (step S20); (c) judging whether the grayscale image is a stripe vision image based on the feature information and a first type of predetermined threshold value (step S30); (d) if the grayscale image is a stripe vision image, binarizing the grayscale image to obtain a binary image; (e) selecting a target pixel value from the binary image, and obtaining the number of corresponding pixel points having the target pixel value projection on each predetermined mapping line according to whether there is a target pixel value for projection in a vertical direction of a plurality of predetermined mapping lines set in the binary image (step S50); (f) determining the target predetermined mapping line according to the number of corresponding pixel points of the target pixel value projection on each predetermined mapping line and a second type of predetermined threshold, thereby determining the stripe direction on the binary image, wherein the stripe direction on the binary image is perpendicular to the direction of the target predetermined mapping line (step S60).
[0038] In the present disclosure, the retinal stimulator 1 can use the camera 20 to obtain an initial image, grayscale the initial image to obtain a grayscale image, obtain a histogram of the grayscale image based on the grayscale image, obtain feature information of the grayscale image based on the grayscale image and the histogram, and then determine whether the grayscale image is a stripe vision image based on a first type of predetermined threshold. If the grayscale image is a stripe vision image, binarize the grayscale image to obtain a binary image, obtain the number of corresponding pixel points with target pixel value projection on each predetermined mapping line based on the binary image and multiple predetermined mapping lines, determine the target predetermined mapping line based on the number of corresponding pixel points with target pixel value projection on each predetermined mapping line and the second type of predetermined threshold, and thus determine the stripe direction on the binary image. In this way, the stripe vision image can be effectively identified with a small amount of calculation.
[0039] In step S10, the initial image may be acquired by using the camera device 20. In some examples, the initial image is, for example, the external environment in which the patient is located, such as a life scene, a traffic scene, etc. By photographing the external environment with the camera device 20, the desired initial image may be captured. In other examples, the camera device 20 may capture an initial image every preset time T. In this embodiment, the initial image may also be a bar vision image for evaluating the retinal stimulator 1.
[0040] In the present embodiment, the number of pixels of the initial image may be, for example, 300,000, 1,000,000, 2,000,000, 5,000,000, 12,000,000, etc., but the present embodiment is not limited thereto.
[0041] In some examples, the initial image may be an image captured by the camera 20 without any processing. Generally, the initial image obtained by the camera 20 capturing the surrounding environment is a color image. That is, the initial image captured by the camera 20 without any processing may be a color image. In some examples, the color image may be an HSI image. The color image may also be an RGB image. However, the examples of the present disclosure are not limited thereto, and the initial image captured by the camera 20 may be a grayscale image or a binary image, etc.
[0042] In some examples, the initial image may be the external environment in which the patient is located, and the objects or obstacles that appear therein are the information that the patient is mainly concerned about, and in particular, identifying the outline of the object or obstacle is conducive to the actions of the blind or low-vision patients. The color features and other information in the color image are not all used to reflect the morphological features of the object in the initial image. Therefore, even if part of the above information of the color image is removed, the outline of the object or obstacle can be relatively well preserved. In this embodiment, the initial image may also be a stripe vision image, and identifying the direction of the stripes of the stripe vision image is the information that the patient is mainly concerned about. The color features and other information in the color image are not all used to reflect the morphology of the stripes in the initial image (for example, the width of the stripes, that is, the logarithm of the corresponding minimum resolution angle of view is different) and direction. Therefore, even if part of the above information of the color image is removed, the morphology and direction of the stripes can be relatively well preserved.
[0043] In some examples, steps S20 to S60 may be performed in the image processing device 30 .
[0044] In step S20, the initial image may be gray-scaled to obtain a gray-scale image, a histogram of pixel distribution of the gray-scale image may be obtained based on the gray-scale image, and feature information of the gray-scale image may be obtained based on the gray-scale image and the histogram.
[0045] In some examples, in step S20, the initial image may be grayscaled to obtain a grayscale image (see Figure 3 (a)). In some examples, a grayscale image may be a special color image in which the three components R, G, and B are of the same size (i.e., the value of R=G=B), and has less information than an ordinary color image. Each pixel of a grayscale image has a corresponding grayscale value. In some examples, each grayscale value may be represented by, for example, an 8-bit binary number, i.e., the grayscale value of a grayscale image ranges from 0 to 255. In other examples, each grayscale value may also be represented by, for example, a 16-bit binary number, and may also be represented by, for example, a 24-bit or higher binary number.
[0046] In some examples, the grayscale processing in step S20 mainly processes the color information of the initial image, and does not change the initial image information other than the color information. In this case, the grayscale processing can reduce the amount of computation for subsequent processing, which helps to identify whether the initial image is a stripe vision image.
[0047] In some examples, the grayscale processing method may be a component method, that is, the value of any one of the three components R, G, and B may be selected as the grayscale value. For example, for a pixel in the initial image, if R=70, G=110, and B=150, then 70 may be selected as the grayscale value of the pixel, that is, R=G=B=70 may be set as the grayscale value of the pixel; 110 may also be selected as the grayscale value of the pixel, or 150 may be selected as the grayscale value of the pixel. In this case, a grayscale image may be obtained by sequentially processing each pixel in the initial image.
[0048] In addition, in some examples, the grayscale processing method can also be a maximum value method, that is, the maximum value of the three components of R, G, and B can be selected as the grayscale value. For example, for a pixel in the initial image, if R=70, G=110, and B=150, then 150 can be selected as the grayscale value of the pixel. In this case, the grayscale image can be obtained by processing each pixel in the initial image in turn.
[0049] In addition, in some examples, the grayscale processing method can also be an average method, that is, the average value of the three components of R, G, and B can be selected as the grayscale value. For example, for a pixel in the initial image, if R=70, G=110, and B=150, the average value of the three values of R, G, and B is 110, and 110 can be selected as the grayscale value of the pixel. In this case, the grayscale image can be obtained by processing each pixel in the initial image in turn.
[0050] In addition, in some examples, the grayscale processing method can also be a weighted method, that is, the three components of R, G, and B can be weighted according to different weighting coefficients to obtain a grayscale value. For example, for a pixel in the initial image, if R = 70, G = 110, and B = 150, the weighting coefficient of R can be set to 0.3, the weighting coefficient of G can be set to 0.5, and the weighting coefficient of B can be set to 0.2, then the grayscale value of the pixel is 0.3*70+0.5*110+0.2*150=106. In this case, the grayscale image can be obtained by processing each pixel in the initial image in turn.
[0051] In the above example, the grayscale processing can reduce the amount of data (or information) of the initial image, facilitate subsequent processing of the image, and help to subsequently identify whether the initial image is a stripe vision image.
[0052] In some examples, such as Figure 3 As shown, in step S20, a histogram of pixel distribution of the grayscale image can be obtained based on the grayscale image. In some examples, such as Figure 3 (a) and Figure 3As shown in (c), the histogram of the grayscale image can be obtained by MATLAB processing. In some examples, such as Figure 3 (b) and Figure 3 As shown in (d), the grayscale image can be first divided into "grids" and then a histogram can be obtained based on the divided grayscale image.
[0053] In some examples, feature information of the grayscale image can be obtained according to the grayscale image and the histogram in step S20. In some examples, it can be determined whether the grayscale image (or initial image) is a grating vision image (described later) based on the feature information.
[0054] In some examples, the feature information may include a first pixel number, a grayscale mean, and a region centroid coordinate obtained from a grayscale image, wherein the first pixel number is the number of pixels in each pixel interval in the grayscale image obtained based on a histogram, and the grayscale mean is the average value of the grayscale values corresponding to all pixels of the grayscale image. Thus, the feature information of the grayscale image can be obtained.
[0055] In some examples, the first number of pixels may be the number of pixels having grayscale values within each pixel interval in a grayscale image, that is, the grayscale value may be used to divide the image into several pixel intervals, and then the number of each pixel interval may be counted using a histogram. For example, the grayscale value may be used to divide the image into five pixel intervals, wherein the first pixel interval (also referred to as a "black pixel interval") may include pixels having grayscale values of 0 to 50, the second pixel interval may include pixels having grayscale values of 51 to 100, the third pixel interval may include pixels having grayscale values of 101 to 150, the fourth pixel interval may include pixels having grayscale values of 151 to 200, and the fifth pixel interval (also referred to as a "white pixel interval") may include pixels having grayscale values of 201 to 255, and then the number of corresponding pixels in each pixel interval may be counted using a histogram.
[0056] In some examples, as above, the pixel interval may include a black pixel interval, a white pixel interval, and multiple other pixel intervals. In some examples, the feature information may also include derived feature information obtained based on a histogram and divided pixel intervals. In some examples, the derived feature information may be the difference and sum of the number of pixels corresponding to the black pixel interval and the number of pixels corresponding to the white pixel interval, as well as the sum of the number of pixels in multiple other pixel intervals, wherein the black pixel interval (ie, the "first pixel interval") includes pixels with grayscale values of 0 to 50, and the white pixel interval (ie, the "fifth pixel interval") includes pixels with grayscale values of 201 to 255. In this way, the feature information of the grayscale image can be obtained.
[0057] In some examples, the feature information also includes a second number of pixels, wherein the second number of pixels is the number of pixels in the grayscale image whose grayscale value is less than the grayscale mean and / or the number of pixels whose grayscale value is greater than the grayscale mean. The second number of pixels can be obtained in this way. Specifically, the grayscale mean of the grayscale image, that is, the average value of the grayscale values corresponding to all pixels of the grayscale image, can be obtained based on the grayscale image. The number of pixels in the grayscale image whose grayscale value is greater than the grayscale mean can be counted, and the number of pixels in the grayscale image whose grayscale value is less than the grayscale mean can also be counted. The second number of pixels can include the number of pixels in the grayscale image whose grayscale value is greater than the grayscale mean of the grayscale image, and can also include the number of pixels in the grayscale image whose grayscale value is less than the grayscale mean.
[0058] In some examples, the feature information in step S20 may include the coordinates of the region centroid obtained from the grayscale image. Specifically, the grayscale image may be binarized first, and then the processed grayscale image may be passed through a region centroid module (e.g., a pre-set image processing program) to obtain the coordinates of the region centroid corresponding to the grayscale image.
[0059] As described above, in step S20, the characteristic information of the grayscale image can be obtained, so that in the subsequent process, it can be determined whether the grayscale image is a stripe vision image based on the obtained characteristic information.
[0060] In step S30, it can be determined whether the grayscale image is a striped vision image based on the feature information and the first predetermined threshold. Specifically, it can be determined whether the grayscale image is a striped vision image based on the feature information in step S20 and the first predetermined threshold.
[0061] In some examples, the feature information obtained in step S20 may include the first number of pixels, the grayscale mean, and the coordinates of the regional centroid. In other examples, the feature information obtained in step S20 may also include derived feature information and / or the second number of pixels. In this case, the specific content contained in the feature information obtained in step S20 may be different, so the content contained in the first type of predetermined threshold may also be changed. In some examples, the feature information includes the first number of pixels, the grayscale mean, the coordinates of the regional centroid, and the second number of pixels, and the first type of predetermined threshold has a threshold range corresponding to each type of feature information. Thus, the first type of predetermined threshold and the feature information can be compared accordingly. In some examples, the first type of predetermined threshold can be obtained based on an image database. Specifically, the first type of predetermined threshold can be obtained by analyzing the image in the image database, and the obtained first type of predetermined threshold can correspond to the various types of feature information obtained in step S20.
[0062] In some examples, the images in the image database may include stripe vision images of different directions and forms (for example, the width of the stripe, that is, the logarithm of the corresponding minimum resolution angle of view is different), and non-stripe vision images (for example, digital images that are easily confused with stripe vision images, window images, and daily life images, etc.). By analyzing the images in the image database, for example, the corresponding histograms, grayscale means, and regional centroid coordinates of the images in the image database can be obtained, and the different unique features of the stripe vision image and other images can be obtained by statistics. The unique features can refer to the feature information obtained in step S20, that is, the stripe vision image can be distinguished from other images and corresponding to various threshold ranges of various feature information can be obtained by statistics, wherein the first type of predetermined thresholds can be various threshold ranges, so that the first type of predetermined thresholds have threshold ranges corresponding to various feature information. In this case, it can be determined whether the grayscale image is a stripe vision image by judging whether the various feature information obtained in step S20 is within the corresponding threshold ranges in the first type of predetermined thresholds.
[0063] In some examples, the first type of predetermined threshold can be obtained in other devices, and in step S30, the feature information can be compared with the pre-set first type of predetermined threshold. This can reduce the amount of calculation. In some examples, the size of the image in the image database can be the same as the size of the grayscale image. For example, if the size of the grayscale image is 160*120, the size of the image in the image database is also 160*120. In some examples, the first type of predetermined threshold can be obtained by performing the same processing on the image in the image database as the grayscale image. In this case, the first type of predetermined threshold obtained based on the image database can be effective for the feature information obtained in step S20.
[0064] In some examples, the first type of predetermined threshold may correspond to the feature information in step S20. For example, the feature information obtained in step S20 may include the first pixel number, grayscale mean, and regional centroid coordinates. The first type of predetermined threshold obtained by image analysis statistics of the image database may include the unique features of the stripe vision image, that is, the threshold range corresponding to the first pixel number, grayscale mean, and regional centroid coordinates. It can be determined whether each type of feature information is within the corresponding threshold range in the first type of predetermined threshold, that is, whether the feature information is one-to-one within the threshold range corresponding to the first type of predetermined threshold. Specifically, by respectively determining whether the first pixel number in the feature information is within the threshold range corresponding to the first pixel number in the first type of predetermined threshold, whether the grayscale mean in the feature information is within the threshold range corresponding to the grayscale mean in the first type of predetermined threshold, and whether the grayscale mean in the feature information is within the threshold range corresponding to the grayscale mean in the first type of predetermined threshold. If the first pixel number, grayscale mean, and regional centroid coordinates are all within their respective corresponding threshold ranges, then the grayscale image is a stripe vision image. If the feature information obtained in step S20 also includes derived feature information, the obtained first type of predetermined threshold may include unique derived feature information of the stripe vision image obtained based on the image in the image database.
[0065] In some examples, if the various types of feature information obtained in step S20 are within the corresponding threshold range in the first type of predetermined threshold, the grayscale image is determined to be a striped vision image, otherwise the grayscale image is not a striped vision image. In some examples, if the grayscale image is a striped vision image, step S40 can be continued to be executed. If the grayscale image is not a striped vision image, the retinal stimulator 1 can process the initial image in other ways (such as compression, binarization, etc.), and stimulate the retina through the stimulating electrode array 11, so that the patient can obtain information such as the outline of the object in the initial image (not described in detail). In this way, the striped vision image can be distinguished from other non-striped vision images (such as daily life images, etc.) and different processing can be performed, so that the retinal stimulator 1 can better cope with different images and the retinal stimulator 1 can better identify the striped vision image.
[0066] In step S40, if the grayscale image is a stripe vision image, the grayscale image can be binarized to obtain a binary image. In some examples, the binarization process can include comparing the grayscale value of each pixel in the grayscale image with a preset grayscale value. The grayscale value in the grayscale image can be set to two categories, namely the maximum grayscale value and the minimum grayscale value. After changing the grayscale value, a binary image can be obtained. In some examples, the preset grayscale value can be set by relevant personnel or determined by the relevant algorithm of the software used.
[0067] In some examples, the obtained binary image can be optimized, thereby facilitating the subsequent identification of the stripe direction in the stripe vision image. In some examples, a more suitable binary image can be obtained by adjusting (e.g., increasing) the binarization threshold.
[0068] In some examples, the binary image can be optimized by adding a morphological algorithm. In some examples, before step S50, the binary image is also expanded and eroded. For example, the binary image can be first expanded by 3*3 and then eroded by 3*3. This facilitates the subsequent identification of the direction of the stripe in the stripe vision image. In some examples, the binary image can be eroded by 2*2.
[0069] Figure 4 is a schematic diagram showing the application of a method for detecting the stripe vision of the retinal stimulator 1 involved in the example of the present disclosure.
[0070] In step S50, a target pixel value can be selected from the binary image, and the number of corresponding pixel points with the target pixel value projection on each predetermined mapping line can be obtained according to whether there is a target pixel value for projection in the vertical direction of multiple predetermined mapping lines set in the binary image. In some examples, the minimum grayscale value in the binary image can be selected as the target pixel value. In this way, the target pixel value can be selected from the binary image. However, the examples disclosed in the present invention are not limited to this, and the maximum grayscale value in the binary image can also be selected as the target pixel value.
[0071] In some examples, the stripe direction of the stripe vision image is selected from one of a horizontal direction, a vertical direction, a first direction, and a second direction, wherein there is a certain angle between the first direction and the second direction and the horizontal direction. Figure 4 As shown, the angle γ between the first direction and the horizontal direction (i.e., the horizontal line L) may be 45°, and the angle θ between the second direction and the horizontal direction (i.e., the horizontal line L) may be 135°. In some examples, the stripe direction of the stripe vision image may refer to Figure 5 In some examples, in step S50, the binary image can be used as a coordinate map, and each pixel point in the binary image can be used as a coordinate point with specific coordinates, for example, Figure 4 As shown, the coordinates of the pixel corresponding to point O are (0, 0).
[0072] In some examples, the directions of the plurality of predetermined mapping lines may be a horizontal direction, a vertical direction, a first direction, and a second direction, respectively, wherein a certain angle exists between the first direction and the second direction and the horizontal direction. In some examples, the plurality of predetermined mapping lines may be obtained in the binary image according to the directions of the plurality of predetermined mapping lines. In some examples, each predetermined mapping line extends from one side of the binary image to the other side of the binary image (see Figure 4 , for example, line C from Figure 4 The directions of the predetermined mapping lines are the horizontal direction, the vertical direction, and the first direction with an angle γ of 45° with the horizontal direction (see Figure 4 The line C in the figure) and the second direction with an angle θ of 135° with the horizontal direction (see Figure 4 Line D in the image). This makes it easy to determine the predetermined mapping line. In some examples, some or all of the line segments of each predetermined mapping line in the binary image can be selected as the effective corresponding part. In some examples, each predetermined mapping line can retain the effective corresponding part, that is, the number of corresponding pixel points with the target pixel value projection on the effective corresponding part of each predetermined mapping line can be counted. Specifically, the number of corresponding pixel points of the target pixel point with the target pixel value in the binary image projected on the effective corresponding part of each predetermined mapping line can be counted. In some examples, if the target pixel is perpendicular to the predetermined mapping line and has no intersection on the effective corresponding part of the predetermined mapping line, the target pixel point has no corresponding pixel point on the predetermined mapping line. In this case, it is convenient to subsequently count the number of corresponding pixel points with the target pixel value projection on each predetermined mapping line on the number of corresponding pixel points on each predetermined mapping line.
[0073] In some examples, the number of corresponding pixel points with target pixel value projection on each predetermined mapping line can be obtained according to whether there is a target pixel value for projection (i.e., a pixel point with a target pixel value) in the vertical direction of multiple predetermined mapping lines set in the binary image. Specifically, by determining whether there is a pixel point with a target pixel value in the vertical direction of each predetermined mapping line, the pixel point with the target pixel value is projected on each predetermined mapping line to obtain a corresponding pixel point, and the number of corresponding pixel points with target pixel value projection on each predetermined mapping line can be obtained. That is, by determining whether there is a target pixel point with a target pixel value in the binary image in the vertical direction of each predetermined mapping line that is located on the same straight line as the pixel point on the predetermined mapping line, if there is, the pixel point is taken as the corresponding pixel point, and each pixel point on the predetermined mapping line is determined, and then the number of corresponding pixel points on the predetermined mapping line can be obtained by counting. In this case, it is possible to determine whether each pixel point on each predetermined mapping line is a corresponding pixel point, and the number of corresponding pixel points with target pixel value projection on each predetermined mapping line can be counted.
[0074] In some examples, the target pixel point with the target pixel value in the binary image can be perpendicular to each predetermined mapping line, and the intersection with the predetermined mapping line is used as the corresponding pixel point of the target pixel point projected on the predetermined mapping line. In some examples, the coordinate points on each predetermined mapping line are pixel points (the corresponding horizontal and vertical coordinates are both integers), so the corresponding pixel points of each target pixel point on each predetermined mapping line should be pixel points. In some examples, if the horizontal or vertical coordinate corresponding to the intersection of the target pixel point and the predetermined mapping line is not an integer, any adjacent pixel point of the intersection on the predetermined mapping line can be used as the corresponding pixel point of the target pixel point. However, the examples of the present disclosure are not limited to this. When counting the number of corresponding pixel points on the predetermined mapping line, it can also be considered that the target pixel point has no projection on the predetermined mapping line, that is, the target pixel point has no corresponding pixel point on the predetermined mapping line. For example, Figure 4 As shown in the figure, in the binary image of size 160*120, the coordinates of the target pixel are (x 0, ,y 0, ), line A corresponds to the effective mapping part of the predetermined mapping line in the horizontal direction, and satisfies: y=110, wherein the corresponding pixel point of the target pixel point on line A can satisfy: (x 0, , 110); Line B corresponds to the effective mapping part of the predetermined mapping line in the vertical direction, and satisfies: x = 150, wherein the corresponding pixel point of the target pixel point on line B can satisfy: (150, y 0,); Line C corresponds to the effective mapping part of the predetermined mapping line in the first direction and satisfies: y=x-24, wherein the corresponding pixel point of the target pixel point on line C can satisfy: ((x 0, +y 0, ) / 2+12,(x 0, +y 0, ) / 2-12); Line D corresponds to the effective mapping part of the predetermined mapping line in the second direction and satisfies: y=-x+144, wherein the corresponding pixel point of the target pixel point on line D can satisfy: (72-(y0-,x 0, ) / 2,(y0-,x 0, ) / 2+72). If Figure 4 The coordinates of the target pixel point M are (153, 0), so the target pixel point M has no corresponding pixel point on line D. Theoretically, the coordinates of the corresponding pixel point of the target pixel point M on line C should be (177 / 2, 129 / 2), but in fact there is no point (177 / 2, 129 / 2) on line C. Therefore, its adjacent points (88, 64) or (89, 65) can be used as the corresponding pixel point of the target pixel point M on line C. It can also be considered that the target pixel point M has no corresponding pixel point on line C, that is, the corresponding pixel point of the target pixel point M on line C is not counted.
[0075] In some examples, when counting the number of corresponding pixel points on a predetermined mapping line, the same corresponding pixel points of multiple target pixel points on the predetermined mapping line may be counted only once.
[0076] As described above, in step S50, the number of corresponding pixel points of the target pixel points with the target pixel value in the binary image projected on each predetermined mapping line can be obtained, that is, the number of corresponding pixel points of the target pixel value projection on each predetermined mapping line can be obtained.
[0077] In step S60, the target predetermined mapping line is determined according to the number of corresponding pixel points of the target pixel value projection on each predetermined mapping line and the second type of predetermined threshold, thereby determining the stripe direction on the binary image, wherein the stripe direction on the binary image is perpendicular to the direction of the target predetermined mapping line.
[0078] In some examples, the number of corresponding pixel points of the target pixel point projection having the target pixel value on each predetermined mapping line obtained in step S50 can be compared with the second type of predetermined threshold to determine whether the corresponding pixel points on each predetermined mapping line are continuous, and the target predetermined mapping line can be determined from the multiple predetermined mapping lines. In this way, the target predetermined mapping line can be determined.
[0079] In some examples, the stripe direction may be one of the horizontal direction, the vertical direction, the direction at an angle γ of 45° to the horizontal direction (or the first direction), and the direction at an angle θ of 135° to the horizontal direction (or the second direction). The plurality of predetermined mapping lines may be the horizontal direction, the vertical direction, the direction at an angle 45° to the horizontal direction, and the direction at an angle 135° to the horizontal direction. In some examples, the corresponding pixel points of the plurality of target pixels may be discontinuous on a predetermined mapping line perpendicular to the stripe direction of the binary image, and the predetermined mapping line may be a target predetermined mapping line. For example, Figure 4 As shown, the stripe direction is a direction with an angle of 135° with the horizontal direction, and the corresponding pixel points of multiple target pixel points on line C are discontinuous. In this case, the predetermined mapping line corresponding to line C is the target predetermined mapping line.
[0080] In some examples, the number of corresponding pixels on the valid corresponding part of each predetermined mapping line is finite, so the number of corresponding pixels of the multiple target pixels on the valid corresponding part of each predetermined mapping line can be determined to determine whether the corresponding pixels of the multiple target pixels on the predetermined mapping line are continuous, thereby determining the target predetermined mapping line, and thus determining the stripe direction. In some examples, the number of corresponding pixels of the multiple target pixels on each predetermined mapping line can be compared with the second type of predetermined threshold to determine whether the corresponding pixels of the multiple target pixels on the predetermined mapping line are continuous.
[0081] In some examples, the second type of predetermined threshold may be obtained in other devices, and in step S60, the number of multiple target pixels on each predetermined mapping line in the binary image obtained in step S50 may be compared with the preset second type of predetermined threshold.
[0082] In some examples, the second type of predetermined threshold can be obtained based on an image database. In some examples, a simulation experiment is performed using multiple stripe vision images with different stripe widths and stripe directions in the image database. For example, the logarithm of the minimum resolution viewing angle can be selected to be 1.5 to 2.9, and the corresponding stripe directions can be the horizontal direction, the vertical direction, the direction with an angle γ of 45° with the horizontal direction (or the first direction), and the direction with an angle θ of 135° with the horizontal direction (or the second direction). Multiple stripe vision images under different conditions (i.e., different stripe widths and / or stripe directions) are processed in the same way as the above-mentioned binary image. For example, multiple stripe vision images can be processed by the above-mentioned steps S40 and S50, and then the number of corresponding pixel points of target pixel points with target pixel values on each predetermined mapping line in the stripe vision images under different conditions (i.e., different stripe widths and / or stripe directions) is counted respectively, and then the second type of predetermined threshold is obtained by statistical analysis. In some examples, the second type of predetermined thresholds include threshold ranges of the number of corresponding pixel points of multiple target pixels on each predetermined mapping line when the stripe directions are the horizontal direction, the vertical direction, the direction with an angle γ of 45° to the horizontal direction (or the first direction), and the direction with an angle θ of 135° to the horizontal direction (or the second direction). In this case, the number of multiple target pixels on each predetermined mapping line in the binary image obtained in step S50 can be compared with the second type of predetermined thresholds, and the target predetermined mapping line (i.e., the predetermined mapping line where the corresponding pixel points of multiple target pixels on the predetermined mapping line are discontinuous) can be determined, thereby determining the stripe direction in the binary image, and the target predetermined mapping line can be perpendicular to the stripe direction in the binary image.
[0083] In some examples, after the above steps, the initial image is converted into a binary image, but the stripe direction in the initial image is not changed, that is, the stripe direction in the initial image is the same as the stripe direction in the binary image, so the stripe direction in the initial direction can be determined.
[0084] Figure 5 is a schematic diagram showing a direction template involved in an example of the present disclosure. Figure 6 Schematic diagram showing the configuration position of the stimulation electrode array 11 involved in the example of the present disclosure.
[0085] In some examples, the image processing device 30 may pre-set a plurality of direction templates corresponding to the stripe grid directions, for example, Figure 5 As shown, the multiple direction templates include a horizontal template corresponding to the horizontal direction (see Figure 5 (a)), the vertical template corresponding to the vertical direction (see Figure 5 (b)), a first direction template corresponding to the first direction (see Figure 5(c)), a second direction template corresponding to the second direction (see Figure 5 (d)). In some examples, the image processing device 30 may select a direction template corresponding to the grating direction from pre-set direction templates based on the determined grating direction, for example, Figure 4 The second direction template corresponding to the bar grid direction in Figure 5 (d)).
[0086] In some examples, the multiple direction templates configured in the image processing device 30 can match the configuration positions of the stimulation electrode array 11, for example, Figure 5 and Figure 6 As shown, the stimulation electrode array 11 is placed horizontally, and the multiple direction templates pre-set by the image processing device 30 can be used as a reference. Figure 5 .
[0087] In some examples, the image processing device 30 can transmit a visual signal to the implant device 10 through the transmitting antenna according to the selected direction template (such as the second direction template), and the implant device 10 can convert the visual signal into an electrical stimulation signal, and stimulate the ganglion cells or bipolar cells of the retina through the stimulation electrode array 11, thereby enabling the patient to recognize the direction of the bars in the initial image. Figures 4 to 6 As shown, the stimulation electrode array 11 is placed horizontally, and the image processing device 30 is based on Figure 4 The second direction template selected by the stripe direction (see Figure 5 (d)) transmitting a visual signal to the implant device 10, which can convert the visual signal into an electrical stimulation signal. Figure 6 The electrodes in black (eg, stimulation electrode 101 and stimulation electrode 103 ) work to stimulate the ganglion cells or bipolar cells of the retina, thereby enabling the patient to identify the direction of the grating.
[0088] Although the present disclosure is specifically described above in conjunction with the accompanying drawings and embodiments, it is to be understood that the above description does not limit the present disclosure in any form. Those skilled in the art may modify and change the present disclosure as needed without departing from the essential spirit and scope of the present disclosure, and these modifications and changes all fall within the scope of the present disclosure.
Claims
1. A retinal stimulator with a grating vision test, characterized in that: It includes a camera device, an image processing device, and an implantation device, The camera device is located outside the body and is configured to acquire an initial image; The image processing device is configured to grayscale the initial image to obtain a grayscale image, obtain a histogram of pixel distribution of the grayscale image based on the grayscale image, obtain feature information of the grayscale image based on the grayscale image and the histogram, and determine whether the grayscale image is a striped vision image based on the feature information and a first type of predetermined threshold; if the grayscale image is the striped vision image, binarize the grayscale image to obtain a binary image; select a target pixel value from the binary image, and obtain the number of corresponding pixel points projected by the target pixel point on each predetermined mapping line based on whether there is a target pixel point with the target pixel value in a vertical direction of a plurality of predetermined mapping lines set in the binary image; Determine the target predetermined mapping line according to the number of corresponding pixel points of the projection of the target pixel point on each predetermined mapping line and the second type of predetermined threshold value, thereby determining the direction of the stripe on the binary image, wherein the direction of the stripe on the binary image is perpendicular to the direction of the target predetermined mapping line; the image processing device selects a direction template corresponding to the stripe direction from pre-set direction templates based on the determined stripe direction, and transmits a visual signal to the implant device according to the direction template corresponding to the stripe direction; The implant device converts the visual signal into an electrical stimulation signal to stimulate the ganglion cells or bipolar cells of the retina; wherein the first type of predetermined threshold is obtained by analyzing images in an image database, the image database includes stripe vision images and non-stripe vision images of different directions and shapes, and the first type of predetermined threshold has a threshold range corresponding to the feature information; the second type of predetermined threshold is obtained by performing the same processing as the binary image on multiple stripe vision images with different stripe widths and stripe directions in the image database, and then counting the number of corresponding pixel points of pixel points with target pixel values in the stripe vision images with different stripe widths and / or stripe directions on each predetermined mapping line, and then analyzing and statistically obtaining the threshold.
2. The retinal stimulator according to claim 1, wherein: The feature information includes a first pixel number, a grayscale mean, and a region centroid coordinate obtained based on the grayscale image, wherein the first pixel number is the number of pixels in each pixel interval with grayscale values in the grayscale image obtained based on the histogram, the grayscale mean is the average value of the grayscale values of all pixels in the grayscale image, the pixel interval includes a black pixel interval, a white pixel interval, and multiple other pixel intervals, the black pixel interval includes pixels with grayscale values of 0 to 50, and the white pixel interval includes pixels with grayscale values of 201 to 255.
3. The retinal stimulator according to claim 2, wherein: The feature information also includes a second pixel number, wherein the second pixel number is the number of pixels in the grayscale image whose grayscale values are less than the grayscale mean and / or the number of pixels whose grayscale values are greater than the grayscale mean.
4. The retinal stimulator according to claim 3, wherein: The characteristic information includes a difference and a sum between the number of pixels in the black pixel interval and the number of pixels in the white pixel interval, and a sum of the numbers of pixels in the other pixel intervals.
5. The retinal stimulator according to claim 1, characterized in that: The stripe direction of the stripe vision image is selected from one of a horizontal direction, a vertical direction, a first direction having an angle of 45° with the horizontal direction, and a second direction having an angle of 135° with the horizontal direction.
6. The retinal stimulator according to claim 1, characterized in that: The predetermined mapping lines extend from one side of the binary image to the other side of the binary image, and directions of the predetermined mapping lines are respectively a horizontal direction, a vertical direction, a first direction having an angle of 45° with the horizontal direction, and a second direction having an angle of 135° with the horizontal direction.
7. The retinal stimulator according to claim 6, characterized in that: Partial line segments or all line segments of each predetermined mapping line in the binary image are selected as valid corresponding parts, and the number of corresponding pixel points of the target pixel point projected on each predetermined mapping line is counted in the valid corresponding part.
8. The retinal stimulator according to claim 1, characterized in that: The target pixel value is the minimum grayscale value in the binary image.
9. The retinal stimulator according to claim 1, characterized in that: Whether the corresponding pixel points on the predetermined mapping lines are continuous is determined by comparing the number of corresponding pixel points on the predetermined mapping lines with the second type of predetermined threshold, thereby determining the target predetermined mapping line.
10. The retinal stimulator according to claim 1, characterized in that: The implant device includes a stimulation electrode array, and the multiple direction templates configured by the image processing device match the configuration position of the stimulation electrode array.
Citation Information
Patent Citations
Method for detecting vision of bar grid of retinal stimulator
CN111445527A
Bar grid vision detection method
CN113592948A
