CN108959073B - Method and device for testing algorithm library, storage medium and electronic equipment - Google Patents

Method and device for testing algorithm library, storage medium and electronic equipment Download PDF

Info

Publication number
CN108959073B
CN108959073B CN201810621953.8A CN201810621953A CN108959073B CN 108959073 B CN108959073 B CN 108959073B CN 201810621953 A CN201810621953 A CN 201810621953A CN 108959073 B CN108959073 B CN 108959073B
Authority
CN
China
Prior art keywords
data type
electronic equipment
data
algorithm library
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810621953.8A
Other languages
Chinese (zh)
Other versions
CN108959073A (en
Inventor
张烨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810621953.8A priority Critical patent/CN108959073B/en
Publication of CN108959073A publication Critical patent/CN108959073A/en
Application granted granted Critical
Publication of CN108959073B publication Critical patent/CN108959073B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the application discloses a method and a device for testing an algorithm library, a storage medium and electronic equipment; the method comprises the following steps: when the algorithm library needs to be tested, an application program currently running by the electronic equipment is obtained, the data type of test data needing to be input is determined according to the application program, a camera device of the electronic equipment is started according to the data type, an image of a scene where the electronic equipment is located is obtained through the camera device, and the image is used as target data to test the algorithm library. According to the embodiment of the application, whether a single camera or double cameras on the electronic equipment are used for collecting images and used as test data can be determined according to the application program currently running in the electronic equipment during the test of the algorithm library, so that the test of the algorithm library is completed, and the accuracy of the test of the algorithm library by the electronic equipment can be improved.

Description

Method and device for testing algorithm library, storage medium and electronic equipment
Technical Field
The application relates to the field of electronic equipment, in particular to a method and a device for testing an algorithm library, a storage medium and electronic equipment.
Background
With the development of terminal technology, terminals have begun to change from simply providing telephony devices to a platform for running general-purpose software. The platform no longer aims at providing call management, but provides an operating environment including various application software such as call management, game and entertainment, office events, mobile payment and the like, and with a great deal of popularization, the platform has been deeply developed to the aspects of life and work of people.
Many functions on the electronic device are implemented by algorithms, and thus various algorithm libraries are integrated on the electronic device system. Typically, the algorithm library integrated on the electronic device system is iteratively updated as needed. Before updating the algorithm library, various tests need to be performed on the algorithm library of the new and old versions on the electronic device to determine the performance of the algorithm library of the new and old versions. However, in the related art, the accuracy of the electronic device is still poor when the electronic device tests the algorithm library.
Disclosure of Invention
The embodiment of the application provides a method and a device for testing an algorithm library, a storage medium and electronic equipment, which can improve the accuracy of the electronic equipment in testing the algorithm library.
In a first aspect, an embodiment of the present application provides a method for testing an algorithm library, including:
when the algorithm library needs to be tested, acquiring the application program currently operated by the electronic equipment;
determining the data type of the test data required to be input according to the application program;
starting a camera device of the electronic equipment according to the data type, and acquiring an image of a scene where the electronic equipment is located through the camera device;
and testing the algorithm library by taking the image as target data.
In a second aspect, an embodiment of the present application further provides a device for testing an algorithm library, including: the device comprises an acquisition module, a determination module, a shooting module and a test module;
the acquisition module is used for acquiring the currently running application program of the electronic equipment when the algorithm library needs to be tested;
the determining module is used for determining the data type of the test data required to be input according to the application program;
the shooting module is used for starting a camera device of the electronic equipment according to the data type and acquiring an image of a scene where the electronic equipment is located through the camera device;
and the test module is used for testing the algorithm library by taking the image as target data.
In a third aspect, an embodiment of the present application further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for testing the algorithm library.
In a fourth aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for testing the algorithm library when executing the program.
According to the method for testing the algorithm library, firstly, when the algorithm library needs to be tested, an application program which is currently operated by the electronic equipment is obtained, the data type of test data which needs to be input is determined according to the application program, a camera device of the electronic equipment is started according to the data type, an image of a scene where the electronic equipment is located is obtained through the camera device, and the algorithm library is tested by taking the image as target data. According to the embodiment of the application, whether a single camera or double cameras on the electronic equipment are used for collecting images and used as test data can be determined according to the application program currently running in the electronic equipment during the test of the algorithm library, so that the test of the algorithm library is completed, and the accuracy of the test of the algorithm library by the electronic equipment can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for testing an algorithm library according to an embodiment of the present disclosure.
Fig. 2 is another schematic flow chart of a method for testing an algorithm library according to an embodiment of the present disclosure.
Fig. 3 is a scene schematic diagram of a method for testing an algorithm library according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a testing apparatus for an algorithm library according to an embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of a testing apparatus of an algorithm library according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 7 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
In the description that follows, specific embodiments of the present application will be described with reference to steps and symbols executed by one or more computers, unless otherwise indicated. Accordingly, these steps and operations will be referred to, several times, as being performed by a computer, the computer performing operations involving a processing unit of the computer in electronic signals representing data in a structured form. This operation transforms the data or maintains it at locations in the computer's memory system, which may be reconfigured or otherwise altered in a manner well known to those skilled in the art. The data maintains a data structure that is a physical location of the memory that has particular characteristics defined by the data format. However, while the principles of the application have been described in language specific to above, it is not intended to be limited to the specific form set forth herein, and it will be recognized by those of ordinary skill in the art that various of the steps and operations described below may be implemented in hardware.
The principles of the present application may be employed in numerous other general-purpose or special-purpose computing, communication environments or configurations. Examples of well known computing systems, environments, and configurations that may be suitable for use with the application include, but are not limited to, hand-held telephones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe-based computers, and distributed computing environments that include any of the above systems or devices.
The details will be described below separately.
The embodiment will be described from the perspective of a testing apparatus of an algorithm library, where the apparatus may be specifically integrated in an electronic device, and the electronic device may be an electronic device with an image processing function, such as a mobile interconnection network device (e.g., a smart phone, a tablet computer).
Referring first to fig. 1, fig. 1 is a schematic flow chart of a method for testing an algorithm library according to an embodiment of the present application, including the following steps:
step S101, when the test of the algorithm library is needed, the application program currently running of the electronic equipment is obtained.
With the rapid development of the technology, the electronic device has more and more functions. Many functions on the electronic device are implemented by algorithms, and thus various algorithm libraries are integrated on the electronic device system. Typically, the algorithm library integrated on the electronic device system is iteratively updated as needed. Before updating the algorithm library, various tests need to be performed on the algorithm library of the new and old versions on the electronic device to determine the performance of the algorithm library of the new and old versions. However, in the related art, the electronic device generally uses the pre-collected data as the test input data, which makes the electronic device less accurate when testing the algorithm library.
Taking an AR (Augmented Reality) algorithm library as an example, when testing the AR algorithm library, the AR algorithm library is generally compared with the same standard library. This approach allows different data sets to be used for applications during testing that are inconsistent with, and in practice different from, the actual situation.
In the embodiment of the application, when the test of the algorithm library is required, the application program currently running by the electronic device is obtained.
The application program may be an application program that is currently running in the foreground of the electronic device, that is, the application program is an application program that is running in the foreground of the electronic device and displayed to a user for the user to perform an interactive operation, and specifically, the application program may be detected by detecting a process of the application program. For example, when it is detected that the network video application program process is in an open state, it is detected that the currently running foreground application program is the network video application program.
And step S102, determining the data type of the test data required to be input according to the application program.
In the existing electronic device, in order to further improve the shooting performance and the shooting quality of the electronic device, more and more terminal manufacturers adopt a scheme of two cameras, and the two cameras can shoot the current scene simultaneously, so that the depth of field information in the current scene can be obtained according to images respectively collected by the two cameras, and therefore, in an embodiment, the data types can include a single-shot data type and a double-shot data type.
And determining the data type of the test data to be input as a single shot data type or a double shot data type according to the application program. Specifically, the feature information of the application program may be obtained, and then the data type may be determined according to the feature information, where the feature information may include an application name, an application performance power consumption feature, application AR scene information, and the like.
Step 103, starting a camera of the electronic device according to the data type, and acquiring an image of a scene where the electronic device is located through the camera.
Specifically, if the current test application needs to use the double-shot data, the double-shot test data set is adopted for testing, otherwise, the single-shot data set is used for testing, so that the tested data and the scene correction of the current application are in line with reality, and the accuracy is improved. The double-shot data has the advantages that the identification plane is fast, a model with a specific size can be fixedly displayed, and the power consumption is high. That is, the method starts the camera device of the electronic device according to the data type, and obtains the image of the scene where the electronic device is located through the camera device, and includes:
if the data type is a single-shot data type, starting a single camera of the electronic equipment and acquiring an image of a scene where the electronic equipment is located through the single camera;
and if the data type is a double-camera data type, starting double cameras of the electronic equipment and acquiring images of the scene where the electronic equipment is located through the double cameras.
And step S104, testing the algorithm library by taking the image as target data.
After determining the source of the test input data, the electronic device may use the source of the test input data as target data of the test input data, and test the algorithm library according to the target data.
In an embodiment of the present invention, the electronic device may be any electronic device that can be provided with two cameras, for example: a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
As can be seen from the above, in the embodiment of the application, when the algorithm library needs to be tested, the application program currently running in the electronic device is acquired, the data type of the test data needing to be input is determined according to the application program, the camera of the electronic device is started according to the data type, the image of the scene where the electronic device is located is acquired through the camera, and the algorithm library is tested by taking the image as the target data. According to the embodiment of the application, whether a single camera or double cameras on the electronic equipment are used for collecting images and used as test data can be determined according to the application program currently running in the electronic equipment during the test of the algorithm library, so that the test of the algorithm library is completed, and the accuracy of the test of the algorithm library by the electronic equipment can be improved.
The method for testing the algorithm library of the present application will be further described below according to the description of the previous embodiment.
Referring to fig. 2, fig. 2 is a schematic flow chart of another testing method for an algorithm library provided in the embodiment of the present application, where the algorithm library in the embodiment may be an AR (Augmented Reality) algorithm library. The test flow of the algorithm library may include:
step S201, when the algorithm library needs to be tested, acquiring an application program currently running in the electronic device.
In an embodiment, a preset switch may be set on the electronic device, and the preset switch may be a virtual switch implemented by software, or a physical switch, and so on. For example, a preset switch may be set in a "set" option interface of the electronic device. When the user turns on the preset switch, the test of the algorithm library is required. That is, when the electronic device detects that the preset switch is turned on, it can be determined that the testing of the algorithm library is required.
The application program may be an application program that is currently running in the foreground of the electronic device, that is, the application program is an application program that is running in the foreground of the electronic device and displayed to a user for the user to perform an interactive operation, and specifically, the application program may be detected by detecting a process of the application program. For example, when it is detected that the network video application program process is in an open state, it is detected that the currently running foreground application program is the network video application program.
Step S202, acquiring a virtual model associated with the application program.
In an embodiment, the AR context information of the application may be obtained, and the AR context information may include a virtual model associated with the application. When testing the AR algorithm library, the virtual models associated with a part of the applications do not need to be combined with the real scene, such as some 2D virtual models, and the virtual models associated with a part of the applications need to be combined with the real scene, such as some 3D virtual models based on the real scene. In embodiments of the present invention, different types of test data will be employed for different virtual models.
Step S203, determining whether the virtual model includes the predetermined attribute, if yes, performing step S204, and if no, performing step S205.
In an embodiment, the predetermined attribute may be whether the virtual model includes information about a specific size. If so, acquiring the depth of field information in the current scene by using the two cameras of the electronic equipment so as to be consistent with the actual situation. If not, only a single camera is used without using two cameras.
And step S204, determining that the data type is a double-camera data type, starting double cameras of the electronic equipment, and acquiring images of the scene where the electronic equipment is located through the double cameras.
And step S205, determining that the data type is a single-shot data type, starting a single camera of the electronic equipment, and acquiring an image of a scene where the electronic equipment is located through the single camera.
In this application embodiment, install two at least cameras on the electronic equipment, for example wide-angle camera and long focus camera, wherein, can regard wide-angle camera as electronic equipment's main camera, long focus camera as vice camera. When the image of the current scene of electronic equipment is shot to needs, this electronic equipment can only shoot through its wide-angle camera module, also can shoot with long burnt camera jointly through its wide-angle camera.
In an embodiment, the application identification information of the application program may also be obtained, where the identification information may be an application name, and further, an application identification database may also be pre-established, where a mapping relationship between the application program identification and the data type is established in the database, as shown in fig. 3, after the application identification information of the application program is obtained, matching is performed in the database to determine the data type corresponding to the application program.
That is, the determining the data type of the test data to be input according to the application program includes:
acquiring application identification information of an application program;
and matching the corresponding data type in the application identification database according to the application identification information, and determining the data type as a target data type.
In an embodiment, the application identification information of the application program may also be a package name, a version number and a corresponding file size of the application program, a digital signature, and the like. The Package Name (Package Name) is a unique identifier of an application program, one Package Name represents one application program, the Package Name is mainly used for system identification of the application program, two application programs with the same Package Name are not allowed to be installed in an android system, and the Package Name is defined in an android management xml file in an application program installation Package.
In an embodiment, the data type corresponding to the application program may also be determined according to the power consumption information of the application program, and since the image shooting using the dual cameras is more power consuming than the image shooting using the single camera, for example, the image of the scene where the electronic device is located may be obtained using the single camera for the application program with higher power consumption, and the image of the scene where the electronic device is located may be obtained using the dual cameras for the application program with lower power consumption. That is, determining the data type of the test data to be input according to the application program includes:
acquiring power consumption use information of an application program;
and inputting the data type of the test data according to the power consumption use information.
Step S206, the image is used as target data to test the algorithm library.
After determining the source of the test input data, the electronic device may use the source of the test input data as target data of the test input data, and test the algorithm library according to the target data. For example, the electronic device may input the acquired image data as a test input into the AR algorithm library for operation, and obtain an output result. It will be appreciated that the outputs of different libraries of AR algorithms will differ for the same input data. The electronic device may compare the performance of the AR algorithm library according to the output results of the different AR algorithm libraries.
In the embodiment of the present invention, the electronic device may be any electronic device with two cameras, for example: a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
As can be seen from the above, the method for testing an algorithm library provided in this embodiment of the present application can obtain an application program currently running on an electronic device when the algorithm library needs to be tested, obtain a virtual model associated with the application program, determine whether the virtual model contains a preset attribute, determine that a data type is a dual-camera data type if the virtual model contains the preset attribute, start a dual camera of the electronic device and obtain an image of a scene where the electronic device is located through the dual camera, determine that the data type is a single-camera data type if the virtual model does not contain the preset attribute, start a single camera of the electronic device and obtain an image of the scene where the electronic device is located through the single camera, and test the algorithm library using the image as target data. According to the embodiment of the application, whether a single camera or double cameras on the electronic equipment are used for collecting images and used as test data can be determined according to the application program currently running in the electronic equipment during the test of the algorithm library, so that the test of the algorithm library is completed, and the accuracy of the test of the algorithm library by the electronic equipment can be improved.
In order to better implement the method for testing the algorithm library provided by the embodiment of the application, the embodiment of the application also provides a device for testing the method based on the algorithm library. The meanings of the nouns are the same as those in the test method of the algorithm library, and the specific implementation details can refer to the description in the method embodiment.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a testing apparatus of an algorithm library according to an embodiment of the present application, where the testing apparatus 30 of the algorithm library includes: an acquisition module 301, a determination module 302, a shooting module 303 and a test module 304;
the obtaining module 301 is configured to obtain an application program currently running on the electronic device when an algorithm library needs to be tested;
the determining module 302 is configured to determine a data type of the test data to be input according to the application program;
the shooting module 303 is configured to start a camera of the electronic device according to the data type, and obtain an image of a scene where the electronic device is located through the camera;
the testing module 304 is configured to test the algorithm library by using the image as target data.
In an embodiment, as shown in fig. 5, the data types include a single shot data type and a double shot data type, and the capturing module 303 may include: a first photographing sub-module 3031 and a second photographing sub-module 3032;
the first shooting submodule 3031 is configured to, when the data type is a single-shot data type, start a single camera of the electronic device and obtain an image of a scene where the electronic device is located through the single camera;
the second shooting submodule 3032 is configured to, when the data type is a double-shot data type, start two cameras of the electronic device and obtain an image of a scene where the electronic device is located through the two cameras.
In an embodiment, the determining module 302 may include: an acquisition submodule 3021 and a determination submodule 3022;
the obtaining submodule 3021 is configured to obtain application identification information of the application program;
the determining submodule 3022 is configured to match a corresponding data type in the application identifier database according to the application identifier information, and determine the data type as a target data type.
As can be seen from the above, the testing apparatus 30 for an algorithm library provided in the embodiment of the present application can obtain the application program currently running on the electronic device when the algorithm library needs to be tested, determine the data type of the test data that needs to be input according to the application program, start the camera of the electronic device according to the data type, obtain the image of the scene where the electronic device is located through the camera, and test the algorithm library using the image as the target data. According to the embodiment of the application, whether a single camera or double cameras on the electronic equipment are used for collecting images and used as test data can be determined according to the application program currently running in the electronic equipment during the test of the algorithm library, so that the test of the algorithm library is completed, and the accuracy of the test of the algorithm library by the electronic equipment can be improved.
The present application further provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for testing an algorithm library provided in the method embodiments.
The application also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the method for testing the algorithm library provided by the embodiment of the method.
In another embodiment of the present application, an electronic device is also provided, and the electronic device may be a smart phone, a tablet computer, or the like. As shown in fig. 6, the electronic device 400 includes a processor 401, a memory 402. The processor 401 is electrically connected to the memory 402.
The processor 401 is a control center of the electronic device 400, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or loading an application program stored in the memory 402 and calling data stored in the memory 402, thereby integrally monitoring the electronic device.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions:
when the algorithm library needs to be tested, acquiring the application program currently operated by the electronic equipment;
determining the data type of the test data required to be input according to the application program;
starting a camera device of the electronic equipment according to the data type, and acquiring an image of a scene where the electronic equipment is located through the camera device;
and testing the algorithm library by taking the image as target data.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 500 may include Radio Frequency (RF) circuitry 501, memory 502 including one or more computer-readable storage media, input unit 503, display unit 504, sensor 504, audio circuitry 506, Wireless Fidelity (WiFi) module 507, processor 508 including one or more processing cores, and power supply 509. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 7 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The rf circuit 501 may be used for receiving and transmitting information, or receiving and transmitting signals during a call, and in particular, receives downlink information of a base station and then sends the received downlink information to one or more processors 508 for processing; in addition, data relating to uplink is transmitted to the base station. In general, radio frequency circuit 501 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the radio frequency circuit 501 may also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.
The memory 502 may be used to store applications and data. Memory 502 stores applications containing executable code. The application programs may constitute various functional modules. The processor 508 executes various functional applications and data processing by executing application programs stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 508 and the input unit 503 access to the memory 502.
The input unit 503 may be used to receive input numbers, character information, or user characteristic information (such as a fingerprint), and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user setting and function control. In particular, in one particular embodiment, the input unit 503 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 508, and can receive and execute commands sent by the processor 508.
The display unit 504 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 504 may include a display panel. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 508 to determine the type of touch event, and then the processor 508 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 7 the touch-sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch-sensitive surface may be integrated with the display panel to implement input and output functions.
The electronic device may also include at least one sensor 505, such as light sensors, motion sensors, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured to the electronic device, detailed descriptions thereof are omitted.
The audio circuit 506 may provide an audio interface between the user and the electronic device through a speaker, microphone. The audio circuit 506 can convert the received audio data into an electrical signal, transmit the electrical signal to a speaker, and convert the electrical signal into a sound signal to output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 506 and converted into audio data, which is then processed by the audio data output processor 508 and then sent to another electronic device via the rf circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earbud jack to provide communication of a peripheral headset with the electronic device.
Wireless fidelity (WiFi) belongs to short-distance wireless transmission technology, and electronic equipment can help users to send and receive e-mails, browse webpages, access streaming media and the like through a wireless fidelity module 507, and provides wireless broadband internet access for users. Although fig. 7 shows the wireless fidelity module 507, it is understood that it does not belong to the essential constitution of the electronic device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 508 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 502 and calling data stored in the memory 502, thereby integrally monitoring the electronic device. Optionally, processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 508.
The electronic device also includes a power supply 509 (such as a battery) to power the various components. Preferably, the power source may be logically connected to the processor 508 through a power management system, so that the power management system may manage charging, discharging, and power consumption management functions. The power supply 509 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown in fig. 7, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation of the above modules may refer to the foregoing method embodiments, which are not described herein again.
It should be noted that, as one of ordinary skill in the art would understand, all or part of the steps in the various methods of the above embodiments may be implemented by relevant hardware instructed by a program, which may be stored in a computer readable storage medium, such as a memory of a terminal, and executed by at least one processor in the terminal, and during the execution, the flow of the embodiments of the test method, such as an algorithm library, may be included. Among others, the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The method, the device, the storage medium and the electronic device for testing the algorithm library provided by the embodiment of the present application are described in detail above, and each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules are integrated in one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for testing an algorithm library is applied to electronic equipment and is characterized by comprising the following steps:
when the augmented reality algorithm library needs to be tested, acquiring an application program currently operated by the electronic equipment;
determining a data type of test data to be input according to the application program, wherein the data type comprises a single shot data type and a double shot data type, acquiring augmented reality scene information of the application program, the augmented reality scene information comprises a virtual model associated with the application program, the virtual model comprises a 2D virtual model and a 3D virtual model, and determining the data type according to the virtual model;
starting a camera device of the electronic equipment according to the data type, and acquiring an image of a scene where the electronic equipment is located through the camera device;
and testing the augmented reality algorithm library by taking the image as target data.
2. The method for testing an algorithm library of claim 1, wherein the data types include a monograph data type and a bigraph data type;
starting a camera device of the electronic equipment according to the data type, and acquiring an image of a scene where the electronic equipment is located through the camera device, wherein the method comprises the following steps:
if the data type is a single-shot data type, starting a single camera of the electronic equipment and acquiring an image of a scene where the electronic equipment is located through the single camera;
and if the data type is a double-camera data type, starting double cameras of the electronic equipment and acquiring images of the scene where the electronic equipment is located through the double cameras.
3. The method for testing an algorithm library of claim 1, wherein determining the type of data to be input into the test data according to the application comprises:
acquiring application identification information of the application program;
and matching the corresponding data type in the application identification database according to the application identification information, and determining the data type as a target data type.
4. The method for testing an algorithm library of claim 1, wherein determining the type of data to be input into the test data according to the application comprises:
acquiring a virtual model associated with the application program;
judging whether the virtual model contains a preset attribute or not;
and determining the data type of the test data to be input according to the judgment result.
5. The method for testing an algorithm library of claim 1, wherein determining the type of data to be input into the test data according to the application comprises:
acquiring power consumption use information of the application program;
and inputting the data type of the test data according to the power consumption use information.
6. An apparatus for testing a library of algorithms, the apparatus comprising: the device comprises an acquisition module, a determination module, a shooting module and a test module;
the acquisition module is used for acquiring the application program currently operated by the electronic equipment when the augmented reality algorithm library needs to be tested;
the determining module is configured to determine a data type of test data to be input according to the application program, where the data type includes a single shot data type and a double shot data type, obtain augmented reality scene information of the application program, where the augmented reality scene information includes a virtual model associated with the application program, the virtual model includes a 2D virtual model and a 3D virtual model, and determine the data type according to the virtual model;
the shooting module is used for starting a camera device of the electronic equipment according to the data type and acquiring an image of a scene where the electronic equipment is located through the camera device;
and the testing module is used for testing the augmented reality algorithm library by taking the image as target data.
7. The apparatus for testing algorithm library according to claim 6, wherein the data types include a single shot data type and a double shot data type, and the photographing module comprises: the device comprises a first shooting submodule and a second shooting submodule;
the first shooting submodule is used for starting a single camera of the electronic equipment and acquiring an image of a scene where the electronic equipment is located through the single camera when the data type is a single shooting data type;
and the second shooting submodule is used for starting the double cameras of the electronic equipment and acquiring the image of the scene where the electronic equipment is located through the double cameras when the data type is a double-shooting data type.
8. The apparatus for testing the algorithm library of claim 6, wherein the determining module comprises: obtaining a submodule and determining a submodule;
the obtaining submodule is used for obtaining the application identification information of the application program;
and the determining submodule is used for matching the corresponding data type in the application identification database according to the application identification information and determining the data type as a target data type.
9. A storage medium having a computer program stored thereon, the computer program, when being executed by a processor, performing the steps of the method according to any of the claims 1-5.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-5 are implemented when the processor executes the program.
CN201810621953.8A 2018-06-15 2018-06-15 Method and device for testing algorithm library, storage medium and electronic equipment Active CN108959073B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810621953.8A CN108959073B (en) 2018-06-15 2018-06-15 Method and device for testing algorithm library, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810621953.8A CN108959073B (en) 2018-06-15 2018-06-15 Method and device for testing algorithm library, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108959073A CN108959073A (en) 2018-12-07
CN108959073B true CN108959073B (en) 2022-03-25

Family

ID=64489016

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810621953.8A Active CN108959073B (en) 2018-06-15 2018-06-15 Method and device for testing algorithm library, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108959073B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080177507A1 (en) * 2006-10-10 2008-07-24 Mian Zahid F Sensor data processing using dsp and fpga
CN105320701A (en) * 2014-08-04 2016-02-10 腾讯科技(深圳)有限公司 Method and device for screening function point test implementing ways, and terminal
CN105404392A (en) * 2015-11-03 2016-03-16 北京英梅吉科技有限公司 Monocular camera based virtual wearing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080177507A1 (en) * 2006-10-10 2008-07-24 Mian Zahid F Sensor data processing using dsp and fpga
CN105320701A (en) * 2014-08-04 2016-02-10 腾讯科技(深圳)有限公司 Method and device for screening function point test implementing ways, and terminal
CN105404392A (en) * 2015-11-03 2016-03-16 北京英梅吉科技有限公司 Monocular camera based virtual wearing method and system

Also Published As

Publication number Publication date
CN108959073A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
WO2017206916A1 (en) Method for determining kernel running configuration in processor and related product
US10824449B2 (en) Application running method and device
CN109062467B (en) Split screen application switching method and device, storage medium and electronic equipment
US10817255B2 (en) Scene sound effect control method, and electronic device
CN104852885B (en) Method, device and system for verifying verification code
CN107241552B (en) Image acquisition method, device, storage medium and terminal
CN109857297B (en) Information processing method and terminal equipment
WO2018214600A1 (en) Method for capturing fingerprint and associated products
CN110020293B (en) Multimedia data display method, device and storage medium
US10463965B2 (en) Control method of scene sound effect and related products
CN108958629B (en) Split screen quitting method and device, storage medium and electronic equipment
WO2018161540A1 (en) Fingerprint registration method and related product
US9824476B2 (en) Method for superposing location information on collage, terminal and server
US20150043312A1 (en) Sound playing method and device thereof
CN109495638B (en) Information display method and terminal
CN112749074B (en) Test case recommending method and device
US20160119695A1 (en) Method, apparatus, and system for sending and playing multimedia information
CN112199246A (en) Terminal testing method and device, storage medium and mobile terminal
CN108920086B (en) Split screen quitting method and device, storage medium and electronic equipment
CN107734049B (en) Network resource downloading method and device and mobile terminal
CN108829600B (en) Method and device for testing algorithm library, storage medium and electronic equipment
CN108959073B (en) Method and device for testing algorithm library, storage medium and electronic equipment
CN114510417A (en) Image rendering effect testing method and device, electronic equipment and storage medium
CN114648498A (en) Virtual image content measurement method and device, electronic equipment and storage medium
CN106341436B (en) Method and device for detecting acceleration effect

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant