Imaging Performance Testing Method, Device, Medium and Equipment
By obtaining images from standard and business test cases for text recognition, and combining resolution information, the accuracy of imaging equipment performance measurement is solved to ensure device adaptability and recognition effect.
Patent Information
- Application Number
- CN202111496857.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-12-09
AI Technical Summary
The prior art is difficult to effectively and accurately measure the imaging performance of an imaging device, especially in specific business scenarios, resulting in unfitting selection of the imaging device, affecting the accuracy of image recognition and user experience.
By obtaining images of standard test cases and business test cases, text recognition is performed, and combining the resolution information of the imaging device, the imaging performance is comprehensively determined.
It realizes that the imaging performance test of imaging devices in basic and specific business scenarios is more effective and accurate, ensuring that the equipment selection is adapted to business needs and product structures, and improving the accuracy of image recognition and user experience.
Smart Images

Figure CN114332879B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image technology, and particularly to an imaging performance testing method, apparatus, medium, and device. Background Art
[0002] Artificial Intelligence (AI) is a comprehensive technology in computer science. By studying the design principles and implementation methods of various intelligent machines, machines are enabled to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology is an interdisciplinary subject with a wide range of fields involved, such as several major directions including natural language processing, machine learning, and deep learning. With the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0003] In the application of image recognition, the accuracy of the recognition result directly affects the feasibility of the product and the user experience. Whether the recognition result is accurate is not only closely related to the model algorithm but also related to the imaging performance of the imaging device that captures the image. Therefore, in order to select a suitable imaging device for applications or products based on image recognition, effectively and accurately measuring the imaging performance of the imaging device has become an urgent problem to be solved. Summary of the Invention
[0004] In order to effectively and accurately measure the imaging performance of an imaging device, this application provides an imaging performance testing method, apparatus, medium, and device. The technical solutions are as follows:
[0005] In a first aspect, this application provides an imaging performance testing method, which includes:
[0006] Obtain a standard test case, and obtain a first test image captured by the imaging device to be tested based on the standard test case;
[0007] Perform first text recognition on the first test image to obtain a first recognition result;
[0008] Obtain a business test case, and obtain a second test image captured by the imaging device to be tested based on the business test case;
[0009] Perform second text recognition on the second test image to obtain a second recognition result;
[0010] Determine the imaging performance of the imaging device to be tested according to the resolution information of the imaging device to be tested, the first recognition result, and the second recognition result.
[0011] In a second aspect, this application provides an imaging performance testing apparatus, which includes:
[0012] A first acquisition module, configured to acquire a standard test case and obtain a first test image captured by an imaging device to be tested based on the standard test case;
[0013] A first recognition module, configured to perform first text recognition on the first test image to obtain a first recognition result;
[0014] A second acquisition module, configured to acquire a service test case and obtain a second test image captured by the imaging device to be tested based on the service test case;
[0015] A second recognition module, configured to perform second text recognition on the second test image to obtain a second recognition result;
[0016] An imaging performance determination module, configured to determine the imaging performance of the imaging device to be tested according to the resolution information of the imaging device to be tested, the first recognition result, and the second recognition result.
[0017] In a third aspect, the present application provides a computer-readable storage medium, in which at least one instruction or at least one program segment is stored, and the at least one instruction or at least one program segment is loaded and executed by a processor to implement an imaging performance test method as described in the first aspect.
[0018] In a fourth aspect, the present application provides a computer device, which includes a processor and a memory, and at least one instruction or at least one program segment is stored in the memory, and the at least one instruction or at least one program segment is loaded and executed by the processor to implement an imaging performance test method as described in the first aspect.
[0019] In a fifth aspect, the present application provides a computer program product, characterized in that the computer program product includes computer instructions, and when the computer instructions are executed by a processor, an imaging performance test method as described in the first aspect is implemented.
[0020] The imaging performance test method, device, medium, and equipment provided by the present application have the following technical effects:
[0021] The solution provided by this application obtains the first test image captured by the imaging device to be tested based on standard test cases, and then performs first text recognition on the first test image to obtain the first recognition result. At the same time, it obtains the second test image captured by the imaging device to be tested based on business test cases, and then performs second text recognition on the second test image to obtain the second recognition result. Finally, according to the resolution information, the first recognition result, and the second recognition result of the imaging device to be tested, the imaging performance of the imaging device to be tested is determined. In the solution provided by this application, in addition to considering the resolution information of the imaging device to be tested provided by the manufacturer, it also considers the first recognition result obtained based on the first test image captured by the imaging device to be tested when using standard test cases, and the second recognition result obtained based on the second test image captured by the imaging device to be tested when using business test cases. By comprehensively considering the above, the imaging performance of the imaging device to be tested is finally determined. This imaging performance can not only reflect the basic imaging performance of the imaging device to be tested, but also reflect the imaging performance of the imaging device to be tested in specific services, making the test of the imaging performance of the imaging device more effective and accurate.
[0022] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0024] Figure 1 It is a schematic diagram of the implementation environment of an imaging performance test method provided by an embodiment of the present application;
[0025] Figure 2 It is a schematic flowchart of an imaging performance test method provided by an embodiment of the present application;
[0026] Figure 3 It is a schematic flowchart of determining the first recognition result provided by an embodiment of the present application;
[0027] Figure 4 It is a schematic flowchart of image preprocessing and first text recognition provided by an embodiment of the present application;
[0028] Figure 5 It is a schematic flowchart of first text recognition provided by an embodiment of the present application;
[0029] Figure 6It is a schematic flowchart of another first text recognition provided by an embodiment of the present application;
[0030] Figure 7 It is a schematic flowchart of a process for obtaining a second test image provided by an embodiment of the present application;
[0031] Figure 8 It is a schematic flowchart of a process for determining a second recognition result provided by an embodiment of the present application;
[0032] Figure 9 It is a schematic diagram of constructing an association relationship provided by an embodiment of the present application;
[0033] Figure 10 It is a schematic diagram of a product embedded with an imaging device provided by an embodiment of the present application;
[0034] Figure 11 It is a schematic flowchart of a process for screening a camera provided by an embodiment of the present application;
[0035] Figure 12 It is a schematic diagram of the installation position of a camera provided by an embodiment of the present application;
[0036] Figure 13 It is a schematic diagram of simulating a shooting effect provided by an embodiment of the present application;
[0037] Figure 14 It is a schematic diagram of a real shooting effect provided by an embodiment of the present application;
[0038] Figure 15 It is a schematic diagram of an imaging performance test device provided by an embodiment of the present application;
[0039] Figure 16 It is a schematic diagram of the hardware structure of a device for implementing an imaging performance test method provided by an embodiment of the present application. Detailed implementation manners
[0040] Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable machines to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, autonomous driving, and intelligent transportation. With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, driverless, autonomous driving, drones, robots, intelligent healthcare, intelligent customer service, vehicle networking, autonomous driving, and intelligent transportation. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0041] The solution provided by the embodiments of this application relates to technologies such as computer vision (CV) in artificial intelligence.
[0042] Computer Vision Technology (Computer Vision, CV) Computer vision is a science that studies how to enable machines to "see". Further, it refers to using cameras and computers to replace human eyes for tasks such as object recognition, tracking, and measurement in machine vision, and further performing graphic processing to make the computer-processed images more suitable for human eyes to observe or be transmitted to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies and attempts to build artificial intelligence systems that can obtain information from images or multi-dimensional data. Computer vision technology usually includes technologies such as image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, autonomous driving, and intelligent transportation, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.
[0043] The solution provided by the embodiments of this application can be deployed in the cloud, which also involves cloud technology and so on.
[0044] Cloud technology: It refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing. It can also be understood as the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture-based websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the background system for logical processing. Data at different levels will be processed separately, and various industry data requires the support of a powerful system. Therefore, cloud technology needs to be supported by cloud computing. Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services according to needs. The network that provides resources is called the "cloud". The resources in the "cloud" seem to be infinitely expandable to users, and can be obtained at any time, used on demand, expanded at any time, and paid according to usage. As a basic capability provider of cloud computing, a cloud computing resource pool platform will be established, abbreviated as the cloud platform, generally referred to as Infrastructure as a Service (IaaS). Various types of virtual resources are deployed in the resource pool for external customers to choose and use. The cloud computing resource pool mainly includes: computing devices (which can be virtual machines, including operating systems), storage devices, and network devices.
[0045] To effectively and accurately measure the imaging performance of an imaging device, the embodiments of the present application provide an imaging performance test method, device, medium, and equipment. The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions from beginning to end.
[0046] It should be noted that the terms "first", "second", etc. in the description, claims and the above-mentioned drawings of the present application are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or server that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0047] To facilitate the understanding of the technical solutions described in the embodiments of the present application and the technical effects produced thereby, the embodiments of the present application explain the relevant professional terms involved:
[0048] Resolution: The resolution of a lens is also called resolving power. Resolving power characterizes the ability to resolve the details of the photographed original object. Resolving power is a physical quantity used to describe the ability of a microphotography system to reproduce the fine parts of the photographed original, and is an important index for evaluating the resolving power of an image.
[0049] OCR: Optical Character Recognition, which is the process of an electronic device (such as a scanner or digital camera) checking the characters printed on paper, determining their shapes by detecting dark and bright patterns, and then translating the shapes into computer text using character recognition methods; that is, for printed characters, the text in a paper document is converted into a black-and-white dot-matrix image file in an optical manner, and the text in the image is converted into a text format by an identification software for further editing and processing by a word processing software. How to debug or use auxiliary information to improve the recognition accuracy is the most important topic of OCR, and the term ICR (Intelligent Character Recognition) has thus emerged. The main indicators for measuring the performance of an OCR system are: rejection rate, error recognition rate, recognition speed, friendliness of the user interface, stability of the product, ease of use and feasibility, etc.
[0050] CTPN: Detecting Text in Natural Image with Connectionist Text Proposal Network, text detection based on a connection pre-selection box network; this algorithm mainly accurately locates the text lines in a picture. The basic approach is to directly generate a series of text proposals (pre-selection boxes) of appropriate sizes on the feature map obtained by convolution, so as to detect the text lines.
[0051] Textbox: A fast text detector based on a single deep neural network, which uses the network of SSD (Single Shot MultiBox Detector, one of the classic one-stage object detection models) for text detection.
[0052] EAST: An Efficient and Accurate Scene Text Detector, an efficient and accurate scene text detection model. This model can detect text at any angle, with relatively high speed, and has good detection effect on short English words.
[0053] PSENet: Progressive Scale Expansion Network, a progressive scale expansion network, which is a method based on semantic segmentation and is mainly used to detect text in any direction. It uses a progressive scale expansion method to distinguish adjacent text blocks. First, it can locate text of any shape. Second, it proposes a progressive scale expansion algorithm, which can successfully identify adjacent text blocks, that is, it can accurately detect text of any shape and accurately separate text instances closely.
[0054] DBNet: Differentiable Binarization Network, which can perform the binarization process in the segmentation network and can adaptively set the binarization threshold, not only simplifying the post-processing but also improving the performance of text detection.
[0055] CRNN: Convolutional Recurrent Neural Network, a convolutional recurrent neural network, which is an end-to-end network for text recognition
[0056] Attention mechanism: Attention Mechanism, a data processing method in machine learning, which is widely used in various types of machine learning tasks such as natural language processing, image recognition, and speech recognition.
[0057] LSTM: Long Short-Term Memory, a long short-term memory network, which is a type of recurrent neural network for time series.
[0058] CTC: It is a loss calculation method. Using CTC instead of Softmax Loss, the training samples do not need to be aligned.
[0059] Please refer to Figure 1 , which is a schematic diagram of the implementation environment of an imaging performance test method provided by an embodiment of this application, asFigure 1 As shown, the implementation environment may at least include a client 01 and a server 02.
[0060] Specifically, the client 01 may include devices such as smartphones, desktop computers, tablet computers, laptop computers, vehicle-mounted terminals, digital assistants, smart wearable devices, monitoring devices, and voice interaction devices. It may also include software running on the devices, such as web pages provided by some service providers to users, or applications provided by these service providers to users. Specifically, an imaging device, such as a camera or a scanner, is installed on the client 01. When testing with standard test cases, the first test image captured by the imaging device can be obtained, and when testing with business test cases, the second test image captured by the imaging device can be obtained.
[0061] Specifically, the server 02 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server 02 may include a network communication unit, a processor, a memory, and so on. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, which are not limited in this application. Specifically, the server 02 can be used to perform first text recognition and second text recognition respectively based on the first test image and the second test image obtained by the client, and correspondingly obtain the first recognition result and the second recognition result. Furthermore, the imaging performance of the imaging device can be determined according to the resolution information of the imaging device, the first recognition result, and the second recognition result.
[0062] In another feasible implementation, the client 01 performs second text recognition on the second test image to obtain a second recognition result. This second text recognition method is based on the recognition algorithm running in the client 01.
[0063] The embodiments of the present application can also be implemented in combination with cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing. It can also be understood as the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. Cloud technology requires cloud computing as a support. Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computing devices, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called the "cloud". Specifically, the server 02 and the database are located in the cloud, and the server 02 can be a physical machine or a virtualized machine.
[0064] The following introduces an imaging performance test method provided by the present application. Figure 2 It is a flowchart of an imaging performance test method provided by an embodiment of the present application. The present application provides the method operation steps as described in the embodiment or flowchart, but based on routine or non-creative labor, there may be more or fewer operation steps. The step order listed in the embodiment is only one of the execution orders of numerous steps and does not represent the only execution order. When the actual system or server product is executed, it can be executed in the order of the method shown in the embodiment or the accompanying drawings, or in parallel (for example, in an environment with parallel processors or multi-threaded processing). Please refer to Figure 2 An imaging performance test method provided by an embodiment of the present application may include the following steps:
[0065] S210: Obtain a standard test case, and obtain a first test image captured by the imaging device to be tested based on the standard test case.
[0066] It can be understood that most intelligent terminal devices are equipped with camera components to provide users with functions such as taking pictures. At the same time, the pictures taken by the camera are also applied in business scenarios such as image processing and image recognition, such as OCR recognition, object detection and classification. In the application of image recognition, the accuracy of the recognition result directly affects the feasibility of the application or product and the user experience. Whether the recognition result is accurate is not only closely related to the model algorithm of image recognition, but also related to the imaging performance of the imaging device that captures the image. Therefore, in order to select a suitable imaging device for applications or products based on image recognition, it is necessary to effectively and accurately measure the imaging performance of the imaging device. Especially in the case of refined vertical application fields or when the structure of the product device embedded with the imaging device is relatively special. Exemplarily, if the camera is installed obliquely on the product device, the camera will form a certain angle with the object to be photographed, and the angles and distances of the surrounding of the object to be photographed relative to the camera are all changing. It is difficult to directly judge whether the camera meets the requirements of the product device through the resolution of the camera.
[0067] In the embodiment of the present application, a standard test case is obtained, and the standard test case is photographed by the imaging device to be tested to obtain a corresponding first test image. Among them, the standard test case can be a test case corresponding to an idealized or conventional business scenario in a certain type of business. For example, for an image recognition business for educational assistance, the camera embedded in the product device generally takes pictures of papers such as books and test papers. When testing the imaging performance of the camera embedded in the product device, the standard test case can specify elements such as the size, font, line height, and spacing of the paper, such as using A4 paper with a font size of No. 5 and a line spacing of 30. Further, in addition to limiting the parameters of the object to be photographed, the standard test case can also specify the environmental parameters to be photographed, such as light brightness, color temperature, etc. The embodiment of the present application will not elaborate on this.
[0068] S220: Perform first text recognition on the first test image to obtain a first recognition result.
[0069] In an embodiment of the present application, first text recognition is performed on a first test image obtained based on a standard test case to obtain a first recognition result. This first recognition result represents the recognition accuracy of the first test image. Implicitly, this first recognition result is also related to the imaging performance of the imaging device to be measured. Moreover, since the test is performed using a standard test case, the obtained first recognition result can represent the basic imaging performance of the imaging device to be measured. For imaging devices with different configurations, there are differences in the first test images obtained by photographing the same standard test case. Furthermore, by performing the same first text recognition process on multiple first test images, corresponding first recognition results are obtained. The differences in the first recognition results corresponding to multiple first test images also reflect the differences in the imaging performance of imaging devices with different configurations.
[0070] In an embodiment of the present application, image preprocessing is performed on the first test image and first text recognition in a preset manner is performed on the preprocessed image to obtain a first recognition result. Specifically, as Figure 3 shown, step S220 may include the following steps:
[0071] S221: Perform image preprocessing on the first test image to obtain a first image to be recognized.
[0072] Specifically, the image preprocessing may include: performing scale change processing or distortion correction processing on the first test image to obtain the first image to be recognized. The scale change processing includes, but is not limited to, image scaling and size cropping; due to deviations in lens manufacturing accuracy and assembly process, distortion will be introduced, resulting in distortion of the original image. Therefore, distortion correction processing is also required when necessary.
[0073] Exemplarily, if the camera is installed obliquely on the product device and there is a certain angle between the camera and the object to be photographed, the image content near the camera end will be clearer than the image content far from the camera end. Moreover, in order to capture complete content information, the first test image also covers some irrelevant elements, such as the table on which the paper is placed, etc. Therefore, in this case, the image preprocessing can effectively retain key information.
[0074] S223: Perform first text recognition on the first image to be recognized to obtain the first recognition result, and the first recognition result represents the text recognition accuracy of the first test image.
[0075] Specifically, the first text recognition may be an artificial intelligence-based optical character recognition method. Based on the text detection algorithm and text recognition algorithm in artificial intelligence, candidate texts in the first image to be recognized are obtained. The candidate texts are the recognized text contents, and then the candidate texts are compared with the standard texts corresponding to the standard test cases to obtain a first recognition result, which can represent the text recognition accuracy of the first test image.
[0076] In a feasible implementation manner, as Figure 4 shown, for the standard test case using A4 paper, first, the imaging device to be tested in the product device, i.e., the camera, is called to take a photo and obtain the original image data, that is, the first test image. The image format of the first test image can be JPEG (Joint Photographic Experts Group, an image file format), and the image information of the first test image is saved in the form of a byte array. Secondly, in the image preprocessing stage, the byte array of the original image data is decoded into an editable data type, such as Bitmap (bitmap) or Mat (a memory object used to store image information in computer vision). Then, image cropping, scaling, or distortion correction is performed. That is, the part of the product device or the desktop part captured in the image can be cropped, and only the content within the A4 paper range as the standard test case is retained. Then, scaling is performed to scale the image to a size acceptable by the background server. If the image is distorted, further distortion correction will be performed to obtain an image with only valid A4 content. Finally, the image is encoded and compressed and uploaded to the server providing OCR recognition service for text recognition in the image, and the server compares the recognized text content with the real text content in the standard test case to obtain the first recognition result corresponding to the original image data.
[0077] In another embodiment of the present application, the first text recognition may be artificial intelligence-based optical character recognition, mainly using the text detection algorithm and text recognition algorithm in artificial intelligence. Specifically, as Figure 5 shown, step S223 may include the following steps:
[0078] S2231: Input the first image to be recognized into the text detection network for text detection processing to obtain the first text feature information corresponding to the first image to be recognized.
[0079] Specifically, text detection methods can generally be divided into regression-based text detection methods and segmentation-based text detection methods. Among them, regression-based text detection algorithms can adopt CTPN model algorithm, Textbox model algorithm, and EAST model algorithm based on candidate box regression. Such algorithms have good detection effects on regular-shaped text. Additionally, methods based on pixel value regression can also be used, mainly including CRAFT and SA-Text. Such algorithms have good detection effects on curved text or small text. Furthermore, segmentation-based text detection methods can adopt PSENet model algorithm, DBNet model algorithm, etc. Such algorithms are not restricted by the shape of the text and can achieve good results for various shapes of text. Preferably, the model algorithm based on candidate box regression and the model algorithm based on segmentation can be combined. First, determine the candidate regions containing text content, and then segment the text within the candidate regions to obtain a set of unit characters. The unit characters can be a single Chinese character, a single English character, a single numerical character, etc. The combination of the two can further improve the text detection effect.
[0080] S2232: Input the first text feature information into a text recognition network for text recognition processing to obtain the first text recognition information corresponding to the first image to be recognized.
[0081] Specifically, text recognition methods can include OCR recognition methods based on CRNN and OCR recognition methods based on the attention mechanism. Among them, the OCR recognition method based on CRNN introduces the model structure of LSTM+CTC to solve the problem of aligning variable-length sequences; the OCR recognition method based on the attention mechanism refers to the Encoder-Decoder model and helps feature alignment through the attention mechanism. Preferably, text recognition can be performed mainly based on the OCR recognition method based on CRNN and combined with the attention mechanism.
[0082] S2233: Obtain the text reference information corresponding to the standard test case.
[0083] The text reference information corresponding to the standard test case is preset known information.
[0084] S2234: Obtain the first recognition result according to the comparison result between the first text recognition information and the text reference information. The first recognition result represents the accuracy of text recognition of the first test image.
[0085] Such as Figure 6As shown, perform OCR recognition on the first image to be recognized, compare the obtained first text recognition information with the text reference information, such as performing character matching in sequence, calculate the number of correctly recognized characters, and further obtain the recognition accuracy data for this time.
[0086] S230: Obtain a service test case, and obtain a second test image captured by the imaging device to be tested based on the service test case.
[0087] In the embodiments of the present application, obtain a service test case, and use the imaging device to be tested to capture the service test case to obtain a corresponding second test image. Among them, the service test case can be one or more test cases corresponding to one or more real service scenarios in a certain type of service. For example, for an image recognition service for educational assistance, in a real service scenario, the content of the paper to be captured can be Chinese text, English text, numerical characters, etc., and the fonts can include printed fonts and handwritten fonts. For handwritten text content, its font size, line height spacing, etc. are all variable. In addition, the service test case can also set the environmental parameters of the captured image, such as light brightness, color temperature, etc. The imaging performance reflected by the imaging device under different brightness and different color temperatures will also vary. Therefore, in order to effectively recognize the text content in the real service scenario, in addition to improving the recognition effectiveness of the software algorithm, it is also necessary to select a suitable imaging device for the software algorithm, service requirements, or product device structure, etc. Selecting an imaging device only based on the resolution parameters detected when the imaging device leaves the factory, its imaging performance may not be adapted to the service requirements, product structure, algorithm model, etc., and thus cannot effectively and accurately provide image recognition service.
[0088] In another embodiment of the present application, as Figure 7 shown, the step S230 may include the following steps:
[0089] S231: Obtain a service test case, and the service test case corresponds to a service scenario; the service scenario includes the relative position between the imaging device to be tested and the service test case, the external environment where the imaging device to be tested is located, or the text recognition algorithm used in the text recognition service.
[0090] S233: Obtain a second test image captured by the imaging device to be tested based on the service test case.
[0091] Preferably, when the product device structure is relatively special, such as the imaging device to be embedded has a certain tilt angle relative to the object to be captured, in order to effectively detect the imaging performance of the imaging device in the product device, the relative position between the service test case and the imaging device to be tested can be limited, so that the imaging device selected according to the imaging performance is more adapted to the structure of the product device.
[0092] Preferably, in an actual text recognition service, the usage environment of a product device embedded with an imaging device does not remain unchanged. In order to enable the product device to provide better image text recognition services in different external environments, the imaging device needs to exhibit good imaging performance in different external environments. Therefore, the external environment in which the imaging device to be tested is located can be set through business test cases to more accurately test the imaging performance of the imaging device to be tested.
[0093] Preferably, different types of text recognition services apply different text recognition algorithms and have different requirements for image data. Therefore, in order to make the selected imaging device compatible with the selected text recognition algorithm, the text recognition algorithm used during the test can also be set through business test cases to perform text recognition on the second test image obtained based on the business test cases, so as to examine the influence of the imaging performance demonstrated by the imaging device to be tested on the recognition results of the text recognition algorithm.
[0094] S240: Perform second text recognition on the second test image to obtain a second recognition result.
[0095] In the embodiment of the present application, second text recognition is performed on the second test image obtained based on the business test cases to obtain a second recognition result. This second recognition result characterizes the recognition accuracy of the second test image. Implicitly, this second recognition result is also related to the imaging performance of the imaging device to be tested. Moreover, since the test is performed using business test cases related to the business scenario, the obtained second recognition result can characterize the imaging performance demonstrated by the imaging device to be tested when applied to this type of business. Imaging devices with different configurations have differences in the second test images taken for the same business test case. Furthermore, by performing the same second text recognition process on multiple second test images, corresponding second recognition results are obtained. The differences in the second recognition results corresponding to multiple second test images also reflect the differences in the imaging performance of imaging devices with different configurations.
[0096] In an embodiment of the present application, image preprocessing is performed on the second test image and second text recognition in a preset manner is performed on the preprocessed image to obtain a second recognition result. As Figure 8 shown, the step S240 may include the following steps:
[0097] S241: Perform image preprocessing on the second test image to obtain a second image to be recognized.
[0098] Specifically, the image preprocessing may include: performing scale change processing or distortion correction processing on the second test image to obtain a second image to be recognized. The scale change processing includes, but is not limited to, image scaling and size cropping.
[0099] S243: Based on the text recognition algorithm adopted in the text recognition service, perform second text recognition on the second image to be recognized, and obtain the second recognition result, where the second recognition result represents the text recognition accuracy of the second test image.
[0100] It should be noted that, in order to adapt to business requirements, product structure, and the software algorithm on which the product runs, when performing second text recognition on the second test image in the embodiments of the present application, the software algorithm running on the product in the actual business is used to perform text recognition, so that the obtained second recognition result can represent the imaging performance reflected when the imaging device to be tested is applied to specific services, applications, and products.
[0101] Optionally, the second text recognition method can also adopt text detection methods and text recognition methods based on artificial intelligence, which will not be elaborated here, and both the text detection model and the text recognition model have been trained, and the training set is sample data related to actual business and applications.
[0102] S250: Determine the imaging performance of the imaging device to be tested according to the resolution information of the imaging device to be tested, the first recognition result, and the second recognition result.
[0103] In the embodiments of the present application, the imaging performance of the imaging device to be tested will be detected when it leaves the factory. Generally, it can be characterized by resolution. The resolution of the lens is also called resolving power, and the resolving power represents the ability to distinguish the details of the original object being photographed. And the first recognition result obtained in the embodiments of the present application can represent the basic imaging performance of the imaging device to be tested when using standard test cases for testing. Since it is an idealized or conventional shooting scenario, it can represent the basic imaging ability of the imaging device to be tested; the second recognition result obtained in the embodiments of the present application can represent the imaging performance reflected by the imaging device to be tested in specific business scenario use cases. As Figure 9 shown, in the embodiments of the present application, considering the above three types of indicators, the imaging performance of the imaging device to be tested in the designed text recognition service is finally determined, making the test of the imaging performance of the imaging device to be tested more effective and accurate.
[0104] In an embodiment of the present application, the determining the imaging performance of the imaging device to be tested may include the following steps:
[0105] S251: Obtain the resolution information of each imaging device to be tested among multiple imaging devices to be tested, where the resolution information represents the imaging clarity ability of the imaging device to be tested.
[0106] S253: Determine the correlation threshold according to the resolution information of each imaging device to be measured, the first recognition result of each imaging device to be measured, and the second recognition result of each imaging device to be measured.
[0107] Specifically, in the same service, based on the resolution information, the first recognition result, and the second recognition result corresponding to each of the multiple imaging devices to be measured as the data basis, determine the correlation threshold. This correlation threshold includes the index thresholds of three types of indicators (i.e., resolution, the first recognition result, and the second recognition result), and the index thresholds restrict and correlate with each other. For example, this correlation threshold can be the threshold ranges of the first recognition result and the second recognition result when the resolution meets the preset threshold range, or it can be the minimum thresholds of the resolution and the first recognition result when the second recognition result meets the preset minimum threshold, or it can also be the minimum threshold corresponding to the resolution index when the first recognition result and the second recognition result meet their respective preset minimum thresholds.
[0108] S255: Based on the correlation threshold, the resolution information, the first recognition result, and the second recognition result, determine the imaging performance of each of the imaging devices to be measured in the text recognition service.
[0109] Specifically, compare the resolution information, the first recognition result, and the second recognition result of each imaging device to be measured with the three types of index thresholds included in the correlation threshold, and determine the imaging performance of each imaging device to be measured in the text recognition service to be applied according to the comparison results. Exemplarily, the index thresholds of the three types of indicators included in the correlation threshold are respectively the lowest threshold of the recognition accuracy rate corresponding to the first recognition result, the lowest threshold of the recognition accuracy rate corresponding to the second recognition result, and the lowest threshold of the resolution under the foregoing conditions. If the three types of index data of one of the imaging devices to be measured are all higher than the corresponding index thresholds, it can be determined that the imaging performance of this imaging device to be measured in the text recognition service to be applied is relatively good.
[0110] Comprehensively consider the above three types of indicators, and thus finally determine the imaging performance of the imaging device to be measured, making the test of the imaging performance of the imaging device to be measured more effective and accurate.
[0111] In the stage of selecting a suitable imaging device for a service, application, or product, based on the imaging performance of each imaging device to be measured, select a target imaging device adapted to the text recognition service from the multiple imaging devices to be measured.
[0112] Furthermore, selecting a target imaging device based on the imaging performance finally determined in the embodiments of the present application can not only effectively meet the requirements of the service, application, or product, but also effectively control the economic cost and facilitate mass production.
[0113] In the above embodiments, the solution provided by the present application not only considers the resolution information of the imaging device to be tested provided by the manufacturer, but also considers the first recognition result obtained based on the first test image captured by the imaging device to be tested when using the standard test case, and the second recognition result obtained based on the second test image captured by the imaging device to be tested when using the business test case. By comprehensively considering the above three types of data, the imaging performance of the imaging device to be tested is finally determined. This imaging performance can not only reflect the basic imaging performance of the imaging device to be tested, but also reflect the imaging performance of the imaging device to be tested in specific services, making the test of the imaging performance of the imaging device more effective and accurate.
[0114] In a specific application scenario provided by the embodiments of the present application, a smart table lamp product device is provided. This product device can capture books, textbooks, homework, etc. through the embedded camera and perform text recognition through the built-in software algorithm. For example Figure 10 As shown, as a table lamp, the smart table lamp can provide the most basic lighting function. However, as a type of smart terminal, it also has multiple functions such as taking pictures and recognizing homework, checking homework, and fingertip reading to assist students in learning. When using these functions, the camera needs to take pictures, and books or homework books need to be placed under the camera of the smart table lamp for the table lamp to take pictures and recognize.
[0115] In the design stage of the smart table lamp, the following specific product and service requirements are proposed: the head of the table lamp, that is, the part where the light is installed, can rotate 360 degrees to better meet the user experience; the imaging effect of the camera is required to be high, and it can recognize text in 5th font size.
[0116] When selecting a suitable camera for this product device, the imaging performance test method provided by the above embodiments can be used, so that a camera that meets the service requirements and is adapted to the product structure can be selected. Specifically, for example Figure 11As shown, in addition to considering the resolution information of cameras 1 to n, the first recognition results corresponding to each camera are obtained by using standard test cases, and the second recognition results corresponding to each camera are obtained by using business test cases. Based on the above three types of data, a suitable camera is selected for the product device. In a feasible selection method, referring to the actual recognition accuracy standard corresponding to the product and business requirements, the n cameras are screened according to the second recognition results, and the camera corresponding to the lowest resolution that can meet the actual recognition accuracy standard is determined. This camera can be used as the finally selected camera, and the first recognition result corresponding to this camera is determined. In the mass production stage of the smart table lamp, the first recognition result corresponding to this camera is used as one of the qualified standards for product quality inspection. Using standard test cases can facilitate and quickly implement quality inspection in the mass production stage. In another feasible selection method, abnormal situations can also be discriminated. For example, for multiple cameras with the same resolution information, their first recognition results vary greatly. Since the first recognition result is obtained based on standard test cases, one of the reasons for the large difference may be that the resolution information provided by the camera manufacturer is incorrect, and re-detection is required to accurately test the imaging performance of the camera. Another reason for the large difference may be the recognition algorithm. The imaging effect can be judged by manual visual recognition. If it is a problem with the recognition algorithm, the recognition algorithm can be optimized. In another feasible selection method, the cameras can also be screened according to the first recognition result and the second recognition result, and the camera with the lowest resolution that meets the accuracy of the first recognition result and the accuracy of the second recognition result is determined, or the cameras with the accuracy of the second recognition result greater than the accuracy of the first recognition result are screened out, and then the camera with the lowest resolution is selected from them. Generally, the lower the resolution, the lower the cost of the camera, and the economic cost can be effectively controlled while meeting the business requirements.
[0117] According to the above product and business requirements, the installation position of the camera is also designed in the embodiments of the present application. As Figure 12 shown, because 360-degree rotation is required, if the camera rotates along with it, it is not convenient to photograph the book in a fixed position. If the book also needs to follow the angle of the camera and be placed at a certain angle every time the camera rotates, it may cause artificial jitter and affect the shooting effect. Therefore, the camera cannot be installed in the direction perpendicular to the bottom of the table lamp, that is, the camera cannot be installed at Figure 12 the place numbered 2 in Figure 12 The place numbered 3 in
[0118] Furthermore, it is necessary to determine the installation height and tilt angle of the camera. On the one hand, according to actual experience and tests, the higher the camera is in the vertical direction of the lamp, the larger the range that can be photographed. The closer it is to the base of the table lamp, the larger the range of the table lamp itself that is photographed. This part belongs to the invalid part and needs to be cropped to avoid affecting the real effective part. Therefore, the height of the camera can be defined as at 1 shown in Figure 12 , and the height is denoted as h(t). On the other hand, the angle of the camera is related to various service factors such as the actual resolution of the camera, the content inside the object being photographed, i.e., the font size, line spacing of the words, target clarity, and the range of the table lamp itself being photographed. Let R(y) represent the resolution of the camera in the vertical direction, F(s) represent the font size, F(h) represent the line height, and the proportion of the A4 paper photographed in the entire photographed picture be P(t). Then, in order to meet the above service requirements, the above variables need to satisfy the conditions indicated by formula (1):
[0119] R(y)*P(t)>F(s)*F(h); (1)
[0120] According to the size that the A4 paper needs to be imaged in the photographed picture, starting from the edge of the table lamp base, the relationship between the camera angle, height, and the placement position of the A4 paper can be sorted out, as shown in formula (2):
[0121] A(t)→h(t)P(t); (2)
[0122] Where A(t) represents the angle between the camera and the vertical direction, h(t) is the height of the camera, and P(t) refers to the proportion of the A4 paper in the entire image in the actual imaging.
[0123] According to the above formulas, the height and angle of the camera and the effect simulation of the actual A4 paper in the actual photograph can be roughly carried out. The simulation effect can be as shown in Figure 13 . The solid line area on the periphery is the field of view area of the camera, that is, the imaging area. The imaging area includes the paper area and the base area. In actual applications, it is necessary to ensure that the base area does not cover the paper area, and the proportion of the paper area in the imaging area is also P(t). According to the formulas and the simulation effect, the angle between the camera and the vertical direction can be truly calculated and actually verified. The actual effect can be as shown in Figure 14As shown, the font size in the paper is No. 4. Since the camera has a certain tilt angle relative to the desktop, the text on the side closer to the base of the table lamp in the captured image is larger than the text on the side farther from the base of the table lamp. When the imaging effect meets the initial business requirements, based on this, intelligent recognition is performed on the image to obtain the first recognition result and the second recognition result, so as to test the imaging performance of the camera in the product device of this structure applied to specific business. The above embodiments can be referred to and will not be elaborated here.
[0124] An embodiment of the present application also provides an imaging performance testing device 1500, as Figure 15 shown, the device may include:
[0125] A first acquisition module 1510, configured to acquire a standard test case, and obtain a first test image captured by the imaging device to be tested based on the standard test case;
[0126] A first recognition module 1520, configured to perform first text recognition on the first test image to obtain a first recognition result;
[0127] A second acquisition module 1530, configured to acquire a business test case, and obtain a second test image captured by the imaging device to be tested based on the business test case;
[0128] A second recognition module 1540, configured to perform second text recognition on the second test image to obtain a second recognition result;
[0129] An imaging performance determination module 1550, configured to determine the imaging performance of the imaging device to be tested according to the resolution information of the imaging device to be tested, the first recognition result, and the second recognition result.
[0130] In an embodiment of the present application, the first recognition module 1520 may include:
[0131] A first image preprocessing unit, configured to perform image preprocessing on the first test image to obtain a first image to be recognized;
[0132] A first recognition unit, configured to perform first text recognition on the first image to be recognized to obtain the first recognition result, and the first recognition result represents the text recognition accuracy of the first test image.
[0133] In an embodiment of the present application, the image preprocessing unit may include:
[0134] A first processing subunit, configured to perform scale change processing or distortion correction processing on the first test image to obtain the first image to be recognized.
[0135] In one embodiment of the present application, the first recognition unit may include:
[0136] A text detection sub-unit, configured to input the first image to be recognized into a text detection network, perform text detection processing, and obtain first text feature information corresponding to the first image to be recognized;
[0137] A text recognition sub-unit, configured to input the first text feature information into a text recognition network, perform text recognition processing, and obtain first text recognition information corresponding to the first image to be recognized;
[0138] A text reference information acquisition sub-unit, configured to acquire text reference information corresponding to the standard test case;
[0139] A comparison sub-unit, configured to obtain the first recognition result according to a comparison result between the first text recognition information and the text reference information, where the first recognition result represents the text recognition accuracy of the first test image.
[0140] In one embodiment of the present application, the second acquisition module 1530 may include:
[0141] A service test case unit, configured to acquire a service test case, where the service test case corresponds to a service scenario; the service scenario includes a relative position between the imaging device to be tested and the service test case, an external environment where the imaging device to be tested is located, or a text recognition algorithm used in a text recognition service;
[0142] A second test image acquisition unit, configured to obtain a second test image captured by the imaging device to be tested based on the service test case.
[0143] In one embodiment of the present application, the second recognition module 1540 may include:
[0144] A second image preprocessing unit, configured to perform image preprocessing on the second test image to obtain a second image to be recognized;
[0145] A second recognition unit, configured to perform second text recognition on the second image to be recognized based on the text recognition algorithm used in the text recognition service, and obtain the second recognition result, where the second recognition result represents the text recognition accuracy of the second test image.
[0146] In one embodiment of the present application, the imaging performance determination module 1550 may include:
[0147] A resolution information acquisition unit, configured to acquire resolution information of each imaging device to be tested among a plurality of imaging devices to be tested, where the resolution information represents the imaging clarity ability of the imaging device to be tested;
[0148] An association threshold determination unit, configured to determine an association threshold according to the resolution information of each imaging device to be measured, the first recognition result of each imaging device to be measured, and the second recognition result of each imaging device to be measured;
[0149] An imaging performance determination unit, configured to determine the imaging performance of each imaging device to be measured in the text recognition service based on the association threshold, the resolution information, the first recognition result, and the second recognition result.
[0150] In an embodiment of the present application, the device 1500 may further include:
[0151] A screening unit, configured to select a target imaging device adapted to the text recognition service from the multiple imaging devices to be measured based on the imaging performance of each imaging device to be measured.
[0152] It should be noted that, when the device provided in the above embodiment realizes its functions, only the division of the above function modules is used for illustration. In actual applications, the above functions may be allocated to different function modules according to needs, that is, the internal structure of the device is divided into different function modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0153] An embodiment of the present application provides a computer device, which includes a processor and a memory. At least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement an imaging performance test method as provided in the above method embodiment.
[0154] Figure 16 Shows a schematic hardware structure diagram of a device for implementing an imaging performance test method provided in an embodiment of the present application. The device may participate in forming or include the device or system provided in the embodiment of the present application. As Figure 16 shown, the device 10 may include one or more (shown as 1002a, 1002b,..., 1002n in the figure) processors 1002 (the processor 1002 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand,Figure 16 The structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, device 10 may also include more or fewer components than those shown in Figure 16 , or have a configuration different from that shown in Figure 16 .
[0155] It should be noted that the above one or more processors 1002 and / or other data processing circuits can generally be referred to as "data processing circuits" herein. The data processing circuit can be embodied in software, hardware, firmware or any combination thereof, in whole or in part. In addition, the data processing circuit can be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in device 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (such as the selection of a variable resistance terminal path connected to an interface).
[0156] The memory 1004 can be used to store software programs and modules of application software, such as the program instructions / data storage devices corresponding to the methods described in the embodiments of the present application. The processor 1002 executes various functional applications and data processing by running the software programs and modules stored in the memory 1004, that is, implements the above-mentioned imaging performance test method. The memory 1004 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 1004 may further include a memory remotely located relative to the processor 1002, and these remote memories can be connected to device 10 through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network and combinations thereof.
[0157] The transmission device 1006 is used to receive or send data via a network. Specific examples of the above network may include the wireless network provided by the communication provider of device 10. In one instance, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 1006 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0158] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of device 10 (or mobile device).
[0159] The embodiments of the present application further provide a computer-readable storage medium, which can be disposed in a server to store at least one instruction or at least one program related to an imaging performance test method in the method embodiments. The at least one instruction or the at least one program is loaded and executed by the processor to implement the imaging performance test method provided in the above method embodiments.
[0160] Optionally, in this embodiment, the above storage medium may be located in at least one of multiple network servers in a computer network. Optionally, in this embodiment, the above storage medium may include, but is not limited to, various media that can store program codes such as USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs.
[0161] The embodiments of the present invention further provide a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes an imaging performance test method provided in the above various optional implementation manners.
[0162] As can be seen from the embodiments of the imaging performance test method, device, medium, and equipment provided by the present application above,
[0163] The solution provided by the present application obtains a first test image captured by the imaging device to be tested based on a standard test case, and then performs first text recognition on the first test image to obtain a first recognition result; at the same time, a second test image captured by the imaging device to be tested is obtained based on a service test case, and then second text recognition is performed on the second test image to obtain a second recognition result; finally, according to the resolution information, the first recognition result, and the second recognition result of the imaging device to be tested, the imaging performance of the imaging device to be tested is determined. In the solution provided by the present application, in addition to considering the resolution information of the imaging device to be tested provided by the manufacturer, the first recognition result obtained based on the first test image captured by the imaging device to be tested when using the standard test case, and the second recognition result obtained based on the second test image captured by the imaging device to be tested when using the service test case are also considered. Based on the above, the imaging performance of the imaging device to be tested is finally determined. The imaging performance can reflect both the basic imaging performance of the imaging device to be tested and the imaging performance of the imaging device to be tested in a specific service, making the test of the imaging performance of the imaging device more effective and accurate.
[0164] It should be noted that: The above order of embodiments of the present application is only for description and does not represent the superiority or inferiority of the embodiments. And the specific embodiments of the present application are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0165] Each embodiment in the present application is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, equipment, and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.
[0166] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by a program instructing the relevant hardware. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk, an optical disk, or the like.
[0167] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An imaging performance testing method, characterized in that, The method includes: Obtaining a standard test case, and obtaining a first test image captured by the imaging device to be measured based on the standard test case; Performing first text recognition on the first test image to obtain a first recognition result; Obtaining a business test case, and obtaining a second test image captured by the imaging device to be measured based on the business test case; the business test case corresponds to a business scenario; Performing second text recognition on the second test image to obtain a second recognition result; Determining the imaging performance of the imaging device to be measured according to a correlation threshold, the resolution information of the imaging device to be measured, the first recognition result, and the second recognition result; Wherein, the correlation threshold is determined according to the resolution of each imaging device to be measured, the first recognition result of each imaging device to be measured, and the second recognition result of each imaging device to be measured among multiple imaging devices to be measured in the same business scenario; the correlation threshold includes index thresholds corresponding to the resolution information, the first recognition result, and the second recognition result respectively, and the index thresholds restrict and correlate with each other.
2. The method according to claim 1, wherein The performing first text recognition on the first test image to obtain a first recognition result includes: Performing image preprocessing on the first test image to obtain a first image to be recognized; Performing first text recognition on the first image to be recognized to obtain the first recognition result, and the first recognition result represents the text recognition accuracy of the first test image.
3. The method according to claim 2, wherein The performing image preprocessing on the first test image to obtain a first image to be recognized includes: Performing scale change processing or distortion correction processing on the first test image to obtain the first image to be recognized.
4. The method according to claim 2, wherein The performing first text recognition on the first image to be recognized to obtain a first recognition result includes: Inputting the first image to be recognized into a text detection network for text detection processing to obtain first text feature information corresponding to the first image to be recognized; Inputting the first text feature information into a text recognition network for text recognition processing to obtain first text recognition information corresponding to the first image to be recognized; Obtaining text reference information corresponding to the standard test case; Obtaining the first recognition result according to the comparison result between the first text recognition information and the text reference information, and the first recognition result represents the text recognition accuracy of the first test image.
5. The method according to claim 1, wherein The obtaining a business test case and obtaining a second test image captured by the imaging device to be measured based on the business test case includes: Obtaining a business test case, and the business scenario includes the relative position between the imaging device to be measured and the business test case, the external environment where the imaging device to be measured is located, or the text recognition algorithm adopted in the text recognition service; Obtaining a second test image captured by the imaging device to be measured based on the business test case.
6. The method according to claim 5, wherein The performing second text recognition on the second test image to obtain a second recognition result includes: Performing image preprocessing on the second test image to obtain a second image to be recognized; Based on the text recognition algorithm adopted in the text recognition service, perform second text recognition on the second image to be recognized to obtain the second recognition result, where the second recognition result represents the text recognition accuracy of the second test image.
7. The method according to claim 1, wherein The method further includes: Based on the imaging performance of each imaging device to be measured, select a target imaging device adapted to the text recognition service from the multiple imaging devices to be measured.
8. An imaging performance testing device, characterized in that, The apparatus includes: A first acquisition module, configured to acquire a standard test case and obtain a first test image captured by an imaging device to be measured based on the standard test case; A first recognition module, configured to perform first text recognition on the first test image to obtain a first recognition result; A second acquisition module, configured to acquire a service test case and obtain a second test image captured by the imaging device to be measured based on the service test case; the service test case corresponds to a service scenario; A second recognition module, configured to perform second text recognition on the second test image to obtain a second recognition result; An imaging performance determination module, configured to determine the imaging performance of the imaging device to be measured according to an association threshold, the resolution information of the imaging device to be measured, the first recognition result, and the second recognition result; Wherein, the association threshold is determined according to the resolution information of each imaging device to be measured, the first recognition result of each imaging device to be measured, and the second recognition result of each imaging device to be measured among multiple imaging devices to be measured in the same service scenario; the association threshold includes index thresholds corresponding to the resolution information, the first recognition result, and the second recognition result respectively, and the index thresholds restrict and are associated with each other.
9. The device according to claim 8, characterized in that, The first recognition module includes: A first image preprocessing unit, configured to perform image preprocessing on the first test image to obtain a first image to be recognized; A first recognition unit, configured to perform first text recognition on the first image to be recognized to obtain the first recognition result, where the first recognition result represents the text recognition accuracy of the first test image.
10. The device according to claim 9, characterized in that, The first image preprocessing unit includes: A first processing subunit, configured to perform scale change processing or distortion correction processing on the first test image to obtain the first image to be recognized.
11. The device according to claim 9, characterized in that The first recognition unit includes: A text detection subunit, configured to input the first image to be recognized into a text detection network for text detection processing to obtain first text feature information corresponding to the first image to be recognized; A text recognition subunit, configured to input the first text feature information into a text recognition network for text recognition processing to obtain first text recognition information corresponding to the first image to be recognized; A text reference information acquisition subunit, configured to acquire text reference information corresponding to the standard test case; A comparison subunit, configured to obtain the first recognition result according to the comparison result between the first text recognition information and the text reference information, where the first recognition result represents the text recognition accuracy of the first test image.
12. The device according to claim 8, characterized in that, The second acquisition module includes: A business test case unit for obtaining business test cases, where the business test cases correspond to business scenarios; the business scenarios include the relative position between the imaging device under test and the business test cases, the external environment in which the imaging device under test is located, or the text recognition algorithm used in the text recognition service. A second test image acquisition unit for obtaining a second test image captured by the imaging device under test based on the business test case.
13. The device according to claim 12, characterized in that, The second recognition module includes: A second image preprocessing unit for performing image preprocessing on the second test image to obtain a second image to be recognized. A second recognition unit for performing second text recognition on the second image to be recognized based on the text recognition algorithm used in the text recognition service, to obtain the second recognition result, where the second recognition result represents the text recognition accuracy of the second test image.
14. The device according to claim 8, characterized in that, The device further includes: A screening unit for selecting a target imaging device adapted to the text recognition service from the multiple imaging devices under test based on the imaging performance of each imaging device under test.
15. A computer-readable storage medium, characterized in that, At least one instruction or at least one program segment is stored in the computer-readable storage medium, and the at least one instruction or the at least one program segment is loaded and executed by a processor to implement an imaging performance test method according to any one of claims 1 to 7.
16. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one instruction or at least one program segment is stored in the memory, and the at least one instruction or the at least one program segment is loaded and executed by the processor to implement an imaging performance test method according to any one of claims 1 to 7.
17. A computer program product comprising computer instructions, characterized in that, When the computer instruction is executed by the processor, it implements an imaging performance test method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Evaluation system and evaluation method
CN109716748A