Image detection processing method and device
By performing multiple rotations and feature comparisons on the object texture image, the accuracy problem caused by different shooting angles in texture image detection is solved, and the detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411162707.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-20
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art has inaccurate results in texture image detection due to different shooting angles in object image detection, making it difficult to improve detection efficiency and accuracy.
By rotating the texture image of the object to be detected, determining multiple rotation angles, and performing texture feature extraction and comparison, determining the target rotation angle, and then performing secondary image rotation and feature comparison, the accuracy of the detection results is improved.
It improves the accuracy and efficiency of texture image detection, enhances the success rate of object information recognition, and solves the problem of error in texture image detection results.
Smart Images

Figure CN118968092A_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese invention patent application with the application date of February 20, 2024, application number CN202410190255.2, and name “Image Detection and Processing Method and Device”. Technical Field
[0002] This document relates to the field of image processing technology, and in particular to an image detection and processing method and device. Background Art
[0003] With the popularization of the Internet and the continuous development of image processing technology, online identification and detection of objects with the help of image processing technology has become a common means of implementation. In this case, various forms of object detection and identification services with image processing as the core have emerged. One of the important ones is to collect surface texture images of objects and identify objects based on the surface texture of the objects, including identification of object information or identification of object types. As more and more service providers provide object detection and identification services, the competition surrounding the efficiency and accuracy of object detection and identification is becoming increasingly fierce. Summary of the invention
[0004] One or more embodiments of the present specification provide an image detection and processing method, comprising: obtaining a texture image of an object to be detected, and determining multiple rotation angles for image rotation. Rotating the texture image according to each rotation angle, and extracting texture features from the obtained rotated image to obtain texture features. Comparing the texture features of each texture feature with a preset texture feature, and determining a target rotation angle based on the comparison result. Performing a secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image. Comparing the texture features of each secondary rotated image with the preset texture feature, and determining an image detection result based on the comparison result.
[0005] One or more embodiments of the present specification provide an image detection and processing device, including: a rotation angle determination module, configured to obtain a texture image of an object to be detected, and determine multiple rotation angles for image rotation. An image rotation module, configured to rotate the texture image according to each rotation angle, and extract texture features from the obtained rotated image to obtain texture features. A first texture feature comparison module, configured to compare each texture feature with a preset texture feature, and determine a target rotation angle based on the comparison result. A secondary image rotation module, configured to perform a secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image. A second texture feature comparison module, configured to compare the texture features of each secondary rotated image with the preset texture feature, and determine the image detection result based on the comparison result.
[0006] One or more embodiments of the present specification provide an image detection processing device, including: a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed, the processor: obtains a texture image of an object to be detected, and determines multiple rotation angles for image rotation. Performs image rotation on the texture image according to each rotation angle, and extracts texture features from the obtained rotated image to obtain texture features. Performs texture feature comparison on each texture feature with a preset texture feature, and determines a target rotation angle based on the comparison result. Performs secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image. Performs texture feature comparison on the texture features of each secondary rotated image with the preset texture feature, and determines an image detection result based on the comparison result.
[0007] One or more embodiments of the present specification provide a computer-readable storage medium for storing computer-executable instructions, which implement the following process when executed by a processor: obtain a texture image of the object to be detected, and determine multiple rotation angles for image rotation. Perform image rotation on the texture image according to each rotation angle, and extract texture features from the obtained rotated image to obtain texture features. Perform texture feature comparison on each texture feature with a preset texture feature, and determine a target rotation angle based on the comparison result. Perform secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image. Perform texture feature comparison on the texture features of each secondary rotated image with the preset texture feature, and determine the image detection result based on the comparison result. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
[0009] Figure 1 A schematic diagram of an implementation environment of an image detection and processing method provided in one or more embodiments of this specification;
[0010] Figure 2 A processing flow chart of an image detection processing method provided by one or more embodiments of this specification;
[0011] Figure 3 A schematic diagram of a texture image of an object to be detected provided in one or more embodiments of this specification;
[0012] FIG. 4A to FIG. 4DA schematic diagram of a rotating image of an object to be detected provided in one or more embodiments of this specification;
[0013] Figure 5 A processing flow chart of an image detection processing method applied to an authenticity detection scenario provided by one or more embodiments of this specification;
[0014] Figure 6 A processing flow chart of an image detection processing method applied to an object identity detection scenario provided by one or more embodiments of this specification;
[0015] Figure 7 A schematic diagram of an image detection and processing device embodiment provided for one or more embodiments of this specification;
[0016] Figure 8 A schematic diagram of the structure of an image detection and processing device provided in one or more embodiments of this specification. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0018] The image detection processing method provided in one or more embodiments of this specification can be applied to the implementation environment of object image detection. Figure 1 , the implementation environment at least includes:
[0019] The server 101 for performing texture detection processing on the texture image of the object to be detected, and the access terminal 102 for collecting and uploading the texture image of the object to be detected, may also include a texture library 103 for storing preset texture features; wherein the server 101 may be one or more servers, a server cluster composed of several servers, or a cloud server of a cloud computing platform, for performing texture detection processing on the texture image of the object to be detected submitted by the access terminal 102;
[0020] The access terminal 102 may be a smart phone, a computer, an e-book reader, a wearable device, a device for information interaction based on AR (Augmented Reality) / VR (Virtual Reality), etc., and may also be installed with an application or a browser, through which texture images may be collected and uploaded, or through a subroutine within the application.
[0021] In the implementation environment, the access terminal 102 collects the texture image of the object to be detected, and uploads the collected texture image to the server 101 to perform texture detection processing on the object to be detected according to the texture image. After acquiring the texture image of the object to be detected, the server 101 first determines multiple rotation angles for image rotation of the object to be detected, rotates the texture image according to each rotation angle, and extracts texture features of the rotated images obtained at each rotation angle to obtain texture features of the rotated images at each rotation angle, and then compares the texture features of the rotated images at each rotation angle with preset texture features, and determines the target rotation angle according to the comparison result. Further, secondary image rotation is performed according to multiple sub-rotation angles of the target rotation angle to obtain secondary rotated images of each sub-rotation angle, and the texture features of the secondary rotated images of each sub-rotation angle are compared with preset texture features, so as to determine the image detection result of the object to be detected according to the comparison result.
[0022] One or more embodiments of an image detection processing method provided in this specification are as follows:
[0023] Reference Figure 2 The image detection and processing method provided in this embodiment specifically includes steps S202 to S210.
[0024] Step S202: Acquire a texture image of the object to be detected, and determine a plurality of rotation angles for rotating the image.
[0025] The object to be detected described in this embodiment refers to an object that is subjected to texture image detection processing. The object to be detected may be an object with texture on its surface, such as ceramic products; accordingly, the texture image of the object to be detected may be a surface texture image obtained by capturing an image of the surface texture of the object; the object to be detected may also be an object with texture on its cross section or section, and accordingly, the texture image of the object to be detected may be a cross-sectional texture image or a cross-sectional texture image obtained by capturing an image of the cross-sectional texture or cross-sectional texture of the object.
[0026] In actual applications, in the process of texture image detection based on the texture image of the object to be detected, since the shooting angle or direction of the currently acquired texture image and the pre-stored texture image used as the detection benchmark may be different, during the texture detection process, the texture image of the same object to be detected and the pre-stored texture image after texture detection processing have incorrect image detection results. In order to improve the accuracy and effectiveness of texture image detection, this embodiment performs texture feature detection processing on the basis of image rotation of the texture image. The rotation angle of the image rotation refers to the angle of horizontal rotation, vertical rotation or tilt rotation of the texture image.
[0027] In specific implementation, during the image rotation processing of the texture image, multiple rotation angles for image rotation processing can be determined based on the image indicators or image parameters of the texture image itself. In an optional implementation provided by this embodiment, multiple rotation angles for image rotation are determined, including: determining the image resolution of the texture image, and sampling the rotation angles according to the number of angle samplings corresponding to the image resolution to obtain the multiple rotation angles.
[0028] In the specific implementation process, based on the pre-configured correspondence table between image resolution and angle sampling number, the corresponding angle sampling number can be queried in the correspondence table according to the image resolution of the texture image, and the rotation angle sampling is performed according to the angle sampling number to obtain multiple rotation angles.
[0029] For example, the image resolution of the texture image is 96dpi. In the corresponding relationship table between image resolution and angle sampling number, it is found that the angle sampling number corresponding to 96dpi is 4. The sampling range of the rotation angle for horizontal image rotation is 0°-360°. Within the sampling range 0°-360°, the four rotation angles sampled are: 45°, 135°, 225°, and 315°.
[0030] For another example, the image resolution of the texture image is 300dpi. The corresponding relationship table shows that the number of angle samples corresponding to the image resolution of 96dpi is 8. The sampling range of the rotation angle for horizontal image rotation is 0°-360°. Within the sampling range of 0°-360°, 8 rotation angles are sampled: 20°, 65°, 110°, 155°, 200°, 245°, 290°, and 335°.
[0031] In another optional implementation provided by this embodiment, determining multiple rotation angles for image rotation includes: performing image quality scoring on the texture image, and sampling the rotation angles according to angle sampling intervals corresponding to the obtained quality scores to obtain the multiple rotation angles.
[0032] During the specific implementation process, the texture image can be input into a quality scoring model to obtain a quality score by performing image quality scoring on the texture image, or the quality score can be obtained by calling a quality scoring interface to perform image quality scoring on the texture image. After obtaining the quality score of the texture image, based on a pre-constructed correspondence table between quality scores and angle sampling intervals, the angle sampling interval corresponding to the quality score is queried in the correspondence table, and then rotation angle sampling is performed according to the angle sampling interval to obtain multiple rotation angles.
[0033] For example, the texture image is input into the quality scoring model for image quality scoring, and the quality score is x1. The corresponding angle sampling interval is 60° in the correspondence table between the quality score and the angle sampling interval. The sampling range of the rotation angle for horizontal image rotation is 0°-360°. Within the sampling range of 0°-360°, a rotation angle is sampled every 60°. The six rotation angles obtained after angle sampling are: 0°, 60°, 120°, 180°, 240°, and 300°.
[0034] In addition, in the process of determining the rotation angle for image rotation, the rotation angle for image rotation can also be determined based on the image detection requirements in the actual application scenario. Specifically, the number of samplings for rotation angle sampling is determined based on the texture detection accuracy of the texture image of the object to be detected, and the rotation angle sampling is performed according to the determined sampling number to obtain multiple rotation angles. Specifically, in an optional implementation manner provided by this embodiment, multiple rotation angles for image rotation are determined, including: determining the number of angle samplings according to the texture detection accuracy of the texture image, and performing rotation angle sampling according to the angle sampling number to obtain the multiple rotation angles;
[0035] The texture detection accuracy is submitted through a texture detection page, and the texture image is obtained by collecting images of the object to be detected through an image collection interface configured on the texture detection page.
[0036] During the specific implementation process, a selection control or selection interface for texture detection accuracy is configured on the texture detection page that provides texture detection service. A texture detection accuracy can be selected from the texture detection accuracy list through the selection control or selection interface. After selecting the corresponding texture detection accuracy, according to the correspondence between each texture detection accuracy and the number of angle sampling in the pre-configured texture detection accuracy list, rotation angle sampling is performed according to the number of angle sampling corresponding to the selected texture detection accuracy to obtain multiple rotation angles.
[0037] It should be noted that the three implementation methods for determining multiple rotation angles for image rotation provided above can form new implementation methods by combining features according to actual needs during the specific implementation process, and this embodiment does not limit this. For example, the image resolution of the texture image is determined, and the rotation angle sampling is performed according to the angle sampling interval corresponding to the image resolution to obtain multiple rotation angles, or the angle sampling interval is determined according to the texture detection accuracy of the texture image, and the rotation angle sampling is performed according to the angle sampling interval to obtain the multiple rotation angles; for another example, the image resolution of the texture image is determined, and the image quality of the texture image is scored to obtain a quality score, and the rotation angle sampling is performed according to the angle sampling interval corresponding to the image resolution and the quality score to obtain multiple rotation angles.
[0038] In practical applications, in order to improve the processing efficiency of texture detection on the object to be detected, and then improve the success rate of detection and processing on the object to be detected to determine the object information of the object to be detected, we can start from the process of texture image acquisition of the object to be detected before obtaining the texture image of the object to be detected, and improve the image acquisition quality of the texture image of the object to be detected by issuing the texture acquisition page of the acquisition configuration and acquisition reminder, so as to improve the texture detection processing efficiency and the success rate of object detection.
[0039] Specifically, in an optional implementation manner provided by this embodiment, before acquiring the texture image of the object to be detected, the following operations are performed:
[0040] Recognize the significant parts of the pre-stored texture image of the object to be detected to obtain the image acquisition part;
[0041] A texture acquisition page carrying the image acquisition part and the mask image of the pre-stored texture image is generated, and the texture acquisition page is sent to the access terminal.
[0042] Step S204: rotating the texture image according to each rotation angle, and extracting texture features from the obtained rotated image to obtain texture features.
[0043] After rotating the texture image at multiple rotation angles, the texture image is rotated at each rotation angle to obtain a rotated image at each rotation angle. Further, texture features are extracted from the rotated image at each rotation angle to obtain texture features corresponding to each rotation angle.
[0044] In the specific implementation process, according to the preset image rotation direction, the texture image can be rotated in the image rotation direction according to each rotation angle to obtain the rotated image at each rotation angle. Specifically, the image rotation interface can be called, with the texture image and the rotation angle as the interface call input parameters, and the image rotation interface can be called to rotate the texture image to obtain the rotated image returned by the interface call. On this basis, after the texture image is rotated according to each rotation angle, the shapes of the rotated images obtained at each rotation angle may be different. In order to avoid the computational complexity caused by the different shapes of the rotated images obtained after the image rotation, the rotated image can be segmented to obtain the object image block in the rotated image, and the texture feature extraction of the object image block in the rotated image can be performed to obtain the texture features corresponding to each rotation angle.
[0045] In addition, during the process of image rotation, the texture image can also be segmented, and the object image blocks and background image blocks in the texture image can be separated by image segmentation, and the obtained object image blocks are rotated, and the object image blocks obtained after rotation are used as rotated images; wherein, during the process of rotating the object image blocks, the center point of the object image blocks can be calculated, and the rotation process can be performed according to each rotation angle with the center point as the rotation center to obtain a rotated image of the corresponding rotation angle.
[0046] For example, the object to be detected is a ceramic product, and the user terminal, as an access terminal, collects a texture image of the ceramic product such as Figure 3 As shown, according to the image resolution of the texture image of 96 dpi, in the pre-configured correspondence table between the image resolution and the angle sampling number, it is found that the angle sampling number corresponding to the image resolution of 96 dpi is 4, and the four rotation angles obtained by rotating the angle sampling based on the angle sampling number are: 45°, 135°, 225°, and 315° respectively;
[0047] If the pre-configured image rotation direction is clockwise, and the texture image is rotated 45°, 135°, 225°, and 315° in the clockwise direction, the four rotated images obtained are as follows: FIG. 4A to FIG. 4D As shown, Figure 4A To rotate the image by 45°, Figure 4B To rotate the image by 135°, Figure 4C To rotate the image by 225°, Figure 4D The image is rotated 315°.
[0048] Furthermore, the texture feature extraction interface is called to extract texture features of the four rotated images respectively, and the texture features of each of the four rotated images are obtained.
[0049] Step S206 , performing texture feature comparison between each texture feature and a preset texture feature, and determining a target rotation angle according to the comparison result.
[0050] Based on the texture feature extraction of the rotated images at each rotation angle to obtain the texture features corresponding to each rotation angle, the texture features are compared with the preset texture features, and the target rotation angle is determined according to the comparison results. Specifically, the texture features corresponding to each rotation angle are compared with the preset texture features, and the target rotation angle is determined among multiple rotation angles according to the comparison results.
[0051] In practical applications, texture detection processing is performed on the texture image of the object to be detected to determine the detection result of the object to be detected, and the texture detection processing can be performed on the texture image of the object to be detected currently collected and the pre-stored texture image of the object to be detected, so as to determine whether the texture image currently collected is the texture image of the object to be detected, that is, the authenticity of the current object to be detected is determined with the help of texture image detection; in addition, texture detection processing is performed on the texture image of the object to be detected to determine the detection result of the object to be detected, and the texture detection processing can be performed on the texture image of the object to be detected currently collected and the pre-stored texture images of each candidate object, so as to determine which candidate item among the candidate items the current object to be detected is, that is, the identity of the current object to be detected is determined with the help of texture image detection.
[0052] In order to implement the scenario of determining the authenticity of the current object to be detected by means of texture image detection, an optional implementation provided by this embodiment is to compare the texture features of each texture feature with the preset texture feature, and determine the target rotation angle according to the comparison result, including:
[0053] Calculating feature similarity between each texture feature and pre-stored texture features of a pre-stored texture image of the object to be detected;
[0054] Detecting whether there is a feature similarity greater than a first threshold among the feature similarities obtained by calculation;
[0055] If not, a rotation angle corresponding to a feature similarity satisfying a preset condition is selected from among the feature similarities as the target rotation angle.
[0056] In addition, if there is a feature similarity greater than the first threshold value among the feature similarities calculated, the following operations are performed:
[0057] Selecting a rotated image whose feature similarity is greater than the first threshold value from the rotated images;
[0058] It is determined whether there is a rotated image with a feature similarity greater than a second threshold value in the selected rotated images. If so, it is determined that the image detection result of the object to be detected is a detection pass.
[0059] Among them, the second threshold refers to the threshold used to determine that the texture image currently undergoing texture detection processing and the pre-stored texture image are the same object to be detected, that is, the feature similarity between the texture features of the texture image and the pre-stored texture features of the pre-stored texture image meets the similarity threshold for being determined as the texture features of the same object to be detected; the first threshold refers to the threshold used to determine that the texture image currently undergoing texture detection processing has a high similarity with the pre-stored texture image and needs further detection, that is, the feature similarity between the texture features of the texture image and the pre-stored texture features of the pre-stored texture image has a high probability of being determined as the texture features of the same object to be detected.
[0060] The first threshold is smaller than the second threshold. The specific values of the first threshold and the second threshold can be set according to actual needs. For example, in a detection scenario where the detection accuracy requirement for the detected object is high, the values of the first threshold and the second threshold can be set larger accordingly, such as the first threshold is set to 98% and the second threshold is set to 80%; in a detection scenario where the detection accuracy requirement for the detected object is low, the values of the first threshold and the second threshold can be set smaller accordingly, such as the first threshold is set to 95% and the second threshold is set to 70%.
[0061] Meeting the preset condition means that the feature similarity is greater than other feature similarities. The feature similarity that meets the preset condition means that the feature similarity is greater than other feature similarities among the feature similarities. In the specific implementation process, the rotation angle corresponding to the feature similarity that meets the preset condition is selected from the feature similarities. The feature similarities can also be sorted in descending order of value, and the rotation angle corresponding to the feature similarity at the top of the sort is selected as the target rotation angle.
[0062] It should be pointed out that in the process of determining the target rotation angle by comparing each texture feature with the preset texture feature, it is also possible to calculate the feature similarity between each texture feature and the pre-stored texture feature of the pre-stored texture image of the object to be detected, and then select the rotation angle corresponding to the feature similarity that meets the preset conditions from each feature similarity as the target rotation angle.
[0063] In addition, for the implementation scenario of determining the identity of the current object to be detected by means of texture image detection, an optional implementation provided by this embodiment is to compare the texture features of each texture feature with the preset texture feature, and determine the target rotation angle according to the comparison result, including:
[0064] Calculating feature similarity between each texture feature and pre-stored texture features of pre-stored texture images of each candidate object;
[0065] Selecting a rotation angle corresponding to a feature similarity greater than a first threshold value from the calculated feature similarities as a candidate rotation angle;
[0066] The candidate rotation angles are deduplicated according to the candidate objects corresponding to the candidate rotation angles to obtain the target rotation angle.
[0067] During the specific execution process, in the process of comparing the texture features corresponding to the object to be detected at each rotation angle with the pre-stored texture features of the pre-stored texture images of each candidate object, after calculating the feature similarity between the texture features corresponding to each rotation angle and the pre-stored texture features of the pre-stored texture images of each candidate object, there may be multiple candidate rotation angles corresponding to the feature similarity greater than a first threshold selected from the calculated feature similarity, and there may be multiple candidate rotation angles corresponding to the same candidate object, that is: the feature similarities between the texture features corresponding to the multiple rotation angles of the current object to be detected and the pre-stored texture features of the same candidate object are all greater than the first threshold. In this case, it is necessary to deduplicate the multiple rotation angles corresponding to the same candidate object. Specifically, in the deduplication process, they can be sorted in descending order according to the feature similarity, and the candidate rotation angle corresponding to the feature similarity at the top of the sort is retained as the target rotation angle.
[0068] Step S208: performing secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image.
[0069] Based on determining a plurality of rotation angles for rotating the texture image of the object to be detected, this embodiment rotates the texture image according to the plurality of rotation angles, extracts texture features of the obtained rotated image, and determines the target rotation angle by comparing the texture features with the preset texture features, thereby determining the texture features with a high similarity to the preset texture features, that is, determining the target rotation angle to which the texture features with a high similarity to the preset texture features belong; based on determining the target rotation angle to which the texture features with a high similarity to the preset texture features belong, further performing a secondary image rotation according to a plurality of sub-rotation angles of the target rotation angle to obtain a secondary rotated image, thereby determining the image detection result of the object to be detected based on the texture features of the secondary rotated image and comparing the texture features with the preset texture features.
[0070] As described above, texture detection is performed on the texture image of the object to be detected to determine the detection result of the object to be detected. There are two implementation scenarios: using texture image detection to determine the authenticity of the current object to be detected and using texture image detection to determine the object identity of the current object to be detected.
[0071] In a specific implementation, in the process of determining multiple sub-rotation angles of a target rotation angle, sub-rotation angle sampling may be performed within a sampling range of the target rotation angle according to a preset sub-angle sampling number to obtain multiple rotation angles, or, sub-rotation angle sampling may be performed within a sampling range of the target rotation angle according to a preset sub-angle sampling interval to obtain multiple rotation angles; in addition, sub-rotation angle sampling may be performed within a sampling range of the target rotation angle according to a sub-angle sampling number corresponding to the angle sampling number for rotation angle sampling, or, sub-rotation angle sampling may be performed within a sampling range of the target rotation angle according to a sub-angle sampling interval corresponding to the angle sampling interval for rotation angle sampling.
[0072] Among them, the middle angle between the target rotation angle and the neighborhood rotation angle (adjacent rotation angle) can be used as the boundary of the sampling range to determine the sampling range of the target selection angle. In addition, the neighborhood rotation angle of the target rotation angle can also be used as the boundary of the sampling range to determine the sampling range of the target selection angle. For example, the four rotation angles of the texture image are 45°, 135°, 225°, and 315°. After performing image rotation, texture feature extraction, and texture feature comparison on these four rotation angles, the target rotation angle determined to be 135°, the neighborhood rotation angles adjacent to the target rotation angle 135° are rotation angle 45° and rotation angle 225°, the middle angle between the target rotation angle 135° and the neighborhood rotation angle 45° is 90°, and the middle angle between the target rotation angle 135° and the neighborhood rotation angle 225° is 180°, then the sampling range of the current target rotation angle 135° is determined to be [90°, 180°]; in addition, the neighborhood rotation angle 45° and the neighborhood rotation angle 225° can also be used as the boundaries of the sampling range of the target rotation angle 135°, and the sampling range of the target rotation angle 135° determined accordingly is [45°, 225°].
[0073] In an optional implementation manner provided by this embodiment, based on the above determination of the target rotation angle whose texture feature has a higher feature similarity with the preset texture feature among the multiple rotation angles, for the implementation scenario of determining the authenticity of the current object to be detected by means of texture image detection, multiple sub-rotation angles of the target rotation angle are determined in the following manner:
[0074] Determine an angle sampling distribution within a sampling range of the target rotation angle according to feature similarities corresponding to the target rotation angle and / or a neighborhood rotation angle of the target rotation angle;
[0075] Rotation angle sampling is performed within the sampling range according to the angle sampling distribution to obtain the multiple sub-rotation angles.
[0076] Among them, the angle sampling distribution refers to the distribution of sub-rotation angle sampling within the sampling range of the target rotation angle; specifically, in the process of determining the angle sampling distribution within the sampling range of the target rotation angle according to the feature similarity corresponding to the target rotation angle and / or the neighborhood rotation angle, since the feature similarity corresponding to the target rotation angle is greater than the feature similarities corresponding to the two neighborhood rotation angles, based on this, if the feature similarity corresponding to one of the neighborhood rotation angles is greater than the feature similarity corresponding to the other neighborhood rotation angle, the sampling range can be divided into two sub-sampling ranges based on the target rotation angle, and a larger number of angle samplings is set within the sub-sampling range adjacent to the neighborhood rotation angle with a larger feature similarity within the sampling range, and a smaller number of angle samplings is set within the sub-sampling range adjacent to the neighborhood rotation angle with a smaller feature similarity within the sampling range; or, a smaller angle sampling interval is set within the sub-sampling range adjacent to the neighborhood rotation angle with a larger feature similarity within the sampling range, and a larger angle sampling interval is set within the sub-sampling range adjacent to the neighborhood rotation angle with a smaller feature similarity within the sampling range.
[0077] In addition, in an optional implementation manner provided by this embodiment, based on the above determination of the target rotation angle whose texture feature has a higher feature similarity with the preset texture feature among the multiple rotation angles, for the implementation scenario of determining the identity of the current object to be detected by means of texture image detection, multiple sub-rotation angles of the target rotation angle are determined in the following manner:
[0078] Determining a sub-angle sampling interval within a sampling range of each target rotation angle according to a feature similarity between a texture feature of a rotation image corresponding to each target rotation angle and a feature similarity between the preset texture feature;
[0079] Rotation angle sampling is performed within the sampling range according to the sub-angle sampling interval to obtain a plurality of sub-rotation angles of each target rotation angle.
[0080] In addition to the implementation methods provided above, for the implementation scenario of determining the identity of the current object to be detected by means of texture image detection, in the process of determining multiple sub-rotation angles of the target rotation angle, the number of sub-angle samplings within the sampling range of each target rotation angle can be determined according to the feature similarity between the texture features of the rotation image corresponding to each target rotation angle and the preset texture features, and the rotation angle sampling is performed within the sampling range according to the number of sub-angle samplings to obtain multiple sub-rotation angles of each target rotation angle; or, the angle sampling distribution within the sampling range of the target rotation angle can be determined according to the feature similarity between the texture features of the rotation image corresponding to each target rotation angle and the preset texture features, as well as the feature similarity corresponding to the neighborhood rotation angles of each target rotation angle, and the rotation angle sampling is performed within the sampling range according to the angle sampling distribution to obtain multiple sub-rotation angles of each target rotation angle.
[0081] In a specific implementation, in the process of performing secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image, the texture image of the object to be detected can be subjected to secondary image rotation according to the sub-rotation angle to obtain a secondary rotated image, and the rotation image corresponding to the target rotation angle can also be subjected to secondary image rotation based on the sub-rotation angle to obtain a secondary rotated image. Specifically, in the process of performing secondary image rotation according to the sub-rotation angle on the rotation image corresponding to the target rotation angle to obtain a secondary rotated image, the secondary rotation angle and secondary rotation direction of the sub-rotation angle relative to the target rotation angle can be determined, and the rotation image corresponding to the target rotation angle can be subjected to secondary image rotation according to the determined secondary rotation angle and secondary rotation direction to obtain a secondary rotated image.
[0082] Specifically, based on the optional implementation method of determining multiple sub-rotation angles of the target rotation angle provided for the above-mentioned implementation scenario of determining the authenticity of the current object to be detected by means of texture image detection, a secondary image rotation is performed according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image processing process, which is implemented by the following optional implementation method: a secondary image rotation is performed on the rotation image corresponding to the target rotation angle according to multiple sub-rotation angles to obtain secondary rotated images of each sub-rotation angle; or, a secondary image rotation is performed on the texture image according to multiple sub-rotation angles to obtain secondary rotated images of each sub-rotation angle.
[0083] In addition, based on the above-mentioned optional implementation method of determining multiple sub-rotation angles of the target rotation angle for the implementation scenario of determining the identity of the current object to be detected by means of texture image detection, a secondary image rotation is performed according to the multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image processing process, which is implemented by the following optional implementation method: a secondary image rotation is performed on the texture image of the candidate object corresponding to each target rotation angle according to the multiple sub-rotation angles of each target rotation angle to obtain secondary rotated images of the multiple sub-rotation angles of each target rotation angle; or, a secondary image rotation is performed on the rotation image corresponding to each target rotation angle according to the multiple sub-rotation angles of each target rotation angle to obtain secondary rotated images of the multiple sub-rotation angles of each target rotation angle.
[0084] It should be pointed out that the specific implementation method of performing secondary image rotation on the texture image or secondary rotation on the rotated image is similar to the specific implementation method of performing image rotation on the texture image provided above. Please refer to the specific implementation method of performing image rotation on the texture image provided above, and this embodiment will not be repeated here.
[0085] Step S210 , comparing the texture features of each secondary rotation image with the preset texture features, and determining the image detection result according to the comparison result.
[0086] In a specific implementation, a secondary image rotation is performed according to multiple sub-rotation angles of the target rotation angle. After the secondary rotated images of the multiple sub-rotation angles are obtained, texture features are extracted from the secondary rotated images, and texture features of each secondary rotated image obtained by extraction are compared with preset texture features, and the image detection result is determined according to the comparison result.
[0087] As described above, texture detection is performed on the texture image of the object to be detected to determine the detection result of the object to be detected. There are two implementation scenarios: using texture image detection to determine the authenticity of the current object to be detected and using texture image detection to determine the object identity of the current object to be detected.
[0088] In view of the implementation scenario of determining the authenticity of the current object to be detected by means of texture image detection, an optional implementation provided by this embodiment is to compare the texture features of each secondary rotation image with the preset texture features, and determine the image detection result according to the comparison result, including:
[0089] Calculating the feature similarity between the texture features of each secondary rotation image and the preset texture features;
[0090] Detecting whether there is a feature similarity greater than a second threshold value among the feature similarities obtained by calculation;
[0091] If so, determining that the image detection result of the object to be detected is passed, that is, determining that the authenticity detection of the current object to be detected is passed;
[0092] If it does not exist, no processing is performed, or the image detection result is determined to be a detection failure, that is, it is determined that the authenticity detection of the current object to be detected has not passed.
[0093] In addition, when there is no feature similarity greater than the second threshold value among the feature similarities obtained by calculation, the following operations may be performed: selecting a secondary rotation image that meets the preset condition from each secondary rotation image based on the feature similarity obtained by calculation; generating an image acquisition reminder carrying the selected secondary rotation image and the corresponding feature similarity, and sending it to the access terminal that submitted the texture image. Among them, satisfying the preset condition means that the feature similarity is greater than the feature similarities of other secondary rotation images, and the secondary rotation image that meets the preset condition means a secondary rotation image whose feature similarity is greater than the feature similarities of other secondary rotation images.
[0094] In view of the implementation scenario of determining the identity of the current object to be detected by means of texture image detection, an optional implementation provided by this embodiment is to compare the texture features of each secondary rotation image with the preset texture features, and determine the image detection result according to the comparison result, including:
[0095] Calculating feature similarities between texture features of the secondary rotation images of the plurality of sub-rotation angles of each target rotation angle and pre-stored texture features of the texture image of the corresponding candidate object;
[0096] The candidate items corresponding to the feature similarities obtained by calculation and having feature similarities greater than a second threshold are determined, and the factory information of the determined candidate items is read as the image detection result.
[0097] The following takes the application of an image detection processing method provided by this embodiment in a authenticity detection scenario as an example. Figure 5 , the image detection and processing method provided in this embodiment is further described, see Figure 5 , an image detection processing method applied to authenticity detection scenarios specifically includes the following steps.
[0098] Step S502: Acquire a texture image of the object to be detected, and determine the number of angle sampling according to the texture detection accuracy submitted through the texture detection page.
[0099] Optionally, the texture image is obtained by acquiring an image of the object to be detected through an image acquisition interface configured on the texture detection page.
[0100] Prior to this, the following operations may also be performed: performing significant part recognition on the pre-stored texture image of the object to be detected to obtain the image acquisition part; generating a texture acquisition page carrying a mask image of the image acquisition part and the pre-stored texture image.
[0101] Step S504: performing rotation angle sampling according to the angle sampling number to obtain a plurality of rotation angles.
[0102] Step S502 and step S504 can be replaced by: obtaining a texture image of the object to be detected, determining the image resolution of the texture image, and performing rotation angle sampling according to the angle sampling number corresponding to the image resolution to obtain multiple rotation angles; or, can also be replaced by: obtaining a texture image of the object to be detected, performing image quality scoring on the texture image, and performing rotation angle sampling according to the angle sampling interval corresponding to the obtained quality score to obtain multiple rotation angles.
[0103] Step S506: rotating the object image blocks in the texture image according to the rotation angles, and extracting texture features from the obtained rotated image to obtain texture features.
[0104] Furthermore, rotating the object image blocks in the texture image according to each rotation angle may be replaced by rotating the texture image according to each rotation angle.
[0105] Step S508 , performing texture feature comparison between each texture feature and pre-stored texture features of a pre-stored texture image of the object to be detected, and determining the target rotation angle according to the comparison result.
[0106] Step S510, determining the angle sampling distribution within the sampling range of the target rotation angle according to the feature similarity corresponding to the target rotation angle and the neighborhood rotation angle.
[0107] Step S512, performing rotation angle sampling within a sampling range according to the angle sampling distribution to obtain a plurality of sub-rotation angles of the target rotation angle.
[0108] Step S514: performing secondary rotation processing on the object image block according to multiple sub-rotation angles of the target rotation angle, and extracting texture features of the obtained secondary rotated image.
[0109] In addition, the secondary rotation processing of the object image block according to multiple sub-rotation angles of the target rotation angle can be replaced by performing a secondary image rotation on the texture image according to multiple sub-rotation angles of the target rotation angle, or can also be replaced by performing a secondary image rotation on the rotated image according to multiple sub-rotation angles of the target rotation angle.
[0110] Step S516, comparing the texture features of each secondary rotation image with the preset texture features, and determining the image detection result according to the comparison result.
[0111] It should be noted that any one of steps S502 to S516 or any combination of multiple steps can be replaced by the corresponding technical means provided in the above steps S202 to S210 according to the needs of implementation and deployment, and will not be described one by one here.
[0112] The following takes the application of an image detection processing method provided by this embodiment in an object identity detection scenario as an example, combined with Figure 6 , the image detection and processing method provided in this embodiment is further described, see Figure 6 , an image detection and processing method applied to the scene of object identity detection specifically includes the following steps.
[0113] Step S602: Acquire a texture image of the object to be detected, and determine a plurality of rotation angles for rotating the image.
[0114] Specifically, determining multiple rotation angles for image rotation includes: determining the number of angle samplings according to the texture detection accuracy submitted through the texture detection page, and performing rotation angle sampling according to the angle sampling number to obtain multiple rotation angles; or, determining the image resolution of the texture image, and performing rotation angle sampling according to the angle sampling number corresponding to the image resolution to obtain multiple rotation angles; or, it can also be replaced by: obtaining a texture image of the object to be detected, performing image quality scoring on the texture image, and performing rotation angle sampling according to the angle sampling interval corresponding to the obtained quality score to obtain multiple rotation angles.
[0115] Step S604: rotating the texture image according to each rotation angle, and extracting texture features from the obtained rotated image to obtain texture features.
[0116] Step S606: perform texture feature comparison on each texture feature and the pre-stored texture features of each candidate object, and determine the target rotation angle according to the comparison result.
[0117] Optionally, a texture feature comparison is performed between each texture feature and a pre-stored texture feature of each candidate object, and a target rotation angle is determined based on the comparison result, including: calculating feature similarity between each texture feature and the pre-stored texture feature of each candidate object; selecting a rotation angle corresponding to a feature similarity greater than a first threshold value from the calculated feature similarities as a candidate rotation angle; and deduplicating the candidate rotation angles according to the candidate objects to which the candidate rotation angles correspond to obtain the target rotation angle.
[0118] Step S608: Determine the sub-angle sampling interval within the sampling range of each target rotation angle according to the feature similarity corresponding to each target rotation angle.
[0119] Step S610: performing rotation angle sampling within a sampling range of each target rotation angle according to a sub-angle sampling interval to obtain a plurality of sub-rotation angles of each target rotation angle.
[0120] Step S612, performing secondary image rotation on the texture image according to multiple sub-rotation angles of each target rotation angle to obtain a secondary rotated image.
[0121] Step S614, calculating the feature similarity between the texture feature of the secondarily rotated image and the pre-stored texture feature of the corresponding candidate object.
[0122] Step S616, determining candidate items corresponding to feature similarities greater than a second threshold among the feature similarities obtained by calculation, and reading factory information of the candidate items as image detection results.
[0123] It should be noted that any one of steps S602 to S616 or any combination of multiple steps can be replaced by the corresponding technical means provided in the above steps S202 to S210 according to the needs of implementation and deployment, and will not be described one by one here.
[0124] An embodiment of an image detection and processing device provided in this specification is as follows:
[0125] In the above-mentioned embodiment, an image detection and processing method is provided, and correspondingly, an image detection and processing device is also provided, which will be described below in conjunction with the accompanying drawings.
[0126] Reference Figure 7 , which shows a schematic diagram of an image detection and processing device embodiment provided by this embodiment.
[0127] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.
[0128] This embodiment provides an image detection and processing device, the device comprising:
[0129] A rotation angle determination module 702 is configured to obtain a texture image of the object to be detected and determine a plurality of rotation angles for image rotation;
[0130] The image rotation module 704 is configured to rotate the texture image according to each rotation angle, and extract texture features from the obtained rotated image to obtain texture features;
[0131] A first texture feature comparison module 706 is configured to compare each texture feature with a preset texture feature, and determine a target rotation angle according to the comparison result;
[0132] A secondary image rotation module 708 is configured to perform secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image;
[0133] The second texture feature comparison module 710 is configured to compare the texture features of each secondary rotation image with the preset texture features, and determine the image detection result according to the comparison result.
[0134] An embodiment of an image detection and processing device provided in this specification is as follows:
[0135] Corresponding to the image detection and processing method described above, based on the same technical concept, one or more embodiments of this specification also provide an image detection and processing device, which is used to execute the image detection and processing method provided above. Figure 8 A schematic diagram of the structure of an image detection and processing device provided in one or more embodiments of this specification.
[0136] This embodiment provides an image detection and processing device, including:
[0137] like Figure 8 As shown, the image detection processing device may have relatively large differences due to different configurations or performances, and may include one or more processors 801 and memory 802, and one or more storage applications or data may be stored in the memory 802. Among them, the memory 802 may be a short-term storage or a permanent storage. The application stored in the memory 802 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the image detection processing device. Further, the processor 801 may be configured to communicate with the memory 802, and execute a series of computer executable instructions in the memory 802 on the image detection processing device. The image detection processing device may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input / output interfaces 805, one or more keyboards 806, etc.
[0138] In a specific embodiment, the image detection and processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions for the image detection and processing device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:
[0139] Acquire a texture image of the object to be detected, and determine multiple rotation angles for rotating the image;
[0140] Rotating the texture image according to each rotation angle, and extracting texture features from the obtained rotated image to obtain texture features;
[0141] Perform texture feature comparison on each texture feature and the preset texture feature, and determine the target rotation angle according to the comparison result;
[0142] Perform secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image;
[0143] The texture features of each secondary rotation image are compared with the preset texture features, and the image detection result is determined according to the comparison result.
[0144] An embodiment of a computer-readable storage medium provided in this specification is as follows:
[0145] Corresponding to the image detection and processing method described above, based on the same technical concept, one or more embodiments of this specification also provide a computer-readable storage medium.
[0146] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions, and the computer-executable instructions implement the following process when executed by a processor:
[0147] Acquire a texture image of the object to be detected, and determine multiple rotation angles for rotating the image;
[0148] Rotating the texture image according to each rotation angle, and extracting texture features from the obtained rotated image to obtain texture features;
[0149] Perform texture feature comparison on each texture feature and the preset texture feature, and determine the target rotation angle according to the comparison result;
[0150] Perform secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image;
[0151] The texture features of each secondary rotation image are compared with the preset texture features, and the image detection result is determined according to the comparison result.
[0152] It should be noted that an embodiment of a computer-readable storage medium in this specification and an embodiment of an image detection and processing method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.
[0153] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. For example, the device embodiment, equipment embodiment and computer-readable storage medium embodiment are similar to the method embodiment, so the description is relatively simple. To read the relevant contents in the device embodiment, equipment embodiment and computer-readable storage medium embodiment, please refer to the partial description of the method embodiment.
[0154] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0155] In the 1930s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0156] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0157] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0158] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0159] It should be understood by those skilled in the art that one or more embodiments of this specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0163] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0164] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0165] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0166] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "includes at least one ..." do not exclude the presence of other identical elements in the process, method, commodity or device including the elements.
[0167] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0168] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.
Claims
1. An image detection and processing method, comprising: Acquire a texture image of the object to be detected, and determine multiple rotation angles for rotating the image; Rotating the texture image according to each rotation angle, and extracting texture features from the obtained rotated image to obtain texture features; Compare each texture feature with the preset texture features of the candidate object, and determine the target rotation angle according to the comparison result; Perform secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image; The texture features of each secondary rotation image are compared with the preset texture features, and the image detection result is determined according to the comparison result.
2. The image detection and processing method according to claim 1, wherein the step of determining a plurality of rotation angles for rotating the image comprises: Determine the image resolution of the texture image, and perform rotation angle sampling according to the number of angle samplings corresponding to the image resolution to obtain the multiple rotation angles; or, An image quality score is performed on the texture image, and rotation angle sampling is performed according to an angle sampling interval corresponding to the obtained quality score to obtain the multiple rotation angles.
3. The image detection and processing method according to claim 2, wherein the step of comparing each texture feature with a preset texture feature of the candidate object and determining the target rotation angle according to the comparison result comprises: Detecting whether there is a feature similarity greater than a first threshold among the feature similarities obtained by calculation; If not, an operation of selecting a rotation angle corresponding to a feature similarity satisfying a preset condition from among the feature similarities is performed as a target rotation angle.
4. The image detection and processing method according to claim 3, if the result of the execution of the sub-step of whether there is a feature similarity greater than the first threshold among the feature similarities obtained by the detection calculation is yes, perform the following operations: Selecting a rotated image whose feature similarity is greater than the first threshold value from the rotated images; It is determined whether there is a rotated image with a feature similarity greater than a second threshold value in the selected rotated images. If so, it is determined that the image detection result of the candidate object is a detection pass.
5. The image detection and processing method according to claim 1, after the step of comparing the texture features of each texture feature with the preset texture features of the candidate object and determining the target rotation angle according to the comparison result is performed, and before the step of performing secondary image rotation according to multiple sub-rotation angles of the target rotation angle and obtaining the secondary rotated image is performed, further comprising: Determine an angle sampling distribution within a sampling range of the target rotation angle according to feature similarities corresponding to the target rotation angle and / or a neighborhood rotation angle of the target rotation angle; Rotation angle sampling is performed within the sampling range according to the angle sampling distribution to obtain the multiple sub-rotation angles.
6. The image detection and processing method according to claim 5, wherein performing secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image comprises: The rotated image corresponding to the target rotation angle is subjected to secondary image rotation according to the multiple sub-rotation angles to obtain secondary rotated images of the sub-rotation angles.
7. The image detection and processing method according to claim 6, wherein the texture features of each secondary rotation image are compared with the preset texture features, and the image detection result is determined according to the comparison result, comprising: Calculating the feature similarity between the texture features of each secondary rotation image and the preset texture features; It is detected whether there is a feature similarity greater than a second threshold value among the feature similarities obtained by calculation, and if so, it is determined that the image detection result of the candidate object is a detection pass.
8. The image detection and processing method according to claim 7, if the result after the sub-step of detecting whether there is a feature similarity greater than the second threshold value in the feature similarity obtained by calculation is no, performing the following operations: Selecting a secondary rotated image that meets a preset condition from among the secondary rotated images based on the calculated feature similarity; An image acquisition reminder carrying the selected secondary rotation image and the corresponding feature similarity is generated and sent to the access terminal that submitted the texture image.
9. The image detection and processing method according to claim 1, wherein determining a plurality of rotation angles for rotating the image comprises: Determining the number of angle samplings according to the texture detection accuracy of the texture image, and performing rotation angle sampling according to the number of angle samplings to obtain the multiple rotation angles; The texture detection accuracy is collected through a texture detection page, and the texture image is obtained by collecting an image of the object to be detected through an image collection interface configured on the texture detection page.
10. The image detection and processing method according to claim 1, after the step of comparing the texture features of each texture feature with the preset texture features of the candidate object and determining the target rotation angle according to the comparison result is performed, and before the step of performing secondary image rotation according to multiple sub-rotation angles of the target rotation angle and obtaining the secondary rotated image is performed, further comprising: Determining a sub-angle sampling interval within a sampling range of each target rotation angle according to a feature similarity between a texture feature of a rotation image corresponding to each target rotation angle and a pre-stored texture feature of the candidate object; Rotation angle sampling is performed within the sampling range according to the sub-angle sampling interval to obtain a plurality of sub-rotation angles of each target rotation angle.
11. The image detection and processing method according to claim 10, wherein performing secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image comprises: The pre-stored texture images of the candidate items corresponding to the target rotation angles are subjected to secondary image rotation according to the multiple sub-rotation angles of the target rotation angles to obtain secondary rotation images of the multiple sub-rotation angles of the target rotation angles.
12. The image detection processing method according to claim 11, wherein the step of comparing the texture features of each secondary rotation image with the preset texture features and determining the image detection result according to the comparison result comprises: Calculating feature similarities between texture features of the secondary rotation images of the plurality of sub-rotation angles of each target rotation angle and pre-stored texture features of the pre-stored texture images of the candidate objects; Determine a candidate item corresponding to a feature similarity greater than a second threshold among the feature similarities obtained by calculation; The factory information of the candidate item is read as the image detection result.
13. The image detection and processing method according to claim 1, before the step of acquiring the texture image of the object to be detected and determining a plurality of rotation angles for image rotation is performed, further comprising: Recognize the significant parts of the pre-stored texture image of the object to be detected to obtain the image acquisition part; A texture acquisition page carrying the image acquisition part and the mask image of the pre-stored texture image is generated, and the texture acquisition page is sent to the access terminal.
14. An image detection and processing device, comprising: A rotation angle determination module is configured to obtain a texture image of the object to be detected and determine a plurality of rotation angles for rotating the image; An image rotation module is configured to rotate the texture image according to each rotation angle, and extract texture features from the obtained rotated image to obtain texture features; A first texture feature comparison module is configured to compare each texture feature with a preset texture feature of the candidate object, and determine a target rotation angle according to the comparison result; A secondary image rotation module, configured to perform secondary image rotation according to a plurality of sub-rotation angles of the target rotation angle to obtain a secondary rotated image; The second texture feature comparison module is configured to compare the texture features of each secondary rotation image with the preset texture features, and determine the image detection result according to the comparison result.
15. An image detection and processing device, comprising: processor; and a memory configured to store computer executable instructions that, when executed, cause the processor to: Acquire a texture image of the object to be detected, and determine multiple rotation angles for rotating the image; Rotating the texture image according to each rotation angle, and extracting texture features from the obtained rotated image to obtain texture features; Compare each texture feature with the preset texture features of the candidate object, and determine the target rotation angle according to the comparison result; Perform secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image; The texture features of each secondary rotation image are compared with the preset texture features, and the image detection result is determined according to the comparison result.
16. A computer-readable storage medium for storing computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the following process: Acquire a texture image of the object to be detected, and determine multiple rotation angles for rotating the image; Rotating the texture image according to each rotation angle, and extracting texture features from the obtained rotated image to obtain texture features; Compare each texture feature with the preset texture features of the candidate object, and determine the target rotation angle according to the comparison result; Perform secondary image rotation according to multiple sub-rotation angles of the target rotation angle to obtain a secondary rotated image; The texture features of each secondary rotation image are compared with the preset texture features, and the image detection result is determined according to the comparison result.
