Braille convex image filling method and filling device
Through the Braille convex image generation method with layer-by-layer outermost contour, the problem that the traditional Braille convex image filling method cannot effectively help blind people quickly clarify the overall shape of the filling area, and achieve the effect of improving the accuracy of visually impaired users' identification and user experience.
Patent Information
- Application Number
- CN202410884419.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-07-03
AI Technical Summary
The traditional Braille convex image filling method cannot effectively help blind people quickly clarify the overall shape of the filling area, resulting in difficulties for visually impaired users to identify the filling graphics.
Through the Braille Convex Graph Generation Method of layer by layer, all pixel points sets of to be processed are obtained, and the outermost contour pixel points sets are obtained through corrosion operations, and the relevant pixel points are gradually integrated and deleted to generate the filled Braille Convex Graph.
This method helps visually impaired users to still understand the overall shape of the fill area within the internal cell, improving the accuracy and user experience of visually impaired users in the recognition of filled Braille convex images.
Smart Images

Figure CN118608652B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of Braille convex image filling, and in particular to a Braille convex image filling method and a filling device. Background Art
[0002] In order to help the blind understand the graphics, especially the filled area, it is also necessary to simulate the blind spot of the filled area. The traditional Braille convex image filling method often uses uniform point filling. Figure 1 As shown. Although this filling method is not a problem for sighted people, when a blind person touches it, they can only feel a small part of the filled area and cannot quickly determine the overall shape of the filled area. For example, when a visually impaired user only touches the central rectangular area in the figure with his hand, the user feels exactly the same, and there is no distinction between different graphics. This will make it so that when a visually impaired user distinguishes a filled graphic, he can only effectively distinguish the graphic by touching the entire filled Braille convex image.
[0003] The above problems need to be solved urgently. Summary of the invention
[0004] The present invention aims to overcome at least one of the above-mentioned disadvantages of the prior art. On the one hand, the present invention provides a method for filling a braille convex image, the method comprising: S110: obtaining a graphics to be processed; S120: generating a set of all pixel points of the graphics to be processed; S130: generating a first output result set and a first neighborhood threshold, and initializing the first output result set; S140: obtaining a set of outermost contour pixels of the graphics to be processed based on a set of all pixel points of the graphics to be processed; S150: obtaining a set of convex point images of the outermost contour as a second output result set based on the set of outermost contour pixels using a braille convex image generation method; S160: integrating the second output result set into the first output result set; S170: performing an erosion operation on the graphics to be processed based on the first neighborhood threshold to delete the outermost contour pixels and related neighborhoods of the graphics to be processed; S180: repeating steps S140-S170 until all pixel points in the graphics to be processed are processed, and outputting a first output result set; S190: filling the braille convex image based on the first output result set.
[0005] Furthermore, the method of obtaining the outermost contour pixel point set of the graphic to be processed based on the set of all pixel points of the graphic to be processed includes: performing an erosion operation on the graphic to be processed, corroding a layer of pixel points internally based on the outermost pixel points; obtaining the corroded pixel point set; and obtaining the outermost contour pixel point set of the graphic to be processed based on the set of all pixel points of the graphic to be processed and the corroded pixel point set.
[0006] Furthermore, the obtaining of the outermost contour pixel point set of the to-be-processed graphic based on all pixel point sets of the to-be-processed graphic and the eroded pixel point set comprises:
[0007]
[0008] Wherein, P3 is the set of outermost contour pixels, P is the set of all pixels of the graphics to be processed, P2 is the set of pixels after corrosion, i∈n, j∈m, n is a positive integer greater than or equal to 1, m is a positive integer greater than or equal to 1, and n and m are n*m pixels contained in the graphics to be processed.
[0009] Furthermore, the convex dot map result set of the outermost contour obtained by using the Braille convex map generation method based on the outermost contour pixel point set as the second output result set includes: S1501: generating a second output result set and a second neighborhood threshold, and initializing the second output result set; S1502: obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1503: obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1504: obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1505: obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1506: obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1507: obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1508: obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1510 The neighborhood space of each pixel point is used to obtain the edge points and / or inflection points included in the outermost contour pixel point set P3, and the pixel point coordinates corresponding to the edge points and / or inflection points are stored in the second set; S1504: the pixel point coordinates corresponding to the edge points and / or inflection points included in the second set are stored in the second output result set, and the neighborhood space of the edge points and / or inflection points is deleted in the outermost contour pixel point set P3, and the outermost contour pixel point set P3 is updated synchronously; S1505: steps S1502 to S1504 are repeated until the outermost contour pixel point set P3 is an empty set, and the final second output result set Q3 is output.
[0010] Further, integrating the second output result set into the first output result set includes: merging the second output result set into the first output result set; Q=Q∪Q3; wherein Q is the first output result set, and Q3 is the second output result set.
[0011] Furthermore, the performing of an erosion operation on the graphics to be processed based on the first neighborhood threshold to delete the outermost contour pixel points and the related neighborhood of the graphics to be processed includes: performing an erosion operation on the graphics to be processed, corroding 3*L layers of pixel points inward based on the outermost contour pixel points; wherein L is the first neighborhood threshold.
[0012] Furthermore, the steps S140-S170 are repeatedly executed until all the pixels in the graphics to be processed are processed, and the first output result set is output, including: if there are remaining pixels in the graphics to be processed that have not been processed, the steps S140-S170 are repeated; if all the pixels in the graphics to be processed are processed, the final first output result set is output.
[0013] Further, the neighborhood space of each pixel point in the outermost contour pixel point set P3 is obtained based on the outermost contour pixel point set P3 and the second neighborhood threshold, and the subset neighborhood of the outermost contour pixel point set P3 is generated, including: for each pixel point (i, j) in the outermost contour pixel point set P3, a set of points whose Euclidean distance to the pixel point is less than the second neighborhood threshold is calculated to obtain the subset neighborhood U of the outermost contour pixel point set P3. i,j ; The subset neighborhood U of the outermost contour pixel set P3 i,j ={(a,b)∈P3|(ai) 2 +(bj) 2 <l 2}; wherein the second neighborhood threshold is set to 1.
[0014] Further, the step of obtaining edge points and / or inflection points contained in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the neighborhood space of each pixel point in the outermost contour pixel point set P3, and storing the pixel point coordinates corresponding to the edge points and / or inflection points in the second set includes: for each pixel point (i, j) in the outermost contour pixel point set P3, calculating a neighborhood space pixel point subset C1 in the first quadrant with the pixel point (i, j) as the origin: C1 i,j ={(a,b)∈U i,j |a>i&&b <j};
[0015] For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C2 in the second quadrant with it as the origin: C2 i,j ={(a,b)∈U i,j |a>i&&b>j};
[0016] For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C3 in the third quadrant with it as the origin: C3 i,j ={(a,b)∈U i,j |a<i&&b> j};
[0017] For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C4 in the fourth quadrant with it as the origin: C4i,j ={(a,b)∈U i,j |a <i&&b<j};
[0018] For each pixel point (i, j) in the outermost contour pixel point set P3, when at least two of the subsets corresponding to the neighborhood space pixel point subsets C1, C2, C3 and C4 are empty, the pixel point is an edge point or an inflection point, and the pixel point coordinates corresponding to the edge point and / or inflection point exist in the second set K:
[0019] K={(i,j)∈P|C1 i,j , C2 i,j , C3 i,j , C4 i,j At least 2 of them are empty sets}.
[0020] In a second aspect, the present invention provides a braille convex image filling device, the device comprising: an acquisition unit, adapted to acquire a graphic to be processed; a pixel point set generation unit, adapted to generate a set of all pixel points of the graphic to be processed; an initialization unit, adapted to generate a first output result set and a first neighborhood threshold, and initialize the first output result set; a pixel point set generation unit for an outermost contour of the graphic to be processed, adapted to acquire a pixel point set of an outermost contour of the graphic to be processed based on all pixel point sets of the graphic to be processed; a second output result set generation unit, adapted to generate a pixel point set of an outermost contour of the graphic to be processed using a braille convex image generation unit based on the outermost contour pixel point set The method obtains a convex point map result set of the outermost contour as a second output result set; an integration unit is used to integrate the second output result set into the first output result set; a deletion unit is used to perform an erosion operation on the to-be-processed graphic based on the first neighborhood threshold to delete the outermost contour pixel points and the related neighborhood of the to-be-processed graphic; a first output result set output unit is used to switch to a unit for generating an outermost contour pixel point set of the to-be-processed graphic until all the pixel points in the to-be-processed graphic are processed and the first output result set is output; a filling unit is used to fill the Braille convex image based on the first output result set.
[0021] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more instructions, and the computer instructions are used to enable the computer to execute the above-mentioned Braille convex image filling method.
[0022] On the other hand, the present invention provides an electronic device, comprising: a memory and a processor; the memory stores at least one program instruction; the processor implements the above-mentioned Braille convex image filling method by loading and executing the at least one program instruction.
[0023] The beneficial effect of the present invention is as follows: the present invention provides a method for filling a braille convex image, the method comprising: S110: obtaining a graphics to be processed; S120: generating a set of all pixel points of the graphics to be processed; S130: generating a first output result set and a first neighborhood threshold, and initializing the first output result set; S140: obtaining a set of outermost contour pixel points of the graphics to be processed based on a set of all pixel points of the graphics to be processed; S150: obtaining a set of convex point images of the outermost contour as a second output result set based on the set of outermost contour pixel points using a braille convex image generation method; S160: integrating the second output result set into the first output result set; S170: performing an erosion operation on the graphics to be processed based on the first neighborhood threshold to delete the outermost contour pixel points and the related neighborhood of the graphics to be processed; S180: repeating steps S140-S170 until all pixel points in the graphics to be processed are processed, and outputting a first output result set; S190: filling the braille convex image based on the first output result set. By generating the Braille convex image of the outermost contour layer by layer, the user can still understand the shape of the overall filled area within the inner small interval. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0025] Figure 1 It is an effect diagram formed by a Braille convex image filling method proposed in the background technology of the present invention.
[0026] Figure 2 This is a flow chart of a Braille convex image filling method provided in Example 1 of the present invention.
[0027] Figure 3 This is a Braille convex image effect diagram formed by a Braille convex image filling method provided in Example 1 of the present invention.
[0028] Figure 4 This is a schematic diagram of a Braille convex image filling arrangement provided by Embodiment 2 of the present invention.
[0029] Figure 5 This is a partial block diagram of an electronic device provided in Example 4 of the present invention. DETAILED DESCRIPTION
[0030] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0031] It should be understood that, although the terms "first", "second", etc. may be used herein to describe various units, these units should not be limited by these terms. These terms are used only to distinguish one unit from another unit. For example, without departing from the scope of the exemplary embodiments, the first unit may be referred to as the second unit, and similarly the second unit may be referred to as the first unit. The term "and / or" used herein includes any and all combinations of one or more of the listed associated items.
[0032] The present invention will now be described in detail with reference to the accompanying drawings. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore only shows the components related to the present invention.
[0033] Example 1
[0034] like Figure 2 As shown, it is a flow chart of a Braille convex image filling method provided by the present invention.
[0035] As an example, the method includes:
[0036] S110: Obtaining graphics to be processed.
[0037] S120: Generate a set of all pixels of the to-be-processed graphic.
[0038] Preferably, the step S120 includes: obtaining n*m pixel points contained in the image to be processed; the coordinates of the pixel point in the i-th row and j-th column are (i, j); wherein, i∈n, j∈m, n is a positive integer greater than or equal to 1, and m is a positive integer greater than or equal to 1.
[0039] S130: Generate a first output result set and a first neighborhood threshold, and initialize the first output result set.
[0040] Preferably, step S130 includes: establishing a first output result set Q, which is used as the output result of the last retained pixel point, that is, the pixel point coordinates finally included in the first output result set are the filled Braille convex image for use by the visually impaired. Specifically, the first output result set Q initially established is an empty set, and the first neighborhood threshold is pre-set to L. The specific value of the neighborhood threshold is not limited here, and the relevant technicians can change its value based on actual conditions during actual application.
[0041] S140: Acquire the outermost contour pixel point set of the to-be-processed graphic based on all pixel point sets of the to-be-processed graphic.
[0042] Preferably, the step S140 includes performing an erosion operation on the to-be-processed graphic, corroding a layer of pixel points inside based on the outermost pixel points; obtaining a pixel point set after corrosion; obtaining an outermost contour pixel point set of the to-be-processed graphic based on all pixel point sets of the to-be-processed graphic and the pixel point set after corrosion,
[0043] Wherein, P3 is the set of outermost contour pixels, P is the set of all pixels of the graphics to be processed, P2 is the set of pixels after corrosion, i∈n, j∈m, n is a positive integer greater than or equal to 1, m is a positive integer greater than or equal to 1, and n and m are n*m pixels contained in the graphics to be processed.
[0044] S150: Based on the outermost contour pixel set, a convex point map result set of the outermost contour is obtained by using a Braille convex map generation method as a second output result set.
[0045] Preferably, the step S150 includes S1501: generating a second output result set and a second neighborhood threshold, and initializing the second output result set; S1502: obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1503: obtaining the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the neighborhood space of each pixel point in the outermost contour pixel point set P3. 3, and store the pixel coordinates corresponding to the edge points and / or inflection points in the second set; S1504: store the pixel coordinates corresponding to the edge points and / or inflection points contained in the second set in the second output result set, and delete the neighborhood space of the edge points and / or inflection points in the outermost contour pixel point set P3, and synchronously update the outermost contour pixel point set P3; S1505: repeat steps S1502 to S1504 until the outermost contour pixel point set P3 is an empty set, and output the final second output result set Q3.
[0046] Preferably, step S1502 comprises: for each pixel point (i, j) in the outermost contour pixel point set P3, calculating a set of points whose Euclidean distance to the pixel point is less than a second neighborhood threshold, and obtaining a subset neighborhood U of the outermost contour pixel point set P3. i,j ; The subset neighborhood U of the outermost contour pixel set P3 i,j ={(a,b)∈P3|(ai) 2 +(bj) 2 <l 2}; wherein the second neighborhood threshold is set to 1.
[0047] Preferably, step S1503 comprises: for each pixel point (i, j) in the outermost contour pixel point set P3, calculating a neighborhood space pixel point subset C1 in the first quadrant with the pixel point (i, j) as the origin:
[0048] C1 i,j ={(a,b)∈U i,j |a>i&&b <j};
[0049] For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C2 in the second quadrant with it as the origin:
[0050] C2 i,j ={(a,b)∈U i,j |a>i&&b>j};
[0051] For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C3 in the third quadrant with it as the origin:
[0052] C3 i,j ={(a,b)∈U i,j |a<i&&b> j};
[0053] For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C4 in the fourth quadrant with it as the origin:
[0054] C4 i,j ={(a,b)∈U i,j |a <i&&b<j};
[0055] For each pixel point (i, j) in the outermost contour pixel point set P3, when at least two of the subsets corresponding to the neighborhood space pixel point subsets C1, C2, C3 and C4 are empty, the pixel point is an edge point or an inflection point, and the pixel point coordinates corresponding to the edge point and / or inflection point exist in the second set K:
[0056] K={(i,j)∈P|C1 i,j , C2 i,j , C3 i,j , C4 i,j At least 2 of them are empty sets}.
[0057] Preferably, the step S1504 includes: merging the second set K into the second output result set Q3, that is:
[0058] Q3=Q3∪K;
[0059] For each pixel (i, j) in the second set K, delete its neighborhood from P3, that is:
[0060] P3=P3-U i,j ;
[0061] Update the first set P3 to P3-U i,j .
[0062] Regarding the above steps S1503 and S1504, in short, the edge points and inflection points of the graphics to be processed are obtained through step S1503, and the pixel coordinates corresponding to the edge points and inflection points are stored in the second output result set Q3 through step S1504, and are deleted from the set P3.
[0063] S160: Integrate the second output result set into the first output result set.
[0064] Preferably, the step S160 includes: merging the second output result set into the first output result set; Q=Q∪Q3; wherein Q is the first output result set, and Q3 is the second output result set.
[0065] S170: Performing an erosion operation on the to-be-processed graphic based on the first neighborhood threshold to delete the outermost contour pixels and related neighborhoods of the to-be-processed graphic.
[0066] Preferably, the step S170 includes: performing an erosion operation on the graphics to be processed, corroding 3*L layers of pixels inward based on the outermost contour pixels; wherein L is the first neighborhood threshold.
[0067] S180: Repeat steps S140-S170 until all pixels in the to-be-processed graphic are processed, and output a first output result set.
[0068] Preferably, the step S180 includes: if there are remaining pixels in the graphics to be processed that have not been processed, repeating steps S140-S170; if all pixels in the graphics to be processed have been processed, outputting a final first output result set.
[0069] S190: Filling the Braille convex image based on the first output result set.
[0070] Preferably, Figure 3 The figure shows a filled braille convex image generated based on the above method. It can be seen that the filled area of the filled braille convex image is not filled with uniform points as described in the background technology, but is filled layer by layer with the actual outline of the filled graphic. In this way, when a visually impaired user touches the central frame area of the filled braille convex image, it can still help the user to understand the overall shape of the filled area within the internal small area, which greatly improves the accuracy of the visually impaired user in the process of recognizing the filled braille convex image, and further improves the visually impaired user's experience in using braille to recognize graphics.
[0071] Example 2
[0072] See also Figure 4 , this embodiment provides a schematic diagram of the structure of a Braille convex image filling device.
[0073] As an example, the device comprises:
[0074] The acquisition unit 410 is adapted to acquire the graphics to be processed.
[0075] The pixel point set generating unit 420 is adapted to generate all pixel point sets of the graphics to be processed.
[0076] The initialization unit 430 is adapted to generate a first output result set and a first neighborhood threshold, and initialize the first output result set.
[0077] The unit 440 for generating the pixel point set of the outermost contour of the to-be-processed graphic is adapted to obtain the pixel point set of the outermost contour of the to-be-processed graphic based on all the pixel point sets of the to-be-processed graphic.
[0078] The second output result set generating unit 450 is adapted to obtain a convex point map result set of the outermost contour as the second output result set based on the outermost contour pixel point set using a Braille convex map generating method.
[0079] The integration unit 460 is adapted to integrate the second output result set into the first output result set.
[0080] The deleting unit 470 is adapted to perform an erosion operation on the to-be-processed graphic based on the first neighborhood threshold to delete the outermost contour pixels and the related neighborhood of the to-be-processed graphic.
[0081] The first output result set output unit 480 is adapted to switch to the outermost contour pixel point set generating unit 440 for the to-be-processed graphic until all the pixel points of the to-be-processed graphic are processed and the first output result set is output;
[0082] The filling unit 490 is adapted to fill the Braille convex image based on the first output result set.
[0083] It is not difficult to find that this embodiment is a system embodiment corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.
[0084] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.
[0085] Example 3
[0086] The embodiment of the present invention further provides a storage medium, on which a braille convex image filling method is stored, and when the braille convex image filling program is executed by a processor, the steps of the braille convex image filling method described above are implemented. Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be repeated here one by one.
[0087] Example 4
[0088] See also Figure 5 An embodiment of the present invention further provides an electronic device, comprising: a memory and a processor; the memory stores at least one program instruction; the processor implements the Braille convex image filling method provided in Example 1 by loading and executing the at least one program instruction.
[0089] The memory 602 and the processor 601 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 601 and the memory 602 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 601 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 601.
[0090] The processor 601 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 602 can be used to store data used by the processor 601 when performing operations.
[0091] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can know all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the scope of protection of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A method for filling a convex image of Braille, characterized in that: The method comprises: S110: Obtaining graphics to be processed; S120: Generate a set of all pixels of the to-be-processed graphic; S130: Generate a first output result set and a first neighborhood threshold, and initialize the first output result set; the generating the first output result set and the first neighborhood threshold includes: establishing a first output result set Q, the first output result set is used as the output result of the last retained pixel point, that is, the pixel point coordinates finally included in the first output result set are the filled Braille convex image for use by the visually impaired; specifically, the first output result set Q initially established is an empty set, and the first neighborhood threshold is pre-set to L; S140: Acquire the outermost contour pixel point set of the to-be-processed graphic based on all pixel point sets of the to-be-processed graphic; S150: Based on the outermost contour pixel point set, a convex point map result set of the outermost contour is obtained by using a Braille convex map generation method, and the result set is used as a second output result set, including: S1501 generates a second output result set and a second neighborhood threshold, and initializes the second output result set; S1502: obtaining a neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; S1503: obtaining edge points and / or inflection points included in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the neighborhood space of each pixel point in the outermost contour pixel point set P3, and storing the pixel point coordinates corresponding to the edge points and / or inflection points in a second set; S1504: storing the pixel coordinates corresponding to the edge points and / or inflection points included in the second set in the second output result set, deleting the neighborhood space of the edge points and / or inflection points in the outermost contour pixel point set P3, and synchronously updating the outermost contour pixel point set P3; S1505: repeating steps S1502 to S1504 until the outermost contour pixel set P3 is an empty set, and outputting a final second output result set Q3; S160: Integrate the second output result set into the first output result set; S170: performing an erosion operation on the to-be-processed graphic based on the first neighborhood threshold to delete the outermost contour pixels and the related neighborhood of the to-be-processed graphic; S180: Repeat steps S140-S170 until all pixels in the to-be-processed graph are processed, and output a first output result set; S190: Filling the Braille convex image based on the first output result set.
2. The method for filling a convex image of Braille according to claim 1, characterized in that: The step of obtaining the outermost contour pixel point set of the to-be-processed graphic based on all pixel point sets of the to-be-processed graphic comprises: Performing an erosion operation on the image to be processed, corroding a layer of pixels inward based on the outermost layer of pixels; Get the set of pixels after corrosion; The outermost contour pixel point set of the to-be-processed graphic is obtained based on all pixel point sets of the to-be-processed graphic and the eroded pixel point set.
3. The method for filling a convex image of Braille according to claim 2, characterized in that: The step of obtaining the outermost contour pixel point set of the to-be-processed graphic based on all pixel point sets of the to-be-processed graphic and the eroded pixel point set comprises: Wherein, P3 is the set of outermost contour pixels, P is the set of all pixels of the graphics to be processed, P2 is the set of pixels after corrosion, i∈n, j∈m, n is a positive integer greater than or equal to 1, m is a positive integer greater than or equal to 1, and the graphics to be processed contain n*m pixels.
4. The method for filling a convex image of Braille according to claim 1, characterized in that: The step of integrating the second output result set into the first output result set comprises: merging the second output result set into the first output result set; Q = Q ∪ Q3; Wherein, Q is the first output result set, and Q3 is the second output result set.
5. The method for filling a convex image of Braille according to claim 1, characterized in that: The performing an erosion operation on the to-be-processed graphic based on the first neighborhood threshold to delete the outermost contour pixel points and the related neighborhood of the to-be-processed graphic comprises: Perform an erosion operation on the graphics to be processed, taking the outermost contour pixels as the reference and eroding 3*L layers of pixels inwards; Where L is the first neighborhood threshold.
6. The method for filling a convex image of Braille according to claim 1, characterized in that: Repeating steps S140-S170 until all pixels in the to-be-processed graph are processed, and outputting a first output result set includes: If there are still remaining pixels in the image to be processed that have not been processed, then steps S140-S170 are repeated; If all pixels in the to-be-processed graphics have been processed, then a final first output result set is output.
7. The method for filling a convex image of Braille according to claim 4, characterized in that: The step of obtaining the neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3 comprises: For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the set of points whose Euclidean distance to the pixel point is less than the second neighborhood threshold, and obtain the subset neighborhood U of the outermost contour pixel point set P3. i,j ; The subset neighborhood U of the outermost contour pixel set P3 i,j ={(a,b)∈P3|(ai) 2 + (b-j) 2 <l 2 }; The second neighborhood threshold is set to 1.
8. The method for filling a convex image of Braille according to claim 7, characterized in that: The step of obtaining edge points and / or inflection points included in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the neighborhood space of each pixel point in the outermost contour pixel point set P3, and storing the pixel point coordinates corresponding to the edge points and / or inflection points in the second set comprises: For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C1 in the first quadrant with it as the origin: C1 i,j ={(a,b)∈U i,j |a>i&&b<j}; For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C2 in the second quadrant with it as the origin: C2 i,j ={(a,b)∈U i,j |a>i&&b>j}; For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C3 in the third quadrant with it as the origin: C3 i,j ={(a,b)∈U i,j |a<i&&b> j}; For each pixel point (i, j) in the outermost contour pixel point set P3, calculate the neighborhood space pixel point subset C4 in the fourth quadrant with it as the origin: C4 i,j ={(a,b)∈U i,j |a<i&&b<j}; For each pixel point (i, j) in the outermost contour pixel point set P3, when at least two of the subsets corresponding to the neighborhood space pixel point subsets C1, C2, C3 and C4 are empty, the pixel point is an edge point or an inflection point, and the pixel point coordinates corresponding to the edge point and / or inflection point exist in the second set K: K={(i,j)∈P|C1 i,j , C2 i,j , C3 i,j , C4 i,j At least 2 of them are empty sets}.
9. A device for filling convex images of Braille, characterized in that: The device comprises: An acquisition unit, adapted to acquire graphics to be processed; A pixel point set generating unit, adapted to generate all pixel point sets of the graphics to be processed; The initialization unit is adapted to generate a first output result set and a first neighborhood threshold, and initialize the first output result set. Specifically, the generating of the first output result set and the first neighborhood threshold comprises: establishing a first output result set Q, the first output result set being used as the output result of the last retained pixel point, that is, the pixel point coordinates finally included in the first output result set are the filled Braille convex image for use by the visually impaired; specifically, the first output result set Q initially established is an empty set, and the first neighborhood threshold is pre-set to L; A unit for generating a pixel point set of the outermost contour of a to-be-processed graphic is adapted to obtain a pixel point set of the outermost contour of the to-be-processed graphic based on all pixel point sets of the to-be-processed graphic; A second output result set generating unit is adapted to obtain a convex dot map result set of the outermost contour based on the outermost contour pixel point set by using a Braille convex map generating method, and use it as a second output result set, including: generating a second output result set and a second neighborhood threshold, and initializing the second output result set; obtaining a neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the second neighborhood threshold, and generating a subset neighborhood of the outermost contour pixel point set P3; obtaining a neighborhood space of each pixel point in the outermost contour pixel point set P3 based on the outermost contour pixel point set P3 and the outermost contour The neighborhood space of each pixel point in the pixel point set P3 obtains the edge points and / or inflection points included in the outermost contour pixel point set P3, and the pixel point coordinates corresponding to the edge points and / or inflection points are stored in the second set; the pixel point coordinates corresponding to the edge points and / or inflection points included in the second set are stored in the second output result set, and the neighborhood space of the edge points and / or inflection points is deleted in the outermost contour pixel point set P3, and the outermost contour pixel point set P3 is updated synchronously; the above steps are repeated until the outermost contour pixel point set P3 is an empty set, and the final second output result set Q3 is output; an integration unit, adapted to integrate the second output result set into the first output result set; A deleting unit, adapted to perform an erosion operation on the to-be-processed graphic based on the first neighborhood threshold to delete the outermost contour pixels and the related neighborhood of the to-be-processed graphic; The first output result set output unit is adapted to switch to the outermost contour pixel point set generating unit for the to-be-processed graphic until all the pixel points in the to-be-processed graphic are processed and the first output result set is output; A filling unit is adapted to fill the Braille convex image based on the first output result set.
Citation Information
Patent Citations
Method and device for complex braille dot pattern drafting and embedded character input
CN105844679A
Braille-based image registration method
CN110310311A