Method for determining region of interest, shooting control method, device, equipment and medium
By executing the application on the terminal device, the area of interest in the image preview screen is automatically determined, which solves the problem of inaccurate selection of areas manually and improves the accuracy and consistency of image test data.
Patent Information
- Application Number
- CN202110700313.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-23
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-06-23
AI Technical Summary
In the objective image test, manually selecting 24 color cards and grayscale cards is not accurate, especially in front-facing camera tests, which leads to inaccurate shooting, which in turn affects the validity and consistency of the test data.
The region of interest is automatically determined by executing an application on the processor of the terminal device, rendering a graphical user interface, including image preview screens and test color card images. The specific steps include determining the screen area of the image preview screen, determining the candidate area box based on the color card image and the area area, moving the center of the candidate area box to the center of the image preview screen, obtaining the target area box, and displaying the target area box in the graphical user interface.
It realizes the automatic determination of the area of interest based on the image preview screen taken by the camera to be tested, improves the accuracy and consistency of the test data, and ensures the effectiveness of the captured images.
Smart Images

Figure CN113473112B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image quality assessment, and in particular to a method for determining a region of interest, a shooting method and corresponding devices, computer equipment and computer-readable storage media. Background Art
[0002] In objective testing of images with camera devices, many test items require shooting of 24-color cards and grayscale cards under different light sources. The number of shots is large, and the selection ratio of the areas of interest of the 24-color cards and grayscale cards shot each time is closely related to the objective test results. Different customers (different camera devices to be tested) have different requirements for the selection ratio of the areas of interest in objective testing. Manual selection of the areas of interest for testing is not accurate, especially in the objective test of the front camera. The selection of the areas of interest is not easy to control, resulting in inaccurate shooting during the test, and then resulting in inaccurate test data, seriously affecting the data validity and consistency of the objective test. Summary of the invention
[0003] In view of the above problems, embodiments of the present application are proposed to provide a method for determining a region of interest, a shooting method, and corresponding devices, computer equipment, and computer-readable storage media that overcome the above problems or at least partially solve the above problems.
[0004] In order to solve the above problems, the embodiment of the present application discloses a method for determining an area of interest, wherein an application is executed on a processor of a terminal device and rendered on a display screen of the terminal device to obtain a graphical user interface, wherein the graphical user interface at least includes an image preview screen taken by a camera to be tested; the image preview screen includes a color card image of a test color card; the method includes:
[0005] Determine the screen area of the image preview screen, and determine the area of the region of interest corresponding to the camera to be tested according to the screen area;
[0006] Determine a candidate region frame of the region of interest according to the color card image and the region area;
[0007] Moving the center of the candidate area frame to the center of the image preview screen to obtain a target area frame of the region of interest;
[0008] The target area frame is displayed in the graphical user interface.
[0009] In one embodiment, determining the candidate region frame of the region of interest according to the color card image and the region area includes:
[0010] Determine an initial region frame of the region of interest according to the outline of the color card image;
[0011] The initial region frame is enlarged or reduced in proportion, and an initial region frame whose selection area is equal to the region area is determined as a candidate region frame for the region of interest.
[0012] In one embodiment, determining the area of the region of interest corresponding to the camera to be tested according to the area of the picture includes:
[0013] Obtaining a test requirement corresponding to the camera to be tested, wherein the test requirement is used to indicate a proportional relationship between an area of interest and an image preview screen;
[0014] The area of the region of interest corresponding to the camera to be tested is determined according to the test requirements and the screen area.
[0015] The present application discloses a shooting control method, which includes:
[0016] Obtaining an image preview screen captured by the camera to be tested, wherein the image preview screen includes a color card image of a test color card;
[0017] According to the color card image and the region of interest corresponding to the camera to be tested, the position of the camera to be tested is adjusted; wherein the region of interest corresponding to the camera to be tested is obtained by executing the method for determining the region of interest provided in the above embodiment;
[0018] The camera to be tested is controlled to capture a test image for testing the quality of the camera to be tested based on the adjusted position.
[0019] In one embodiment, adjusting the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested includes:
[0020] Adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest so that the image area of the color card image is equal to the area of the region of interest; and
[0021] The position of the camera to be tested is adjusted according to the center of the color card image and the center of the region of interest, so that the center of the color card image and the center of the region of interest coincide with each other.
[0022] In one embodiment, adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest includes:
[0023] When the image area of the color card image is smaller than the area of the region, instructing the camera to be tested to move towards the direction close to the test color card;
[0024] When the graphic area of the color card image is larger than the area of the region, the camera to be tested is instructed to move in a direction away from the test color card.
[0025] The embodiment of the present application provides a device for determining an area of interest, wherein an application is executed on a processor of a terminal device and rendered on a display screen of the terminal device to obtain a graphical user interface, wherein the graphical user interface at least includes an image preview screen taken by a camera to be tested; the image preview screen includes a color card image of a test color card; the device includes:
[0026] A region area determination module, used to determine the screen area of the image preview screen, and determine the region area of the region of interest corresponding to the camera to be tested according to the screen area;
[0027] A candidate region frame determination module, used to determine a candidate region frame of the region of interest according to the color card image and the region area;
[0028] A target region frame determination module, used to move the center of the candidate region frame to the center of the image preview screen to obtain a target region frame of the region of interest;
[0029] A target area frame display module is used to display the target area frame in the graphical user interface.
[0030] In one embodiment, the candidate area frame determination module includes:
[0031] An initial region frame determination module, used to determine an initial region frame of the region of interest according to the outline of the color card image;
[0032] The initial region frame scaling module is used to perform proportional enlargement or reduction on the initial region frame, and determine the initial region frame whose selection area is equal to the region area as the candidate region frame of the region of interest.
[0033] In one embodiment, the region area determination module includes:
[0034] A test requirement determination module, used to obtain the test requirements corresponding to the camera to be tested, wherein the test requirements are used to indicate the proportional relationship between the region of interest and the image preview screen;
[0035] The area calculation module is used to determine the area of the region of interest corresponding to the camera to be tested according to the test requirements and the screen area.
[0036] The present application provides a shooting control device, the device comprising:
[0037] An image acquisition module, used to acquire an image preview screen taken by the camera to be tested, wherein the image preview screen includes a color card image of a test color card;
[0038] A position adjustment module, used for adjusting the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested; wherein the region of interest corresponding to the camera to be tested is obtained by executing the method for determining the region of interest provided in the above embodiment;
[0039] The shooting control module is used to control the camera to be tested to shoot a test image for testing the quality of the camera to be tested based on the adjusted position.
[0040] In one embodiment, the position adjustment module includes:
[0041] A first adjustment module is used to adjust the position of the camera to be tested according to the image area of the color card image and the area of the region of interest, so that the image area of the color card image is equal to the area of the region of interest; and
[0042] The second adjustment module is used to adjust the position of the camera to be tested according to the center of the color card image and the center of the region of interest, so that the center of the color card image and the center of the region of interest coincide with each other.
[0043] In one embodiment, the first adjustment module includes:
[0044] A first moving module, used for instructing the camera to be tested to move towards the direction close to the test color card when the image area of the color card image is smaller than the area of the region;
[0045] The second moving module is used to instruct the camera to be tested to move in a direction away from the test color card when the graphic area of the color card image is larger than the area of the region.
[0046] An embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for determining a region of interest or the shooting control method provided in any embodiment of the present application are implemented.
[0047] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for determining a region of interest or the shooting control method provided in any embodiment of the present application are implemented.
[0048] Compared with the background technology, the embodiments of the present application include the following advantages:
[0049] In the embodiment of the present application, the screen area of the image preview screen is determined, and the area of the region of interest corresponding to the camera to be tested is determined according to the screen area; the candidate area frame of the region of interest is determined according to the color card image and the area of the region; the center of the candidate area frame is moved to the center of the image preview screen to obtain the target area frame of the region of interest; and the target area frame is displayed in the graphical user interface. It is possible to automatically determine the corresponding region of interest according to the image preview screen shot by the camera to be tested, with good flexibility, so as to instruct the camera to be tested to shoot a test image for testing the quality of the camera to be tested based on the determined region of interest, thereby ensuring the validity and consistency of the image shot by the camera to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of a flow chart of steps of a method for determining a region of interest in one embodiment;
[0051] Figure 2 A schematic diagram of a process flow of a shooting control method in one embodiment;
[0052] Figure 3 is a schematic diagram of photographing a target scene in one embodiment;
[0053] Figure 4 This is a schematic diagram of screen projection effect in one embodiment;
[0054] Figure 5 A schematic diagram of the steps of a shooting control method in a specific example;
[0055] Figure 6 is a structural block diagram of a device for determining a region of interest in an embodiment;
[0056] Figure 7 is a structural block diagram of a shooting control device in one embodiment;
[0057] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are 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 ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0059] In one embodiment, Figure 1As shown, a method for determining an area of interest is provided, by executing an application on a processor of a terminal device and rendering it on a display screen of the terminal device to obtain a graphical user interface, wherein the graphical user interface at least includes an image preview screen taken by a camera to be tested; the image preview screen includes a color card image of a test color card.
[0060] The above application can be a screen projection software. Specifically, when the camera device to be subjected to objective image testing is a mobile phone, the above application can be Vysor software (a mobile phone screen projection application), which can project the picture taken by the mobile phone's camera to be tested and displayed on the mobile phone display to the display of the terminal device, so as to facilitate the user to observe the picture taken by the camera to be tested during the test, and adaptively adjust the mobile phone or the scene to be photographed by the camera to be tested according to the observed situation. The terminal device can be an electronic device with a display screen, such as a computer. This embodiment is illustrative for example, taking the camera to be tested as a mobile phone camera.
[0061] In this embodiment, the method may specifically include the following steps:
[0062] Step 101, determining the screen area of the image preview screen, and determining the area of the region of interest corresponding to the camera to be tested according to the screen area.
[0063] In this embodiment, before objectively testing the images captured by the mobile phone camera, the mobile phone to be tested needs to be connected to a terminal device (such as a computer). The specific connection method may include any one of the following: connecting the mobile phone to be tested and the terminal device via a data cable; connecting the mobile phone to be tested and the terminal device via a network; connecting the mobile phone to be tested and the terminal via Bluetooth, etc.
[0064] By installing screen projection software in the terminal device, the content displayed on the mobile phone screen can be projected onto the display screen of the terminal device for display.
[0065] Objective image testing requires that the mobile phone camera shoots 24-color cards and grayscale cards under different light sources. The number of shots is large, and the selection ratio of the region of interest (ROI) of the 24-color cards and grayscale cards for each shot is the same and meets the customer's test requirements.
[0066] In the field of image processing, a region of interest is an image area selected from an image, which is the focus of image analysis. Therefore, it is necessary to circle the region of interest in the image in order to reduce the time for further processing.
[0067] In the process of obtaining the customer's test image, the target scene is photographed through the mobile phone camera, and the image preview screen of the target scene photographed by the camera displayed on the mobile phone screen is displayed on the display screen of the terminal device, and then the screen area of the image preview screen displayed on the display screen of the terminal device can be determined. Among them, the target scene is generally composed of a white background board and a test color card fixed on the background board. The test color card can include a 24-color card and a grayscale card, etc., which are determined according to actual needs.
[0068] Reference Figure 3 and Figure 4 , Figure 3 is a schematic diagram of a device with a camera to be tested photographing a target scene in this example; Figure 4 This is a schematic diagram of the effect of projecting the preview image obtained by shooting the target scene with a device having the camera to be tested onto the screen of the terminal device in this example.
[0069] like Figure 3 As shown, the device with the camera to be tested is a mobile phone, and the target scene includes a test color card. The mobile phone is fixed on a tripod in a light box and aimed at the target scene for shooting. It should be noted that when the camera to be tested is the front camera of a mobile phone, Figure 3 The mobile phone screen in the video is in the opposite direction to the current screen, and it is inconvenient for the user to operate the camera function of the mobile phone. Therefore, it is necessary to use a screen projection application to project the image displayed on the mobile phone screen to the display screen of other terminal devices for display.
[0070] The area of the region of interest of the image preview screen can be determined according to the screen area of the image preview screen. Specifically, it may include:
[0071] Get the test requirements corresponding to the camera to be tested, where the test requirements are used to indicate the proportional relationship between the region of interest and the image preview screen;
[0072] Determine the area of the region of interest corresponding to the camera to be tested based on the test requirements and the screen area.
[0073] By obtaining the test requirements corresponding to the camera to be tested, the proportional relationship between the region of interest and the image preview screen is determined, and the area of the region of interest of the image preview screen can be determined according to the proportional relationship and the screen area of the image preview screen.
[0074] For example, when the objective test requirement of the customer requires that the area of the region of interest should be 70% of the image preview screen, the area of the region of interest of the image preview screen may be determined to be screen area×70%.
[0075] In an optional implementation of the present application, customer test requirements corresponding to each camera to be tested may be pre-stored. When the mobile phone is connected to the terminal device, the model of the mobile phone to be tested may be determined, and then the test requirements of the camera to be tested of the mobile phone may be determined according to the model of the mobile phone to be tested from the pre-stored correspondence between each camera to be tested and the test requirements. After determining the area of the image preview screen taken by the camera to be tested, the area of the region of interest of the image preview screen may be determined according to the acquired test requirements.
[0076] Step 102: determine a candidate region frame of the region of interest according to the color card image and the region area.
[0077] In this embodiment, the image preview screen includes a color card image of a test color card. Since the image used for testing requires the color card image to be in the region of interest of the image preview screen, the candidate region frame of the region of interest can be determined based on the color card image and the region area. Specifically, the following steps may be included:
[0078] Determine the initial region frame of the region of interest according to the outline of the color card image;
[0079] The initial region frame is enlarged or reduced in proportion, and the initial region frame whose selection area is equal to the region area is determined as the candidate region frame of the region of interest.
[0080] In this embodiment, the image preview screen includes a color card image of a test color card. Generally, the test color card is rectangular, and accordingly, the color card image is also rectangular. The outer contour of the color card image, that is, the rectangular frame of the color card image, can be obtained as the initial region frame of the region of interest. It can be understood that the initial region frame of the region of interest is determined according to the contour of the color card image.
[0081] After determining the initial region frame, the area of the initial region frame can be further determined. The area of the frame is compared with the area of the region of interest. If the area of the frame is not equal to the area of the region, the initial region frame is enlarged or reduced in proportion so that the area of the frame is equal to the area of the region, and the initial region frame at this time is determined as the candidate region frame of the region of interest.
[0082] Specifically, if the box selection area is smaller than the region area, the initial region box is enlarged so that the box selection area is equal to the region area. If the box selection area is larger than the region area, the initial region box is reduced so that the box selection area is equal to the region area.
[0083] In an optional implementation, the process of performing proportional enlargement or reduction on the initial region frame and determining the initial region frame whose selection area is equal to the region area as the candidate region frame of the region of interest may include:
[0084] Determine the selection area of the initial region box;
[0085] Calculate the first ratio of the box selection area to the region area;
[0086] The initial region frame is adjusted according to the first ratio to obtain a candidate region frame of the region of interest.
[0087] In this embodiment, by calculating the first ratio of the frame selection area and the region area, the multiple by which the initial region frame needs to be enlarged / reduced can be determined, and then the initial region frame is proportionally enlarged or reduced according to the multiple, so that the frame selection area of the initial region frame is equal to the region area, and the initial region frame at this time is the candidate region frame of the region of interest. It can be understood that the initial region frame refers to a region frame that is similar to the outer contour of the region of interest on the image preview screen; the candidate region frame refers to a region frame that is equal to the outer contour of the region of interest on the image preview screen.
[0088] Step 103 : Move the center of the candidate region frame to the center of the image preview screen to obtain a target region frame of the region of interest.
[0089] After determining the candidate region frame of the region of interest, the center of the candidate region frame of the region of interest is moved to the center of the image preview screen to obtain the target region frame of the region of interest. It can be understood that the target region frame of the region of interest refers to the region frame that coincides with the outer contour of the region of interest of the image preview screen. In other words, the image selected by the target region frame is the region of interest of the image preview screen.
[0090] Generally, the image preview screen is rectangular, and the region of interest refers to a certain area of the center of the image preview screen. By obtaining the center of the image preview screen and the center of the candidate area frame, it is determined whether the center of the image preview screen coincides with the center of the candidate area frame. If not, the candidate area frame is moved so that the center of the candidate area frame coincides with the center of the image preview screen, and the target candidate area is obtained.
[0091] Step 104: display the target area frame in the graphical user interface.
[0092] In this embodiment, after determining the target region frame of the region of interest in the image preview screen, the target region frame may be displayed in the graphical user interface to serve as an indicator for subsequent users to shoot images for testing.
[0093] In the embodiment of the present application, the screen area of the image preview screen is determined, and the area of the region of interest corresponding to the camera to be tested is determined according to the screen area; the candidate region frame of the region of interest is determined according to the color card image and the area of the region; the center of the candidate region frame is moved to the center of the image preview screen to obtain the target region frame of the region of interest; and the target region frame is displayed in the graphical user interface. The corresponding region of interest can be automatically determined according to the image preview screen shot by the camera to be tested, which has good flexibility. The determined region of interest instructs the camera to be tested to shoot a test image for testing the quality of the camera to be tested based on the determined region of interest, thereby ensuring the validity and consistency of the image shot by the camera to be tested.
[0094] In one embodiment, Figure 2 As shown, a shooting control method is provided, which can be applied to the image shooting process of an image test process of a camera device. A graphical user interface is obtained by executing an application on a processor of a terminal device and rendering it on a display screen of the terminal device. The graphical user interface at least includes an image preview screen shot by the camera to be tested; the image preview screen includes a color card image of a test color card. This embodiment is exemplified by taking the camera to be tested as a mobile phone camera as an example.
[0095] In this embodiment, the method may specifically include the following steps:
[0096] Step 201 : obtaining an image preview screen shot by the camera to be tested, wherein the image preview screen includes a color card image of a test color card.
[0097] In this embodiment, before objectively testing the images captured by the mobile phone camera, the mobile phone to be tested needs to be connected to a terminal device (such as a computer), and the specific connection method is not limited in this application. Screen projection software is installed in the terminal device, so that the content displayed on the mobile phone screen can be projected onto the display screen of the terminal device for display.
[0098] Objective image testing requires that the mobile phone camera shoots 24-color cards and grayscale cards under different light sources. The number of shots is large, and the selection ratio of the region of interest (ROI) of the 24-color cards and grayscale cards for each shot is the same and meets the customer's test requirements.
[0099] In the process of obtaining the customer's test image, the target scene is photographed by the mobile phone camera, and the image preview screen of the target scene photographed by the camera displayed on the mobile phone screen is displayed on the display screen of the terminal device. Among them, the target scene is generally composed of a white background board and a test color card fixed on the background board. The test color card can include a 24-color card and a grayscale card, etc., which are determined according to actual needs. Therefore, the image preview screen includes the color card image of the test color card.
[0100] Step 202: adjusting the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested.
[0101] In this embodiment, the region of interest corresponding to the camera to be tested can be obtained by executing the method for determining the region of interest provided in the above embodiment.
[0102] The above embodiment of the method for determining the region of interest can determine the region of interest of the image preview screen, and display the target region frame of the region of interest in the graphical user interface.
[0103] When the color card image does not overlap with the target area frame, the position of the camera to be tested is adjusted according to the difference between the color card image and the region of interest, that is, the position of the mobile phone to be tested is adjusted so that the color card image and the target area frame overlap.
[0104] In an optional implementation manner of the application, adjusting the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested includes:
[0105] Adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest so that the image area of the color card image is equal to the area of the region of interest; and
[0106] The position of the camera to be tested is adjusted according to the center of the color card image and the center of the region of interest so that the center of the color card image and the center of the region of interest coincide with each other.
[0107] In this embodiment, the image area of the color card image is first obtained, and the image area is compared with the area of the region of interest. When the image area and the area of the region are not equal, it means that the distance between the camera to be tested and the test color card does not meet the requirements; therefore, the distance between the camera and the test color card can be adjusted. Specifically, it may include:
[0108] When the image area of the color card image is smaller than the area of the region, the camera to be tested is instructed to move toward the direction close to the test color card;
[0109] When the graphic area of the color card image is larger than the area of the region, the camera to be tested is instructed to move in a direction away from the test color card.
[0110] It can be understood that when the image area is smaller than the region area, it means that the distance between the camera to be tested and the test color card is too large. Therefore, the camera to be tested can be instructed to move toward the test color card; when the image area is larger than the region area, it means that the distance between the camera to be tested and the test color card is too small. Therefore, the camera to be tested can be instructed to move away from the test color card.
[0111] After adjusting the image area, obtain the center of the color card image and compare the center of the color card image with the center of the area of interest. If the center of the color card image does not coincide with the center of the area of interest, it means that the center of the camera to be tested is not in a straight line with the center of the test color card, which does not meet the test requirements. Therefore, the position of the camera to be tested needs to be adjusted, which may include:
[0112] When the center of the color card image is located to the right of the center of the region of interest, the camera to be tested is instructed to move horizontally to the left;
[0113] When the center of the color card image is located to the left of the center of the region of interest, the camera to be tested is instructed to move horizontally to the right;
[0114] When the center of the color card image is located above the center of the region of interest, the camera to be tested is instructed to move vertically downward;
[0115] When the center of the color card image is located below the center of the region of interest, the camera to be tested is instructed to move vertically upward.
[0116] Through the above-mentioned embodiment of the method for determining the region of interest, it can be determined that the target area frame of the region of interest is similar to the outer contour of the color card image. Therefore, on the basis that the image area of the color card image is equal to the area area of the region of interest, by adjusting the center of the color card image to coincide with the center of the region of interest, the color card image and the region of interest can be overlapped.
[0117] Step 203: Control the camera to be tested to capture a test image for testing the quality of the camera to be tested based on the adjusted position.
[0118] Through the above steps, it is determined that the color card image of the test color card and the region of interest of the image preview screen coincide with each other. At this time, the camera to be tested is controlled to capture a test image for testing the quality of the camera to be tested. In other words, the image captured by the camera to be tested meets the test requirements and can improve the accuracy of the test data.
[0119] In the embodiment of the present application, by obtaining an image preview screen shot by the camera to be tested, the image preview screen includes a color card image of a test color card; adjusting the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested; and controlling the camera to be tested to shoot a test image for testing the quality of the camera to be tested based on the adjusted position. The efficiency of shooting images required for testing can be improved, and the accuracy of test data can be improved.
[0120] In order to enable those skilled in the art to better understand the present application, the embodiments of the present application will be exemplified below in conjunction with the following examples, but it should be understood that the embodiments of the present application are not limited thereto.
[0121] The embodiment of the present application optimizes and improves the function of the screen projection application to automatically and accurately determine the area of interest corresponding to the test color card, and then prompts the correction method in real time according to the difference between the area of interest and the color card image of the test color card, so that the test engineer can adjust the position of the test mobile phone so that the color card image of the test color card taken by the test mobile phone coincides with the area of interest. In this example, the screen projection application is Vysor software, and the camera to be tested is a mobile phone camera, such as Figure 5 As shown, the specific process includes:
[0122] Step 501, the mobile phone camera obtains the overall preview image of the test environment, the overall preview image includes the preview image of the test color card, and is synchronized to the Vysor software.
[0123] The test environment is as follows: Figure 3 As shown, the overall preview screen is the image preview screen, and the preview screen of the test color card is the color card image of the test color card. After the mobile phone camera obtains the overall preview screen, it is synchronized to the Vysor software. It can be understood that the overall preview screen taken by the mobile phone camera can be obtained in the terminal device running the Vysor software.
[0124] Step 502, for the information data sent back by the mobile phone, the Vysor software calculates the length and width of the overall preview screen and the preview screen of the test color card, calculates the area of the two regions, and displays a first color box corresponding to the overall preview screen and a second color box corresponding to the preview screen of the test color card, and displays the center of the first color box and the center of the second color box.
[0125] The Vysor software can calculate the area of the overall preview screen, that is, the screen area of the image preview screen, and calculate the area of the preview screen of the test color card, that is, the image area of the color card image of the test color card, and display a first color frame corresponding to the overall preview screen and a second color frame corresponding to the preview screen of the test color card.
[0126] Among them, the first color box coincides with the outer contour of the overall preview screen, and the second color box coincides with the outer contour of the preview screen of the test color card and moves with the preview screen of the test color card; the display color of the first color box is different from the display color of the second color box, specifically, the first color box is displayed in blue and the second color box is displayed in red.
[0127] In addition, the center of the first color frame and the center of the second color frame are also displayed, wherein the center of the first color frame is displayed in the first color, and the center of the second color frame is displayed in the second color.
[0128] In step 503, the Vysor software then uses the overall preview screen to accurately calculate the position of the test color card according to the set ROI display ratio of the test color card, and gives a prompt so that the test engineer can move the mobile phone holder according to the prompt so that the preview screen of the test color card is exactly where it should be.
[0129] Among them, the position where the test color card should be located refers to the ROI (region of interest) area of the overall preview screen. Specifically, the Vysor software can determine the display area of the ROI area according to the set ROI display ratio and the area of the overall preview screen. Since the test requires the preview screen of the test color card to be aligned with the ROI area, the outline of the ROI area is similar to the outline of the test color card. According to the display area of the ROI area, the specific shape of the ROI area can be determined; and since the test requires the preview screen of the test color card to be displayed in the center, the center of the ROI area must coincide with the center of the overall preview screen, that is, the target ROI area, that is, the position where the test color card should be located. At the same time, the display frame corresponding to the target ROI area can be displayed, which is convenient for the test engineer to move the mobile phone holder with reference to the display frame corresponding to the second color frame and the target ROI area, so that the preview screen of the test color card is aligned with the display frame corresponding to the target ROI area. When the preview screen of the test color card is aligned with the display frame corresponding to the target ROI area, the test engineer uses the Vysor software to operate the mobile phone page on the terminal device to perform a shooting test.
[0130] It should be understood that although Figure 1 and Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 and Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0131] In one embodiment, Figure 6 As shown, a device for determining an area of interest is provided, wherein an application is executed on a processor of a terminal device and rendered on a display screen of the terminal device to obtain a graphical user interface, wherein the graphical user interface at least includes an image preview screen taken by a camera to be tested; the image preview screen includes a color card image of a test color card; the device may specifically include the following modules:
[0132] The area determination module 601 is used to determine the screen area of the image preview screen, and determine the area of the region of interest corresponding to the camera to be tested according to the screen area;
[0133] A candidate region frame determination module 602 is used to determine a candidate region frame of the region of interest based on the color card image and the region area;
[0134] The target region frame determination module 603 is used to move the center of the candidate region frame to the center of the image preview screen to obtain the target region frame of the region of interest;
[0135] The target area frame display module 604 is used to display the target area frame in the graphical user interface.
[0136] In one embodiment, the candidate region frame determination module 602 includes:
[0137] An initial region frame determination module is used to determine an initial region frame of the region of interest according to the outline of the color card image;
[0138] The initial region frame scaling module is used to perform proportional enlargement or reduction on the initial region frame, and determine the initial region frame whose selection area is equal to the region area as the candidate region frame of the region of interest.
[0139] In one embodiment, the region area determination module 601 includes:
[0140] A test requirement determination module is used to obtain the test requirements corresponding to the camera to be tested, and the test requirements are used to indicate the proportional relationship between the area of interest and the image preview screen;
[0141] The area calculation module is used to determine the area of the region of interest corresponding to the camera to be tested according to the test requirements and the screen area.
[0142] For the specific definition of the device for determining the region of interest, please refer to the definition of the method for determining the region of interest above, which will not be repeated here. Each module in the above-mentioned device for determining the region of interest can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0143] In one embodiment, Figure 7 As shown, a shooting control device is provided, which may specifically include the following modules:
[0144] An image acquisition module 701 is used to acquire an image preview screen taken by the camera to be tested, wherein the image preview screen includes a color card image of a test color card;
[0145] A position adjustment module 702 is used to adjust the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested; wherein the region of interest corresponding to the camera to be tested is obtained by executing the method for determining the region of interest provided in the above embodiment;
[0146] The shooting control module 703 is used to control the camera to be tested to shoot a test image for testing the quality of the camera to be tested based on the adjusted position.
[0147] In one embodiment, the position adjustment module 702 includes:
[0148] A first adjustment module is used to adjust the position of the camera to be tested according to the image area of the color card image and the area of the region of interest, so that the image area of the color card image is equal to the area of the region of interest; and
[0149] The second adjustment module is used to adjust the position of the camera to be tested according to the center of the color card image and the center of the region of interest, so that the center of the color card image and the center of the region of interest coincide with each other.
[0150] In one embodiment, the first adjustment module includes:
[0151] A first moving module, used for instructing the camera to be tested to move towards a direction close to the test color card when the image area of the color card image is smaller than the area of the region;
[0152] The second moving module is used to instruct the camera to be tested to move in a direction away from the test color card when the graphic area of the color card image is larger than the area of the region.
[0153] For the specific definition of the device for determining the region of interest, please refer to the definition of the method for determining the region of interest above, which will not be repeated here. Each module in the above-mentioned device for determining the region of interest can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0154] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for determining an area of interest or a shooting control method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0155] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0156] In one embodiment, the device for determining an area of interest or the device for controlling shooting provided by the present application may be implemented in the form of a computer program. The computer program may be implemented in the form of a computer program such as Figure 8 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the device for determining the region of interest, for example, Figure 6 The area determination module 601, the candidate area frame determination module 602, the target area frame determination module 603, and the target area frame display module 604 are shown. The computer program composed of each program module enables the processor to execute the steps of the method for determining the area of interest in each embodiment of the present application described in this specification. The memory of the computer device can also store various program modules that constitute the shooting control device, such as, Figure 7 The image acquisition module 701, the position adjustment module 702, and the shooting control module 703 are shown. The computer program composed of various program modules enables the processor to execute the steps of the shooting control method of each embodiment of the present application described in this specification.
[0157] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, the computer device is connected to an auxiliary device, and the processor implements the following steps when executing the computer program:
[0158] Determine the screen area of the image preview screen, and determine the area of the region of interest corresponding to the camera to be tested according to the screen area;
[0159] Determine the candidate region frame of the region of interest according to the color card image and the region area;
[0160] Move the center of the candidate region frame to the center of the image preview screen to obtain the target region frame of the region of interest;
[0161] Displays the target area box in the graphical user interface.
[0162] In one embodiment, determining a candidate region frame of a region of interest according to a color card image and a region area includes:
[0163] Determine the initial region frame of the region of interest according to the outline of the color card image;
[0164] The initial region frame is enlarged or reduced in proportion, and the initial region frame whose selection area is equal to the region area is determined as the candidate region frame of the region of interest.
[0165] In one embodiment, determining the area of the region of interest corresponding to the camera to be tested according to the screen area includes:
[0166] Get the test requirements corresponding to the camera to be tested, where the test requirements are used to indicate the proportional relationship between the region of interest and the image preview screen;
[0167] Determine the area of the region of interest corresponding to the camera to be tested based on the test requirements and the screen area.
[0168] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, the computer device is connected to an auxiliary device, and the processor implements the following steps when executing the computer program:
[0169] Obtaining a preview image of an image captured by the camera to be tested, wherein the preview image includes a color card image of a test color card;
[0170] Adjust the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested; wherein the region of interest corresponding to the camera to be tested is obtained by executing the method for determining the region of interest provided in the above embodiment;
[0171] The camera under test is controlled to capture a test image for testing the quality of the camera under test based on the adjusted position.
[0172] In one embodiment, adjusting the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested includes:
[0173] Adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest so that the image area of the color card image is equal to the area of the region of interest; and
[0174] The position of the camera to be tested is adjusted according to the center of the color card image and the center of the region of interest so that the center of the color card image and the center of the region of interest coincide with each other.
[0175] In one embodiment, adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest includes:
[0176] When the image area of the color card image is smaller than the area of the region, the camera to be tested is instructed to move toward the direction close to the test color card;
[0177] When the graphic area of the color card image is larger than the area of the region, the camera to be tested is instructed to move in a direction away from the test color card.
[0178] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, the computer-readable storage medium is connected to an auxiliary device, and when the computer program is executed by a processor, the following steps are implemented:
[0179] Determine the screen area of the image preview screen, and determine the area of the region of interest corresponding to the camera to be tested according to the screen area;
[0180] Determine the candidate region frame of the region of interest according to the color card image and the region area;
[0181] Move the center of the candidate region frame to the center of the image preview screen to obtain the target region frame of the region of interest;
[0182] Displays the target area box in the graphical user interface.
[0183] In one embodiment, determining a candidate region frame of a region of interest according to a color card image and a region area includes:
[0184] Determine the initial region frame of the region of interest according to the outline of the color card image;
[0185] The initial region frame is enlarged or reduced in proportion, and the initial region frame whose selection area is equal to the region area is determined as the candidate region frame of the region of interest.
[0186] In one embodiment, determining the area of the region of interest corresponding to the camera to be tested according to the screen area includes:
[0187] Get the test requirements corresponding to the camera to be tested, where the test requirements are used to indicate the proportional relationship between the region of interest and the image preview screen;
[0188] Determine the area of the region of interest corresponding to the camera to be tested based on the test requirements and the screen area.
[0189] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, the computer-readable storage medium is connected to an auxiliary device, and when the computer program is executed by a processor, the following steps are implemented:
[0190] Obtaining a preview image of an image captured by the camera to be tested, wherein the preview image includes a color card image of a test color card;
[0191] Adjust the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested; wherein the region of interest corresponding to the camera to be tested is obtained by executing the method for determining the region of interest provided in the above embodiment;
[0192] The camera under test is controlled to capture a test image for testing the quality of the camera under test based on the adjusted position.
[0193] In one embodiment, adjusting the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested includes:
[0194] Adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest so that the image area of the color card image is equal to the area of the region of interest; and
[0195] The position of the camera to be tested is adjusted according to the center of the color card image and the center of the region of interest so that the center of the color card image and the center of the region of interest coincide with each other.
[0196] In one embodiment, adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest includes:
[0197] When the image area of the color card image is smaller than the area of the region, the camera to be tested is instructed to move toward the direction close to the test color card;
[0198] When the graphic area of the color card image is larger than the area of the region, the camera to be tested is instructed to move in a direction away from the test color card.
[0199] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static random access memory (SRAM) and dynamic random access memory (DRAM).
[0200] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0201] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A shooting control method, characterized in that: The method comprises: Obtaining an image preview screen captured by the camera to be tested, wherein the image preview screen includes a color card image of a test color card; According to the color card image and the region of interest corresponding to the camera to be tested, the position of the camera to be tested is adjusted; wherein the region of interest corresponding to the camera to be tested is obtained by a method for determining a region of interest; Controlling the camera to be tested to capture a test image for testing the quality of the camera to be tested based on the adjusted position; The method for determining the region of interest comprises: Determine the screen area of the image preview screen, and determine the area of the region of interest corresponding to the camera to be tested according to the screen area; obtain a graphical user interface by executing an application on a processor of a terminal device and rendering it on a display screen of the terminal device, wherein the graphical user interface at least includes an image preview screen taken by the camera to be tested; the image preview screen includes a color card image of a test color card; Determine a candidate region frame of the region of interest according to the color card image and the region area; Moving the center of the candidate area frame to the center of the image preview screen to obtain a target area frame of the region of interest; Displaying the target area frame in the graphical user interface; The adjusting the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested includes: Adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest so that the image area of the color card image is equal to the area of the region of interest; and The position of the camera to be tested is adjusted according to the center of the color card image and the center of the region of interest, so that the center of the color card image and the center of the region of interest coincide with each other.
2. A shooting control method according to claim 1, characterized in that: The method for determining a region of interest, wherein determining a candidate region frame of the region of interest according to the color card image and the region area, comprises: Determine an initial region frame of the region of interest according to the outline of the color card image; The initial region frame is enlarged or reduced in proportion, and an initial region frame whose selection area is equal to the region area is determined as a candidate region frame for the region of interest.
3. A shooting control method according to claim 1, characterized in that: The method for determining the region of interest, wherein determining the region of interest corresponding to the camera to be tested according to the area of the picture, comprises: Obtaining a test requirement corresponding to the camera to be tested, wherein the test requirement is used to indicate a proportional relationship between an area of interest and an image preview screen; The area of the region of interest corresponding to the camera to be tested is determined according to the test requirements and the screen area.
4. The shooting control method according to claim 1, characterized in that: The step of adjusting the position of the camera to be tested according to the image area of the color card image and the area of the region of interest comprises: When the image area of the color card image is smaller than the area of the region, instructing the camera to be tested to move towards the direction close to the test color card; When the graphic area of the color card image is larger than the area of the region, the camera to be tested is instructed to move in a direction away from the test color card.
5. A shooting control device, characterized in that: The device comprises: An image acquisition module, used to acquire an image preview screen taken by the camera to be tested, wherein the image preview screen includes a color card image of a test color card; A position adjustment module, used to adjust the position of the camera to be tested according to the color card image and the region of interest corresponding to the camera to be tested; wherein the region of interest corresponding to the camera to be tested is obtained by a method for determining a region of interest; specifically used to adjust the position of the camera to be tested according to the image area of the color card image and the region area of the region of interest, so that the image area of the color card image is equal to the region area of the region of interest, and to adjust the position of the camera to be tested according to the center of the color card image and the center of the region of interest, so that the center of the color card image and the center of the region of interest coincide with each other; A shooting control module, used for controlling the camera to be tested to shoot a test image for testing the quality of the camera to be tested based on the adjusted position; The method for determining the region of interest comprises: Determine the screen area of the image preview screen, and determine the area of the region of interest corresponding to the camera to be tested according to the screen area; obtain a graphical user interface by executing an application on a processor of a terminal device and rendering it on a display screen of the terminal device, wherein the graphical user interface at least includes an image preview screen taken by the camera to be tested; the image preview screen includes a color card image of a test color card; Determine a candidate region frame of the region of interest according to the color card image and the region area; Moving the center of the candidate area frame to the center of the image preview screen to obtain a target area frame of the region of interest; The target area frame is displayed in the graphical user interface.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the shooting control method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the shooting control method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Shooting method and apparatus
CN105100620A
Method and apparatus for automatically matching test card
CN108055532A