Filter element anti-counterfeiting mark identification method and related device
By dividing and compressing the image blocks of the anti-counterfeiting mark image of the filter element, the anti-counterfeiting detection of the filter element is realized, which solves the problem of high identification cost in the existing technology and reduces the cost of using the processor.
Patent Information
- Application Number
- CN202310883978.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-18
- Publication Date
- 2025-01-21
AI Technical Summary
In the prior art, filter element anti-counterfeiting identification requires processors with large processing capabilities, resulting in higher costs.
By obtaining the anti -counterfeit identification image of the filter element, it is divided into at least one image block, and based on the compressed block corresponding to each image block, the compressed image of the anti -counterfeiting image image of the filter element is obtained, and the compressed image is identified to achieve the anti -counterfeit detection of the filter element.
The cost of anti-counterfeiting identification of the filter element is reduced. The identification can be achieved by using a processor with smaller processing power, and the price is lower.
Smart Images

Figure CN119338474A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of household electrical appliances, and in particular to a method for identifying an anti-counterfeiting mark of a filter element and a related device. Background Art
[0002] The filter element is an important part of the water purification equipment. Counterfeit filter elements will not only affect the reputation of the merchant, but also cause harm to the user's health if the counterfeit filter element is unqualified. Therefore, anti-counterfeiting identification of the filter element is essential. However, anti-counterfeiting identification of the filter element often requires a processor with a large processing power to achieve, resulting in a high cost for anti-counterfeiting identification of the filter element. Summary of the invention
[0003] The main technical problem solved by the present application is to provide a method for identifying the anti-counterfeiting mark of a filter element and a related device, which can perform anti-counterfeiting detection on the filter element and save costs.
[0004] In order to solve the above-mentioned technical problems, the first aspect of the present application provides a method for identifying an anti-counterfeiting mark of a filter element, the method comprising: obtaining an anti-counterfeiting mark image of a filter element, wherein the anti-counterfeiting mark image of the filter element is obtained by photographing a filter element to be identified loaded on the filtering device by a camera element on the filtering device; based on the storage space of a processor in the filtering device, dividing the anti-counterfeiting mark image of the filter element into at least one image block; based on the compression blocks corresponding to each image block, obtaining a compressed image corresponding to the anti-counterfeiting mark image of the filter element; identifying the compressed image to obtain an identification result indicating whether the filter element to be identified is counterfeit.
[0005] Among them, before dividing the filter element anti-counterfeiting mark image into at least one image block based on the memory space of the processor in the filtering device, it also includes: determining the cropping coordinates based on the relative position of the camera element and the filter element to be identified in the filtering device; based on the cropping coordinates, cropping image data from the image captured by the camera element to obtain the filter element anti-counterfeiting mark image.
[0006] Among them, after dividing the filter element anti-counterfeiting mark image into at least one image block based on the memory space of the processor in the filtering device, and before obtaining the compressed image corresponding to the filter element anti-counterfeiting mark image based on the compression blocks corresponding to each image block, it also includes: compressing the image block to obtain the compressed block corresponding to the image block; wherein the processor executes in parallel the acquisition of the image block from the camera element and the compression of the image block.
[0007] Before compressing the image block to obtain the compressed block corresponding to the image block, the method further includes: sequentially acquiring and caching an image block from the imaging element; compressing the image block to obtain the compressed block corresponding to the image block, including: each time an image block is acquired and cached, the image block acquired and cached last time is compressed to obtain the compressed block corresponding to the image block.
[0008] Among them, after compressing the image block to obtain the compressed block corresponding to the image block, and before obtaining the compressed image corresponding to the filter element anti-counterfeiting mark image based on the compressed block corresponding to each image block, the method also includes: detecting whether each image block has been compressed; in response to each image block having been compressed, executing the step of obtaining the compressed image corresponding to the filter element anti-counterfeiting mark image based on the compressed block corresponding to each image block; in response to the existence of an uncompressed image block, returning to execute the step of sequentially acquiring and caching an image block from the camera element.
[0009] The step of detecting whether all image blocks have been compressed includes: obtaining coordinate information of the latest compressed image block in the filter element anti-counterfeiting mark image; and determining whether all image blocks have been compressed based on the coordinate information.
[0010] The method of compressing an image block to obtain a compressed block corresponding to the image block includes: determining a binarization threshold based on the color space of the filter element anti-counterfeiting mark image; binarizing each pixel in the image block based on the binarization threshold to obtain a data block; and compressing the data block to obtain a compressed block corresponding to the data block.
[0011] Among them, the filter element anti-counterfeiting mark image is a multi-channel image, the binarization threshold includes sub-thresholds corresponding to each channel, and based on the binarization threshold, each pixel point in the image block is binarized to obtain a data block, including: for each pixel point in the image block, based on the relationship between the pixel value of the pixel point in each channel and the sub-threshold of the corresponding channel, the pixel point is binarized into a first value or a second value.
[0012] Wherein, the sub-threshold includes an upper limit value or a lower limit value; based on the relationship between the pixel value of the pixel point in each channel and the sub-threshold of the corresponding channel, the pixel point is binarized into a first value or a second value, including: in response to the pixel value of the pixel point in each channel being greater than the upper limit value, the pixel point is binarized into a first value; or, in response to the pixel value of the pixel point in each channel being less than the lower limit value, the pixel point is binarized into a second value.
[0013] Among them, the filter element anti-counterfeiting mark image is an RGB image, and the binarization threshold is determined based on the color space of the filter element anti-counterfeiting mark image, including: obtaining the pixel extreme values of each channel in the RGB color space; determining the binarization threshold based on the pixel extreme values of each channel and a preset error.
[0014] The method of compressing a data block to obtain a compressed block corresponding to the data block includes: dividing the data block into a plurality of sub-data blocks; for each sub-data block, weighting and averaging each element in the sub-data block to obtain compressed data corresponding to the sub-data block; and obtaining a compressed block using the compressed data corresponding to each sub-data block.
[0015] To solve the above technical problems, the second aspect of the present application provides an electronic device, which includes a memory and a processor coupled to each other, the memory storing program instructions; the processor includes a running memory space and a storage space, the running memory space is used to execute program instructions to implement the method provided by the first aspect above, and the storage space is used to store compressed images.
[0016] In order to solve the above-mentioned technical problems, the third aspect of the present application provides a filtering device, which includes a device body, and a main control module and a camera element integrated in the device body, the camera element is used to capture the image to be processed, and the main control module is the electronic device provided by the above-mentioned second aspect; the filtering device is loaded with a filter element, and after the filter element is loaded on the filtering device, it is located at the focal position of the camera element; the camera element is used to photograph the filter element.
[0017] To solve the above technical problem, the fourth aspect of the present application provides a computer-readable storage medium, which is used to store program instructions, and the program instructions can be executed by a processor to implement the method provided in the first aspect.
[0018] The beneficial effects of the present application are as follows: Different from the prior art, after acquiring the filter element anti-counterfeiting mark image, the present application divides the filter element anti-counterfeiting mark image into at least one image block based on the memory space of the processor; then based on the compression blocks corresponding to each of the image blocks, obtains the compressed image corresponding to the filter element anti-counterfeiting mark image; identifies the compressed image to obtain an identification result indicating whether the filter element to be identified is counterfeit, so as to realize anti-counterfeiting detection of the filter element. Furthermore, compared with identifying the filter element anti-counterfeiting mark image, identifying the compressed image of the filter element anti-counterfeiting mark image requires less processing power of the processor, and generally, processors with less processing power are less expensive, so the cost of anti-counterfeiting identification of the filter element can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of an implementation method of a filter element anti-counterfeiting mark identification method provided by the present application;
[0020] Figure 2 It is a schematic diagram of an implementation method of a data block provided by the present application;
[0021] Figure 3 It is a schematic diagram of the framework structure of an embodiment of an electronic device provided by the present application;
[0022] Figure 4 It is a schematic diagram of the framework structure of an embodiment of the filtering device provided by the present application;
[0023] Figure 5 It is a schematic diagram of a framework of an implementation scheme of a computer-readable storage medium provided in the present application. DETAILED DESCRIPTION
[0024] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] It should be noted that in the embodiments of the present application, there are descriptions involving "first", "second", etc., which are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features.
[0026] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0027] See also Figure 1 , Figure 1 It is a flow chart of an embodiment of a method for identifying an anti-counterfeiting mark of a filter element provided in the present application. Figure 2 is a schematic diagram of an implementation method of a data block provided by the present application; the method comprises:
[0028] S11: Acquire the filter element anti-counterfeiting mark image.
[0029] In one embodiment, the filter element anti-counterfeiting mark image is obtained by photographing the filter element to be identified loaded on the filtering device by the camera element on the filtering device. The filter element anti-counterfeiting mark image may include the filter element anti-counterfeiting mark; the filter element anti-counterfeiting mark is, for example, a QR code containing data information such as the production date, model, and validity period of the filter element. The filter element anti-counterfeiting mark image may also include an auxiliary identification mark, which may be a trademark of the company that produces the filter element. Furthermore, the filter element anti-counterfeiting mark image may be a multi-channel image, such as a three-channel or four-channel image.
[0030] S12: Based on the memory space of the processor in the filtering device, the filter element anti-counterfeiting mark image is divided into at least one image block.
[0031] Since the processing power of each processor is different, the filter element anti-counterfeiting mark image can be divided according to the processor's memory space to obtain at least one image block, and the data size of each image block can be less than or equal to the processor's memory space. In a specific embodiment, the processor is used to process the filter element anti-counterfeiting mark image captured by the camera element. Assuming that the size of a frame of the filter element anti-counterfeiting mark image captured by the camera element is 153k, and the processor's memory space is 16k, the filter element anti-counterfeiting mark image can be divided into 10 image blocks.
[0032] In one embodiment, the filter element anti-counterfeiting mark image can be divided according to a certain coordinate order. For example, a coordinate system is established with the pixel point in the upper left corner of the filter element anti-counterfeiting mark image as the origin, an X-axis is established toward the upper right corner of the filter element anti-counterfeiting mark image, and a Y-axis is established toward the lower left corner of the filter element anti-counterfeiting mark image. Assuming that the filter element anti-counterfeiting mark image contains 320*240 pixels, it can be considered that the length of the filter element anti-counterfeiting mark image on the X-axis is 320, and the length on the Y-axis is 240. Each image block obtained by dividing the filter element anti-counterfeiting mark image contains the coordinate information of the image block in the coordinate system. For example, the length of the first image block is 10*10, and the coordinate range it contains is (0, 0) to (9, 9).
[0033] Among them, the filter element anti-counterfeiting mark image can be a captured image obtained by a camera element; it can also be obtained by cropping the captured image. For example, if the captured image contains a large number of blank areas or invalid information, it can be cropped. In a specific embodiment, the cropping coordinates can be determined based on the relative position of the camera element and the filter element to be identified in the filtering device; based on the cropping coordinates, the image data is cropped from the captured image of the camera element to obtain the filter element anti-counterfeiting mark image. That is, the positions of the camera element and the filter element are fixed, and the processor knows the coordinate range of the auxiliary identification mark and the filter element anti-counterfeiting mark in the captured image, and can be cropped according to the coordinate range to obtain the filter element anti-counterfeiting mark image.
[0034] S13: Based on the compressed blocks corresponding to the image blocks, a compressed image corresponding to the filter element anti-counterfeiting mark image is obtained.
[0035] In one embodiment, after obtaining at least one image block, one image block can be input into the processor at a time, and the processor compresses the image block to obtain a compressed block corresponding to the image block; at this time, the processor can execute the steps of obtaining the image block from the camera element and compressing the image block in parallel. In other embodiments, the image block can also be sent to other compression devices, which compress the image block to obtain a compressed block corresponding to the image block, and send the compressed block corresponding to the image block to the processor of the filtering device.
[0036] Among them, compressing the image block includes: binarizing the image block to obtain a data block; compressing the data block to obtain a compressed block corresponding to the data block. Specifically, the image block can be binarized according to the existing binarization method to obtain a data block. Depending on the RGB data format, the data in the data block is different. For example, if the RGB data format is RGB24, each data in the data block obtained after binarization can be 0 or 255; if the RGB data format is RGB16, each data in the data block obtained after binarization can be the pixel extreme value of the corresponding channel; the pixel extreme value of the R channel is 0 or 255 / 8, the pixel extreme value of the G channel is 0 or 255 / 4, and the pixel extreme value of the B channel is 0 or 255 / 8.
[0037] In another embodiment, the binarization threshold can also be determined based on the color space of the filter element anti-counterfeiting mark image; based on the binarization threshold, each pixel in the image block is binarized to obtain a data block. Specifically, the binarization threshold includes sub-thresholds corresponding to each channel, and it can be understood that the sub-thresholds corresponding to each channel can be the same or different. The sub-threshold can specifically include an upper limit value or a lower limit value. In a specific embodiment, the filter element anti-counterfeiting mark image is a three-channel image, namely, R channel, G channel, and B channel. According to the different RGB data formats, the pixel extreme values of each channel in the RGB color space are obtained. Based on the pixel extreme value and the preset error, the binarization threshold is determined. According to the pixel extreme value and the preset error of each channel, the upper limit value and the lower limit value of each channel are determined. For example, the difference between the pixel extreme value of each channel and the preset error is used as the upper limit value of each channel. When the pixel is white and the RGB data format is RGB16, the pixel extreme value of the R channel of the pixel is 255 / 8, the pixel extreme value of the G channel is 255 / 4, and the pixel extreme value of the B channel is 255 / 8. Assuming that the preset error of the R channel and the G channel is 5, and the preset error of the B channel is 10, the upper limit value of the R channel is 255 / 8-5, the upper limit value of the G channel is 255 / 4-10, and the upper limit value of the B channel is 255 / 8-5. The difference between the pixel extreme value of each channel and the preset error is used as the upper limit value of each channel. When the pixel is black and the RGB data format is RGB16, the pixel extreme value of the R channel, the G channel, and the B channel of the pixel is 0. Assuming that the preset error of the R channel, the G channel, and the B channel is 5, the lower limit values of the R channel, the G channel, and the B channel are all 10. It can be understood that the preset error can be set by the user as needed. Among them, the pixel extreme values of each channel are different according to the color. The above takes black and white as an example. In other implementations, if it is other colors, the above method can also be used to determine the sub-threshold corresponding to each channel.
[0038] Further, for each pixel in the image block, based on the relationship between the pixel value of each channel and the sub-threshold of the corresponding channel, the pixel is binarized into a first value or a second value. Specifically, it is determined whether the pixel value of each pixel in each channel is greater than the upper limit of the channel, such as determining whether the pixel value of the pixel in the R channel is greater than 255 / 8-5, whether the pixel value of the pixel in the G channel is greater than 255 / 4-10, and whether the pixel value of the pixel in the B channel is greater than 255 / 8-5; in response to the pixel value of the pixel in each channel being greater than the upper limit, the pixel is binarized into the first value; or it is determined whether the pixel value of each pixel in each channel is less than the lower limit of the channel, such as determining whether the pixel value of the pixel in the R channel is less than 10, whether the pixel value of the pixel in the G channel is less than 10, and whether the pixel value of the pixel in the B channel is less than 10, and in response to the pixel value of the pixel in each channel being less than the lower limit, the pixel is binarized into the second value. Wherein, the first value can be 0, which represents white; the second value can be 1, which represents black. It can be understood that in other embodiments, the first value and the second value can be interchangeable or can be other values, which are not specifically limited here.
[0039] In the above manner, the image block can be processed to obtain a data block, which is composed of 0s and 1s. Compared with the image block, the amount of data occupied by the data block is reduced, and the image block can be compressed.
[0040] Although the amount of data in the data block obtained by the above processing is smaller than the amount of data in the image block, there may still be a situation where the amount of data is too large. In one embodiment, the data block can also be compressed to obtain a compressed block corresponding to the data block. Specifically, the data block can be divided into a number of sub-data blocks; for each sub-data block, each element in the sub-data block is weighted and averaged to obtain compressed data corresponding to the sub-data block; and the compressed block is obtained using the compressed data corresponding to each sub-data block. The weight of each element can be set by the user, for example, the weight is set to 1.
[0041] For ease of understanding, taking a 4*4 matrix as an example, the data block can be divided into two 2*2 sub-matrices. For each element in the sub-matrix, multiply it by the corresponding weight, such as 1, and then average the results of multiplying the four elements by the weights to get the compressed data corresponding to the sub-matrix; concatenate the compressed data corresponding to the two sub-matrices to get the compressed block corresponding to the data block, and the compressed block is a 1*2 matrix. Figure 2 As shown, Figure 2 If the data block is 8*8, the data block can be divided into 16 2*2 sub-data blocks.
[0042] It can be understood that the user can set a weight matrix, and the number of elements contained in the weight matrix is equal to the number of sub-data blocks. For example, if the weight matrix contains 4 elements, the data block is divided into 4 sub-data blocks, and the number of elements in each sub-data block can be the same or different. Each element in the weight matrix is the weight of each element in the sub-data block, that is, for the same sub-data block, the weights of each element contained in it are the same when weighted; for different sub-data blocks, the weights when weighted can be the same or different. In a specific embodiment, the weight matrix can be an all-1 matrix.
[0043] By means of the above method, the data volume of the compressed block obtained by compressing the data block is greatly reduced.
[0044] After receiving the compressed blocks, the processor of the filter device combines the compressed blocks in order to obtain a compressed image corresponding to the filter element anti-counterfeiting mark image. At this time, the data volume of the compressed image has been significantly reduced compared to the filter element anti-counterfeiting mark image, and the processor can process and analyze the compressed image.
[0045] S14: Identify the compressed image to obtain an identification result indicating whether the filter element to be identified is counterfeit.
[0046] In one embodiment, the processor in the filtering device can identify the compressed image to obtain the ciphertext data corresponding to the anti-counterfeiting mark of the filter element, further decrypt the ciphertext data to obtain the plaintext data corresponding to the anti-counterfeiting mark of the filter element, and determine whether the plaintext data is consistent with the encoded data of the filter element when it leaves the factory. If they are consistent, it is determined that the filter element has not been counterfeited; otherwise, it is determined that the filter element has been counterfeited.
[0047] In another embodiment, the processor in the filtering device may also send the identified ciphertext data and the device information of the filtering device to the server, and the server decrypts the ciphertext data to obtain the plaintext data corresponding to the filter element anti-counterfeiting mark, and determines whether the filter element is associated with other filtering devices based on the plaintext data. In response to the filter element not being associated with other filtering devices, it is determined that the filter element has not been counterfeited; in response to the filter element being associated with other filtering devices, it is determined that the filter element has been counterfeited.
[0048] In other embodiments, the filter element anti-counterfeiting mark image includes an auxiliary identification mark and a filter element anti-counterfeiting mark. The processor processes the compressed image and may include determining whether the auxiliary identification mark is the same as the target identification mark, and in response to the auxiliary identification mark being the same as the target identification mark, identifying the first image data of the filter element anti-counterfeiting mark in the filter element anti-counterfeiting mark image, obtaining the ciphertext data corresponding to the filter element anti-counterfeiting mark, and sending the ciphertext data to the server.
[0049] The processor determines whether the pixel value of each pixel point in the second image data of the auxiliary identification mark in the filter element identification image is within a preset range; in response to the pixel value of each pixel point being within the preset range, the pixel value of each pixel point is converted into a grayscale value; based on whether the difference between the grayscale value and the standard grayscale value is within the preset difference range, it is determined whether the auxiliary identification mark is the same as the target identification mark; in response to the difference being within the preset difference range, it is determined that the auxiliary identification mark is the same as the target identification mark; in response to the difference not being within the preset difference range, it is determined that the auxiliary identification mark is different from the target identification mark; wherein, the standard grayscale value is obtained by grayscale processing of the image data of the target identification mark, and the preset range is set by the user according to needs.
[0050] If the auxiliary identification mark is the same as the target identification mark, the ciphertext data is decrypted to obtain the plaintext data corresponding to the filter element anti-counterfeiting mark; determine whether the plaintext data complies with the preset coding rules; wherein, the production information of the filter element is encoded according to the preset coding rules to obtain the plaintext data; in response to the plaintext data complying with the preset coding rules, the ciphertext data is sent to the server.
[0051] In the above method, after obtaining the filter element anti-counterfeiting mark image, the filter element anti-counterfeiting mark image is divided into at least one image block based on the memory space of the processor; then, based on the compression blocks corresponding to each of the image blocks, a compressed image corresponding to the filter element anti-counterfeiting mark image is obtained; the compressed image is identified to obtain an identification result indicating whether the filter element to be identified is counterfeit, so as to realize anti-counterfeiting detection of the filter element. Furthermore, compared with identifying the filter element anti-counterfeiting mark image, identifying the compressed image of the filter element anti-counterfeiting mark image requires less processing power of the processor, and generally, processors with less processing power are less expensive, so the cost of anti-counterfeiting identification of the filter element can be reduced.
[0052] In the above implementation, the processor in the filtering device can sequentially acquire and cache an image block from the camera element. Each time an image block is acquired and cached, the image block acquired and cached last time is compressed to obtain a compressed block corresponding to the image block. After compressing the image block to obtain the compressed block corresponding to the image block, and before obtaining the compressed image corresponding to the filter element anti-counterfeiting mark image based on the compressed block corresponding to each image block, it also includes: detecting whether each image block has been compressed, specifically, obtaining the coordinate information of the latest compressed image block in the filter element anti-counterfeiting mark image; based on the coordinate information, determining whether each image block has been compressed, because the processor knows the coordinate range of the filter element anti-counterfeiting mark image, by judging whether the coordinates within the coordinate range have been acquired, it can be determined whether the image block has been compressed; in response to each image block being compressed, the compressed block corresponding to each image block is executed to obtain the compressed image corresponding to the filter element anti-counterfeiting mark image; in response to the existence of an uncompressed image block, returning to the step of sequentially acquiring and caching an image block from the camera element.
[0053] See also Figure 3 , Figure 3 It is a schematic diagram of the framework structure of an embodiment of an electronic device provided in the present application.
[0054] The electronic device 30 may be a filtering device, a main control module in the filtering device, or a server, that is, the electronic device 30 may execute any of the above methods. Specifically, the electronic device may include a memory 31 and a processor 32 coupled to each other, the memory 31 stores program instructions; the processor 32 includes a running memory space and a storage space, the storage space is used to store compressed images; the running memory space is used to execute the program instructions stored in the memory 31 to implement any of the above methods.
[0055] Among them, the processor 32 can also be called a CPU (Central Processing Unit). The processor 32 may be an integrated circuit chip with signal processing capabilities. The processor 32 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 32 can be implemented by an integrated circuit chip.
[0056] See also Figure 4 , Figure 4 It is a schematic diagram of the framework structure of an embodiment of the filtering device provided in the present application.
[0057] The filtering device 40 may include a device body 41, a camera element 42 integrated in the device body 41, and a main control module 44. The camera element 42 and the main control module 44 are in communication connection. The camera element 42 is used to capture the image of the anti-counterfeiting mark of the filter element. The main control module 44 may be the above-mentioned electronic device. The filtering device 40 is also equipped with a filter element, which may be specifically installed on the device body 41. In a specific embodiment, the filter element is located at the focal length position of the camera element after being loaded on the filtering device; the camera element is used to capture the filter element.
[0058] See also Figure 5 , Figure 5 It is a schematic diagram of a framework of an implementation scheme of a computer-readable storage medium provided in the present application.
[0059] The computer-readable storage medium 50 stores program instructions 51 , and when the program instructions 51 are executed by a processor, they are used to implement the steps in any of the above method embodiments.
[0060] The computer-readable storage medium 50 may specifically be a medium that can store computer programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or may be a server that stores the computer program. The server may send the stored computer program to other devices for execution, or may also execute the stored computer program itself.
[0061] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0062] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for identifying an anti-counterfeiting mark of a filter element, characterized in that: include: Acquire a filter element anti-counterfeiting mark image, wherein the filter element anti-counterfeiting mark image is obtained by photographing the filter element to be identified loaded on the filtering device by a camera element on the filtering device; Based on the storage space of the processor in the filtering device, dividing the filter element anti-counterfeiting mark image into at least one image block; Based on the compressed blocks corresponding to the image blocks, a compressed image corresponding to the filter element anti-counterfeiting mark image is obtained; The compressed image is identified to obtain an identification result indicating whether the filter element to be identified is counterfeit.
2. The method according to claim 1, characterized in that Before dividing the filter element anti-counterfeiting mark image into at least one image block based on the storage space of the processor in the filtering device, the method further includes: Determining the clipping coordinates based on the relative position of the imaging element in the filtering device and the filter element to be identified; Based on the clipping coordinates, image data is clipped from the image captured by the imaging element to obtain the filter element anti-counterfeiting mark image.
3. The method according to claim 1, characterized in that After dividing the filter element anti-counterfeiting mark image into at least one image block based on the storage space of the processor in the filtering device, and before obtaining the compressed image corresponding to the filter element anti-counterfeiting mark image based on the compressed blocks corresponding to the image blocks, the method further includes: The image block is compressed to obtain a compressed block corresponding to the image block; wherein the processor executes acquiring the image block from the imaging element and compressing the image block in parallel.
4. The method according to claim 3, characterized in that: Before compressing the image block to obtain a compressed block corresponding to the image block, the method further includes: Sequentially acquiring and buffering the image blocks from the imaging elements; The step of compressing the image block to obtain a compressed block corresponding to the image block includes: Each time an image block is acquired and cached, the step of compressing the image block to obtain a compressed block corresponding to the image block is performed on the image block acquired and cached last time.
5. The method according to claim 4, characterized in that After compressing the image block to obtain a compressed block corresponding to the image block, and before obtaining a compressed image corresponding to the filter element anti-counterfeiting mark image based on the compressed blocks corresponding to each of the image blocks, the method further includes: Detecting whether each of the image blocks has been compressed; In response to the image blocks being compressed, the step of obtaining a compressed image corresponding to the filter element anti-counterfeiting mark image based on the compressed blocks corresponding to the image blocks is performed; In response to the existence of an uncompressed image block, the step of sequentially acquiring and buffering an image block from the imaging element is returned to execution.
6. The method according to claim 5, characterized in that The detecting whether each of the image blocks has been compressed comprises: Obtaining coordinate information of the latest compressed image block in the filter element anti-counterfeiting mark image; Based on the coordinate information, it is determined whether each of the image blocks has been compressed.
7. The method according to claim 1, characterized in that The step of compressing the image block to obtain a compressed block corresponding to the image block includes: Determining a binarization threshold based on the color space of the filter element anti-counterfeiting mark image; Based on the binarization threshold, binarize each pixel in the image block to obtain the data block; The data block is compressed to obtain a compressed block corresponding to the data block.
8. The method according to claim 7, characterized in that The filter element anti-counterfeiting mark image is a multi-channel image, the binarization threshold includes sub-thresholds corresponding to each channel respectively, and based on the binarization threshold, each pixel point in the image block is binarized respectively to obtain the data block, including: For each pixel in the image block, based on the relationship between the pixel value of the pixel in each channel and the sub-threshold value corresponding to the channel, the pixel is binarized into a first value or a second value.
9. The method according to claim 8, characterized in that The sub-threshold includes an upper limit value or a lower limit value; Binarizing the pixel point into a first value or a second value based on the relationship between the pixel value of the pixel point in each channel and the sub-threshold value corresponding to the channel includes: In response to the pixel value of the pixel point in each channel being greater than the upper limit value, binarizing the pixel point into the first value; Or, in response to the pixel value of the pixel point in each channel being less than the lower limit value, the pixel point is binarized into the second value.
10. The method according to claim 7, characterized in that The filter element anti-counterfeiting mark image is an RGB image, and determining the binarization threshold based on the color space of the filter element anti-counterfeiting mark image includes: Get the pixel extreme value of each channel in the RGB color space; The binarization threshold is determined based on the pixel extreme values of each channel and a preset error.
11. The method according to claim 6, characterized in that The step of compressing the data block to obtain a compressed block corresponding to the data block includes: Dividing the data block into a plurality of sub-data blocks; For each of the sub-data blocks, weighting each element in the sub-data block and averaging it to obtain compressed data corresponding to the sub-data block; The compressed block is obtained by using the compressed data corresponding to each of the sub-data blocks.
12. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, the memory storing program instructions; the processor comprises a running memory space and a storage space, the running memory space is used to execute the program instructions to implement the method described in any one of claims 1-11, and the storage space is used to store compressed images.
13. A filtering device, characterized in that: It includes a device body, and a main control module and a camera element integrated in the device body, wherein the camera element is used to capture an image of an anti-counterfeiting mark on a filter element, and the main control module is the electronic device described in claim 12; a filter element is loaded on the filtering device, and the filter element is located at the focal position of the camera element after being loaded on the filtering device; the camera element is used to capture the filter element.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program instructions, and the program instructions can be executed by a processor to implement the method according to any one of claims 1 to 11.
Citation Information
Cited By
Anti-counterfeiting identification method for filter element, and related apparatus
EP4708176A1
Anti-counterfeiting identification method for filter element, and related apparatus
WO2025016437A1