Image noise reduction method, device, terminal equipment and readable storage medium
By pre-recognizing images and identifying and removing edge noise areas, the problem of edge noise affecting image recognition in the existing technology is solved, and the accuracy and fault tolerance of image recognition are improved.
Patent Information
- Application Number
- CN201910857322.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-10
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2039-09-12
Smart Images

Figure CN110544223B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, apparatus, terminal device and readable storage medium for image noise reduction. Background Art
[0002] With the development of computer technology, human society has entered the information age. Information exists in all aspects of people's lives. For example, images contain a lot of information. At present, people use image recognition technology in artificial intelligence technology to identify the information contained in images.
[0003] Due to various reasons, there are often some noise points in the image, which will affect the image recognition results. Therefore, in order to ensure the accuracy of the image recognition results, it is necessary to remove these noise points as much as possible before recognizing the image.
[0004] At present, some commonly used image denoising methods include grayscale processing and binarization processing. Although they can achieve the purpose of denoising, they are not very effective because they can only remove some conventional noise points. Summary of the invention
[0005] The embodiments of the present application provide a method, apparatus, terminal device and readable storage medium for image denoising, which are used to remove unconventional noise points in an image and improve the error tolerance and accuracy of image recognition.
[0006] In view of this, a first aspect of an embodiment of the present application provides a method for image noise reduction, comprising:
[0007] Get the image to be processed;
[0008] Pre-identifying the image to be processed to obtain a target area containing target information;
[0009] If the target area coincides with a boundary of the image to be processed, the target area is determined as an edge noise area;
[0010] Eliminate edge noise areas in the image to be processed.
[0011] A second aspect of an embodiment of the present application provides an image noise reduction device, including:
[0012] A first acquisition unit, used for acquiring an image to be processed;
[0013] A pre-recognition unit, used for pre-recognizing the image to be processed to obtain a target area containing target information;
[0014] a determination unit, configured to determine the target area as an edge noise area if the target area coincides with a boundary of the image to be processed;
[0015] The elimination unit is used to eliminate edge noise areas in the image to be processed.
[0016] In a first implementation manner of the second aspect of the embodiment of the present application, the device further includes: a first acquisition unit, configured to acquire position information of the target area in the image to be processed;
[0017] A judging unit is used to judge whether the target area coincides with a boundary of the image to be processed according to the position information.
[0018] In a second implementation manner of the second aspect of the embodiment of the present application, the target area coincides with a straight line boundary of the image to be processed;
[0019] The elimination unit is used to cut the image to be processed from the direction of the vertically overlapping straight line boundary until the edge noise area is removed.
[0020] In a third implementation manner of the second aspect of the embodiments of the present application, the target area coincides with at least two straight line boundaries of the image to be processed;
[0021] The elimination unit is used to: select a straight line boundary from the at least two straight line boundaries as a target straight line boundary;
[0022] The image to be processed is cut from a direction perpendicular to the target straight line boundary until the edge noise area is removed.
[0023] In a fourth implementation of the second aspect of the embodiment of the present application, the removal unit is further used for: during the image cutting process, if a target area that is not an edge noise area is cut out, reselecting a target straight line boundary to cut out the edge noise area.
[0024] In a fifth implementation manner of the second aspect of the embodiment of the present application, the elimination unit is used to: select a straight line boundary perpendicular to a preset direction from the at least two straight line boundaries as a target straight line boundary.
[0025] In a sixth implementation of the second aspect of the embodiments of the present application, the device further includes:
[0026] A preprocessing unit is used to perform preprocessing on the image to be processed, wherein the preprocessing includes grayscale processing and / or binarization processing.
[0027] A third aspect of an embodiment of the present application provides a terminal device, including: a memory, a transceiver, a processor, and a bus system;
[0028] Wherein, the memory is used to store programs;
[0029] The processor is used to execute the program in the memory to implement the functions of the device as described in the second aspect above.
[0030] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to implement the functions of the device described in the second aspect above.
[0031] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0032] The embodiment of the present application provides a method for image denoising, comprising: first acquiring an image to be processed; then pre-identifying the image to be processed to obtain a target area containing target information, but the target area may contain a noise area; therefore, in the embodiment of the application, if the target area coincides with the boundary of the image to be processed, the target area is determined to be an edge noise area; finally, the edge noise area in the image to be processed is removed; since the existing denoising method can only remove conventional noise but cannot remove edge noise areas, the edge noise areas have a greater interference with the image recognition results, and the method provided in the embodiment of the present application can remove the edge noise areas in the image to be processed, so it can improve the fault tolerance and accuracy of image recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a scenario in which the method for image noise reduction in an embodiment of the present application is applied;
[0034] Figure 2 This is a schematic diagram of the UI image of the game in the embodiment of the present application;
[0035] Figure 3 For Figure 2 The UI image to be identified after the UI image in the image is cut;
[0036] Figure 4 This is a schematic diagram of a first embodiment of a UI image to be identified containing edge noise in an embodiment of the present application;
[0037] Figure 5 This is a schematic diagram of a second embodiment of a UI image to be identified containing edge noise in an embodiment of the present application;
[0038] Figure 6 A schematic diagram of an embodiment of a method for image noise reduction in an embodiment of the present application;
[0039] Figure 7 This is a schematic diagram of an embodiment of a rectangular area in an embodiment of the present application;
[0040] Figure 8 This is a schematic diagram of an embodiment of an image to be processed in an embodiment of the present application;
[0041] Fig. 9 This is a schematic diagram of the output result of the Hocr mode of Tesseract in the embodiment of the present application;
[0042] Fig.10 This is a schematic diagram of an embodiment of the edge noise distribution in the embodiment of the present application;
[0043] Fig.11A This is a schematic diagram of an embodiment of a data sharing system in an embodiment of the present application;
[0044] Fig. 11B This is a schematic diagram of the structure of the blocks in the embodiment of the present application;
[0045] Fig. 11C A schematic diagram of the process of generating a new block in an embodiment of the present application;
[0046] Fig.12 A schematic diagram of an embodiment of an image noise reduction device provided in an embodiment of the present application;
[0047] Fig.13 A schematic diagram of an embodiment of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The embodiments of the present application provide a method, apparatus, terminal device and readable storage medium for image denoising, which are used to remove unconventional noise points in an image and improve the error tolerance and accuracy of image recognition.
[0049] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "corresponding to" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0050] It should be understood that the present application is applied to image recognition scenarios, and specifically, can be applied to image recognition scenarios containing non-standard font characters. Non-standard font characters are a type of font relative to some commonly used fonts such as Songti and Heiti, such as some artistic fonts often used for numbers in games, etc. It is often difficult to recognize such fonts through image recognition technology.
[0051] For example, in the automated recharge test of mobile games based on user interface (UI) recognition, it is necessary to accurately recognize various non-standard font digital characters in the game, such as Figure 1 As shown, the image schematic diagram of the digital characters with non-standard fonts in the embodiments of the present application. In Figure 1 , the number "31214" is in non-standard font. In the automated recharge test, it is necessary to recognize the non-standard font "31214" based on the Figure 1 shown UI image.
[0052] To improve the recognition efficiency and recognition rate of images, the UI images to be recognized are often pre-cut, and generally the target areas containing target information are retained. For example, as Figure 2 shown, the UI image schematic diagram of the game in the embodiments of the present application. Figure 2 The UI image shown is only a part of the game UI. Before recognizing the Figure 2 shown UI image, the Figure 2 shown UI graphic will be cut. For example, if the target information is the Figure 2 number character "6032", then Figure 2 can be cut and the UI image to be recognized as shown in Figure 3 is retained. Finally, image recognition is performed on the UI image to be recognized.
[0053] However, in the actual cutting process, there are various factors that can affect the accuracy of cutting. These various factors can include: First, the change of the game UI causes the displacement of the target area, but the cutting area is not updated in time; Second, the change of the test model causes the change of the screen resolution, but the original cutting area coordinates are still used; Third, the randomly appearing dynamic UI in the game causes the target area to be blocked.
[0054] Taking the Figure 2 shown UI image as an example, during the screenshot process, due to the Figure 2 shown floating text "Your equipment is hot due to the psychic fireball" dynamically appearing in the UI where the UI image is located, the cut UI image to be recognized is as shown in Figure 4 . Figure 4 This is the first embodiment schematic diagram of the UI image to be recognized containing edge noise points in the embodiments of the present application. It can be seen that Figure 4 contains a part of the character "you" in Figure 2 , and this part of the area is the edge noise point. In addition, other UI elements may also become edge noise points in the UI image to be recognized. As Figure 5 shown, this is the second embodiment schematic diagram of the UI image to be recognized containing edge noise points in the embodiments of the present application. Figure 5There is an ornament UI element on the right side of the UI image to be identified, and the ornament UI element becomes an edge noise.
[0055] For example Figure 4 and Figure 5 The edge noise shown in the figure cannot be removed by grayscale processing, binarization processing and other noise reduction methods, and will seriously affect the final recognition results. Figure 4 Taking the UI image to be recognized as an example, the correct image recognition result should be "6032", but due to the existence of edge noise, the image recognition result may eventually become "60320".
[0056] To this end, an embodiment of the present application provides a method for image denoising, which can achieve the purpose of denoising similar to the above-mentioned edge noise, and can improve the fault tolerance and accuracy of image recognition.
[0057] For ease of understanding, please refer to Figure 6 , Figure 6 The following is a schematic diagram of an embodiment of a method for image noise reduction in an embodiment of the present application. As shown in the figure, an embodiment of the present application provides a method for image noise reduction, including:
[0058] 101, obtaining an image to be processed.
[0059] It should be noted that the acquired image to be processed is generally an image after being cut. The shape and size of the image to be processed in the embodiment of the present application are not specifically limited. Generally, the image to be processed is a rectangle.
[0060] 102, pre-identify the image to be processed to obtain a target area containing target information.
[0061] It should be noted that there are many methods for pre-recognition of the image to be processed. For example, Tesseract can be used for pre-recognition. Tesseract is an open source optical character recognition (OCR) engine that provides OCR recognition capabilities and autonomous training functions for font libraries. OCR refers to the process of analyzing and processing image files to obtain text and layout information. Tesseract's Hocr mode is a recognition result output mode. In addition to the recognition results, the output information also includes the coordinate data and confidence value of the recognized object relative to the image. Among them, the coordinate information can be expressed as (x1, x2, y1, y2), which represents the rectangular area determined by the two vertices of point (x1, y1) and point (x2, y2), such as Figure 7 As shown, a schematic diagram of an embodiment of a rectangular area in an embodiment of the present application.
[0062] In the embodiment of the present application, the target area may be one, or two or more. When there are at least two target areas, not all target areas contain target information, and there are target areas that contain edge noise but do not include target information.
[0063] by Figure 8 Take the figure to be identified as an example, Figure 8 This is a schematic diagram of an embodiment of the image to be processed in the present application. The output result of Tesseract's Hocr mode is as follows Fig. 9 As shown, Fig. 9 This is a schematic diagram of the output result of the Hocr mode of Tesseract in an embodiment of the present application. In the output result, two target areas are included, wherein the coordinate information of one target area is (13 7 22 29), and the recognition result is 1, and the coordinate information of the other target area is (34 6 93 30), and the recognition result is 320.
[0064] 103. If the target region coincides with the boundary of the image to be processed, the target region is determined as an edge noise region.
[0065] It should be noted that there are many methods for determining whether the target area coincides with the boundary of the image to be processed, and the present embodiment does not limit this. Due to the characteristic that the edge noise is located at the edge of the image to be processed, the present embodiment regards the target area that coincides with the boundary of the image to be processed as the edge noise area.
[0066] 104, removing edge noise areas in the image to be processed.
[0067] In an embodiment of the present application, there are multiple methods for removing edge noise areas. For example, the image to be processed can be directly cut so that the image to be processed does not contain edge noise areas. For another example, the edge noise area can be filled with a specific grayscale that does not interfere with the image recognition result, which can also prevent the edge noise area from affecting the recognition result.
[0068] It should be noted that after the edge noise area is removed, it may also include multiple target areas. Figure 8 For example, suppose Figure 8 The image shown is the image to be processed after the edge noise area is removed, which also includes the target areas described by "1" and "320", that is, there are two target areas. Figure 8 The digital characters shown can be identified by merging the remaining multiple target areas and using image recognition technology.
[0069] The embodiments of the present application can remove edge noise areas in the image to be processed, thereby improving the error tolerance and accuracy of image recognition, especially in image scenes containing non-standard font characters.
[0070] In order to better demonstrate the effect of the image noise reduction method in the embodiment of the present application, the noise reduction effect is explained in an application below.
[0071] In this application example, Tesseract is first used to directly Figure 5 The image to be processed is identified, and the identification result is "25058 8". Then, the image denoising method in the embodiment of the present application is used to remove the denoising image. Figure 5 The edge noise area on the right side is then identified using Tesseract, and the recognition result is 25058. It can be seen that the image denoising method provided in the embodiment of the present application can improve the accuracy of image recognition.
[0072] Based on the above description, it can be known that there are multiple methods for determining whether the target area coincides with the boundary of the image to be processed. The determination process will be described below with a specific example.
[0073] In another embodiment of the method for image noise reduction provided in the embodiment of the present application, the method further includes:
[0074] First, obtain the location information of the target area in the image to be processed.
[0075] It can be understood that the position information may be the position information of the target area relative to the image to be processed, or may be the position information of the target area and the image to be processed in the same reference system.
[0076] The location information may be coordinate information, or information represented in other forms. For example, according to the above-mentioned embodiment, the output result of the Hocr mode of Tesseract includes the coordinate information of the target area.
[0077] Then, it is determined whether the target area coincides with the boundary of the image to be processed based on the position information.
[0078] It should be noted that judging whether the boundaries overlap based on the position information is a relatively mature prior art and will not be described in detail here. For example, if the target region and the image to be processed are both rectangular, then if there is a point on the boundary of the target region with the same coordinates as a point on the boundary of the image to be processed, it means that the boundary of the target region overlaps with that of the image to be processed.
[0079] Since there are various situations in which the boundary between the target area and the image to be processed overlaps, various situations in which the boundary overlaps are overlapped will be described below with specific examples.
[0080] In another embodiment of the image denoising method provided in the embodiment of the present application, the target area coincides with a straight line boundary of the image to be processed.
[0081] For example, the image to be processed and the target area are both rectangular. Fig.10 , a schematic diagram of an embodiment of the edge noise distribution in the embodiment of the present application. Fig.10 As shown, the target area and the image to be processed are both rectangular. The target area and the image to be processed may have only one straight line boundary overlapped, the edge noise may be the top noise, that is, the target area overlaps with the upper boundary of the image to be processed; the edge noise may be the bottom noise, that is, the target area overlaps with the lower boundary of the image to be processed; the edge noise may be the left noise, that is, the target area overlaps with the left boundary of the image to be processed; the edge noise may be the right noise, that is, the target area overlaps with the right boundary of the image to be processed.
[0082] Assumptions Fig.10 The coordinate information of the upper left vertex of the image to be processed is (0,0), and the coordinate information of the lower right vertex is (W,H), where W is the width of the image to be processed and H is the height of the image to be processed. Then the coordinate information of the left edge noise area can be expressed as (0,y1,x2,y2), the coordinate information of the right edge noise area can be expressed as (x1,y1,W,y2), the coordinate information of the top edge noise area can be expressed as (x1,0,x2,y2), and the coordinate information of the bottom edge noise area can be expressed as (x1,y1,x2,H).
[0083] Eliminating edge noise areas in the image to be processed includes:
[0084] The image to be processed is cut from the direction of the vertically overlapping straight line boundary until the edge noise area is removed.
[0085] In an embodiment of the present application, edge noise areas are removed by cutting images. Specifically, pixels are cut row by row or column by column from a specific direction until the edge noise areas are removed, wherein the specific direction may be the direction of vertically overlapping straight line boundaries.
[0086] Still Fig.10 Taking the image to be processed shown as an example, for the left edge noise area, since the left edge noise area coincides with the left boundary of the image to be processed, you can choose to start cutting from the left; accordingly, for the right edge noise area, you can choose to start cutting from the right; for the top edge noise area, you can choose to start cutting from the top; for the bottom edge noise area, you can choose to start cutting from the bottom.
[0087] The above is an introduction to the case where a straight line boundary overlaps between the target region and the image to be processed. The following is an introduction to the case where at least two straight line boundaries overlap between the target region and the image to be processed.
[0088] In another embodiment of the method for image denoising provided in the embodiment of the present application, the target area coincides with at least two straight line boundaries of the image to be processed, and Fig.10 As an example, the image to be processed is Fig.10 It can be seen that when the target area is located at any of the four corners of the image to be processed, the target area coincides with the two straight line boundaries of the image to be processed. At this time, the edge noise can be called corner noise. When the target area is located at four different corners of the image to be processed, the coordinate information of the target area can be expressed as (0,0,x2,y2), (x1,0,W,y2), (0,y1,x2,H), (x1,y1,W,H) respectively.
[0089] In this case, the edge noise areas in the image to be processed are removed including:
[0090] First, a straight line boundary is selected from at least two straight line boundaries as a target straight line boundary.
[0091] It should be noted that there are many ways to select the target straight line boundary, such as random selection or selection based on actual conditions. Fig.10 Taking the image to be processed shown as an example, in actual situations, the image to be processed obtained in step 101 generally has larger margins on the left and right sides, that is, the target area of the non-edge noise area is far away from the left and right boundaries of the image to be processed. Therefore, when the edge noise area is located at the two left corners of the image to be processed, the left boundary of the image to be processed can be selected as the target straight line boundary, and when the edge noise area is located at the two right corners of the image to be processed, the right boundary of the image to be processed can be selected as the target straight line boundary.
[0092] Then the image to be processed is cut from the direction perpendicular to the target straight line boundary until the edge noise area is removed.
[0093] It should be noted that the image cutting process is the same as the image cutting process when there is only one straight line boundary in the overlapping boundaries, and the details can be understood by referring to the relevant description in the above embodiment.
[0094] However, in the process of cutting the image to be processed from the selected direction, the target area that is not the edge noise area may be cut off. Therefore, in another embodiment of the image denoising method provided in the embodiment of the present application, removing the edge noise area in the image to be processed also includes:
[0095] During the image cutting process, if the target area that is not the edge noise area is cut out, the target straight line boundary is reselected to cut out the edge noise area.
[0096] It can be understood that, assuming that there are two straight line boundaries overlapping between the target area and the image area to be processed, the first straight line boundary is selected as the target straight line boundary for cutting the image. During the cutting process, except for the target area that is not an edge noise area, the second line boundary will be selected as the target straight line boundary for re-cutting.
[0097] According to the above embodiments, there are multiple methods for selecting a target straight line boundary, and one of the methods is described below. In another embodiment of an image denoising method provided in an embodiment of the present application, selecting a straight line boundary from at least two straight line boundaries as a target straight line boundary includes:
[0098] A straight line boundary perpendicular to a preset direction is selected from at least two straight line boundaries as a target straight line boundary.
[0099] It should be noted that the target area is located in Fig.10 Taking the upper left corner as an example, that is, the edge noise is the edge noise in the upper left corner, based on the characteristic that the image to be processed obtained in step 101 generally has larger margins on the left and right sides, the preset direction can be set to the left side. Therefore, although the upper boundary and the left boundary of the target image and the image to be processed coincide, the left boundary will be selected as the target straight line boundary according to the preset direction.
[0100] The method provided in the embodiment of the present application can effectively remove edge noise areas. In order to further enhance the noise reduction effect and improve the accuracy of image recognition, conventional noise can be removed through preprocessing.
[0101] Therefore, in another embodiment of the method for image denoising provided by the embodiment of the present application, after acquiring the image to be processed and before pre-identifying the image to be processed to obtain the target area containing target information, the method further includes:
[0102] The image to be processed is preprocessed, and the preprocessing includes grayscale processing and / or binarization processing.
[0103] Since grayscale processing and binarization processing are relatively mature technologies, they will not be described in detail here.
[0104] The method provided in the embodiment of the present application can be applied to a terminal, and the terminal can be a block node device in a blockchain, that is, the terminal can be a node in a blockchain. The nodes in the blockchain are specifically introduced below.
[0105] See also Fig.11AThe data sharing system shown, the data sharing system 100 refers to a system for sharing data between nodes, and the data sharing system may include multiple nodes 101, and the multiple nodes 101 may refer to each client in the data sharing system. Each node 101 can receive input information when performing normal work, and maintain the shared data in the data sharing system based on the received input information. In order to ensure the information intercommunication within the data sharing system, there may be an information connection between each node in the data sharing system, and information can be transmitted between nodes through the above information connection. For example, when any node in the data sharing system receives input information, other nodes in the data sharing system obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.
[0106] Each node in the data sharing system has a corresponding node identifier, and each node in the data sharing system can store the node identifiers of other nodes in the data sharing system, so that the generated blocks can be broadcast to other nodes in the data sharing system according to the node identifiers of other nodes. A node identifier list as shown in the following table can be maintained in each node, and the node name and node identifier are stored in the node identifier list accordingly. Among them, the node identifier can be an IP (Internet Protocol, a protocol for interconnecting networks) address and any other information that can be used to identify the node. Table 1 only takes the IP address as an example for illustration.
[0107] Node Name Node ID Node 1 117.114.151.174 Node 2 117.116.189.145 … … Node N 119.123.789.258
[0108] Each node in the data sharing system stores the same blockchain. The blockchain consists of multiple blocks, see Fig. 11B The blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information characteristic value, version number, timestamp and difficulty value, and the block body stores the input information; the next block of the genesis block takes the genesis block as the parent block, and the next block also includes a block header and a block body. The block header stores the input information characteristic value of the current block, the block header characteristic value, version number, timestamp and difficulty value of the parent block, and so on, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.
[0109] When generating each block in the blockchain, see Fig. 11CWhen the node where the blockchain is located receives the input information, it verifies the input information. After the verification is completed, the input information is stored in the memory pool and the hash tree used to record the input information is updated. After that, the update timestamp is updated to the time when the input information is received, and different random numbers are tried to calculate the eigenvalue multiple times so that the calculated eigenvalue can satisfy the following formula:
[0110] SHA256(SHA256(version+prev_hash+merkle_root+ntime+nbits+x))<TARGET
[0111] Among them, SHA256 is the eigenvalue algorithm used to calculate the eigenvalue; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the eigenvalue of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value within a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the eigenvalue threshold, which can be determined based on nbits.
[0112] In this way, when the random number that satisfies the above formula is calculated, the information can be stored accordingly, the block header and block body can be generated, and the current block can be obtained. Subsequently, the node where the blockchain is located sends the newly generated block to other nodes in the data sharing system according to the node identification of other nodes in the data sharing system. Other nodes verify the newly generated block and add the newly generated block to the blockchain stored in them after the verification is completed.
[0113] See also Fig.12 , a schematic diagram of an embodiment of an image noise reduction device provided in an embodiment of the present application.
[0114] The present application provides an embodiment of a device for image noise reduction, including:
[0115] A first acquisition unit 201 is used to acquire an image to be processed;
[0116] A pre-recognition unit 202 is used to pre-recognize the image to be processed to obtain a target area containing target information;
[0117] A determination unit 203, configured to determine the target area as an edge noise area if the target area coincides with a boundary of the image to be processed;
[0118] The elimination unit 204 is used to eliminate edge noise areas in the image to be processed.
[0119] In another embodiment of the apparatus for image denoising provided in the embodiment of the present application, the apparatus further includes: a first acquisition unit 205, configured to acquire position information of a target area in the image to be processed;
[0120] The judging unit 206 is used to judge whether the target area coincides with the boundary of the image to be processed according to the position information.
[0121] In another embodiment of the apparatus for image denoising provided in the embodiment of the present application, the target area coincides with a straight line boundary of the image to be processed;
[0122] The elimination unit 204 is used to cut the image to be processed from the direction of the vertically overlapping straight line boundaries until the edge noise area is removed.
[0123] In another embodiment of the apparatus for image denoising provided in the embodiment of the present application, the target area coincides with at least two straight line boundaries of the image to be processed;
[0124] The elimination unit 204 is used to: select a straight line boundary from at least two straight line boundaries as a target straight line boundary;
[0125] The image to be processed is cut from the direction perpendicular to the target straight line boundary until the edge noise area is removed.
[0126] In another embodiment of the image denoising device provided in the embodiment of the present application, the removal unit 204 is further used for: during the image cutting process, if a target area that is not an edge noise area is cut out, then reselecting a target straight line boundary to cut out the edge noise area.
[0127] In another embodiment of the apparatus for image denoising provided in the embodiment of the present application, the elimination unit 204 is configured to: select a straight line boundary perpendicular to a preset direction from at least two straight line boundaries as a target straight line boundary.
[0128] In another embodiment of the device for image noise reduction provided in the embodiment of the present application, the device further includes:
[0129] The preprocessing unit 207 is used to perform preprocessing on the image to be processed, and the preprocessing includes grayscale processing and / or binarization processing.
[0130] Next, the present application embodiment also provides a terminal device, such as Fig.13For the sake of convenience, only the parts related to the embodiments of the present invention are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present invention. The attribute information display device can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), a car computer, etc., taking the attribute information display device as a mobile phone as an example:
[0131] Fig.13 FIG. 1 is a block diagram showing a portion of the structure of a mobile phone related to the attribute information display device provided by an embodiment of the present invention. Fig.13 The mobile phone includes: a radio frequency (RF) circuit 810, a memory 820, an input unit 830, a display unit 840, a sensor 850, an audio circuit 860, a wireless fidelity (WiFi) module 870, a processor 880, and a power supply 890. Those skilled in the art will understand that Fig.13 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0132] Combine the following Fig.13 The following is a detailed introduction to the various components of the mobile phone:
[0133] The RF circuit 810 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 880 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 810 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 810 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division MultS19P1856le Access, CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0134] The memory 820 can be used to store software programs and modules. The processor 880 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 820. The memory 820 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 820 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0135] The input unit 830 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 830 may include a touch panel 831 and other input devices 88. The touch panel 831, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 831 or near the touch panel 831 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 831 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 880, and can receive and execute commands sent by the processor 880. In addition, the touch panel 831 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 831, the input unit 830 may also include other input devices 88. Specifically, other input devices 88 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0136] The display unit 840 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 840 may include a display panel 841. Optionally, the display panel 841 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 831 may cover the display panel 841. When the touch panel 831 detects a touch operation on or near it, it is transmitted to the processor 880 to determine the type of touch event. Subsequently, the processor 880 provides a corresponding visual output on the display panel 841 according to the type of touch event. Although in Fig.13 In the embodiment, the touch panel 831 and the display panel 841 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 831 and the display panel 841 can be integrated to realize the input and output functions of the mobile phone.
[0137] The mobile phone may also include at least one sensor 850, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 841 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0138] The audio circuit 860, the speaker 861, and the microphone 862 can provide an audio interface between the user and the mobile phone. The audio circuit 860 can transmit the received audio data to the speaker 861 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and converted into audio data, and then the audio data is output to the processor 880 for processing, and then sent to another mobile phone through the RF circuit 810, or the audio data is output to the memory 820 for further processing.
[0139] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 870. It provides users with wireless broadband Internet access. Fig.13 A WiFi module 870 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0140] The processor 880 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 820, and calling data stored in the memory 820. Optionally, the processor 880 may include one or more processing units; optionally, the processor 880 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 880.
[0141] The mobile phone also includes a power supply 890 (such as a battery) for supplying power to various components. Optionally, the power supply can be logically connected to the processor 880 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0142] Although not shown, the mobile phone may also include a camera module, a Bluetooth module, etc., which will not be described in detail here.
[0143] In the embodiment of the present invention, the processor 880 included in the terminal device also has the function of the image noise reduction device in the aforementioned embodiment.
[0144] The embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer implements the functions of the image noise reduction device in the aforementioned embodiment.
[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0146] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0150] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for image denoising, characterized in that: include: Acquire an image to be processed, wherein the image to be processed is an image after being cut; Pre-identifying the image to be processed to obtain a target area containing target information; If the target area coincides with a boundary of the image to be processed, the target area is determined as an edge noise area; Eliminate edge noise areas in the image to be processed.
2. The method according to claim 1, characterized in that Also includes: Acquire the position information of the target area in the image to be processed; It is determined whether the target area coincides with a boundary of the image to be processed according to the position information.
3. The method according to claim 1 or 2, characterized in that: The target area coincides with a straight line boundary of the image to be processed; The removing of edge noise areas in the image to be processed comprises: The image to be processed is cut from the direction of the vertically overlapping straight line boundary until the edge noise area is removed.
4. The method according to claim 1 or 2, characterized in that: The target area coincides with at least two straight line boundaries of the image to be processed; The removing of edge noise areas in the image to be processed comprises: Selecting a straight line boundary from the at least two straight line boundaries as a target straight line boundary; The image to be processed is cut from a direction perpendicular to the target straight line boundary until the edge noise area is removed.
5. The method according to claim 4, characterized in that The removing of edge noise areas in the image to be processed further comprises: During the image cutting process, if a target area that is not an edge noise area is cut out, a target straight line boundary is reselected to cut out the edge noise area.
6. The method according to claim 4, characterized in that The selecting a straight line boundary from the at least two straight line boundaries as a target straight line boundary comprises: A straight line boundary perpendicular to a preset direction is selected from the at least two straight line boundaries as a target straight line boundary.
7. The method according to claim 1, characterized in that Applied to terminals, which are block node devices in the blockchain.
8. An image noise reduction device, characterized in that: include: A first acquisition unit is used to acquire an image to be processed, wherein the image to be processed is an image after being cut; A pre-recognition unit, used for pre-recognizing the image to be processed to obtain a target area containing target information; a determination unit, configured to determine the target area as an edge noise area if the target area coincides with a boundary of the image to be processed; The elimination unit is used to eliminate edge noise areas in the image to be processed.
9. The device according to claim 8, characterized in that The first acquisition unit is further used to acquire position information of the target area in the image to be processed; The device also includes: A judging unit is used to judge whether the target area coincides with a boundary of the image to be processed according to the position information.
10. The device according to claim 8 or 9, characterized in that The target area coincides with a straight line boundary of the image to be processed; The rejection unit is used for: The image to be processed is cut from the direction of the vertically overlapping straight line boundary until the edge noise area is removed.
11. The device according to claim 8 or 9, characterized in that The target area coincides with at least two straight line boundaries of the image to be processed; The rejection unit is used for: Selecting a straight line boundary from the at least two straight line boundaries as a target straight line boundary; The image to be processed is cut from a direction perpendicular to the target straight line boundary until the edge noise area is removed.
12. The device according to claim 11, characterized in that The rejection unit is further used for: During the image cutting process, if a target area that is not an edge noise area is cut out, a target straight line boundary is reselected to cut out the edge noise area.
13. The device according to claim 11, characterized in that The rejection unit is further used for: A straight line boundary perpendicular to a preset direction is selected from the at least two straight line boundaries as a target straight line boundary.
14. A terminal device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is configured to execute the program in the memory to perform the method according to any one of claims 1 to 7.
15. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image segmentation method and mobile terminal
CN107507239A
Image processing method, terminal equipment and storage medium
CN107818551A
Image noise point identification method, server and storage medium
CN110047083A
Image processing method and device
CN110097570A
Method and device for removing undesired boundary picture element in area division
JP1994004674A
