Scene acquisition method, apparatus and electronic device
By acquiring and combining graphics cards to simulate target scenarios, the problem of wasted manpower and time in electronic equipment debugging is solved, and efficient equipment testing is achieved.
Patent Information
- Application Number
- CN202210191293.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-02-28
AI Technical Summary
During the development and debugging phase of electronic devices, it is necessary to shoot a large number of different real-world scenarios, which leads to a waste of manpower and time and high testing costs.
By acquiring the main features and background features of the target scene, the corresponding first and second image cards are obtained, and the image cards are combined into a composite image based on their positional relationship to simulate the target scene and replace real-scene shooting for equipment testing.
It effectively saves time and manpower, reduces equipment testing costs, and can quickly reproduce problem scenarios, thus improving testing efficiency.
Smart Images

Figure CN116721377B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of electronic equipment technology, specifically relating to a scene acquisition method, device, and electronic equipment. Background Technology
[0002] Currently, during the development and debugging phase of electronic devices, it is necessary to use electronic devices to capture a large number of different real-world scenes. The large number of images obtained are then used to verify whether there are any problems with the shooting effect of the electronic devices.
[0003] In related technologies, different real-world scenarios are often located in different places. Therefore, when testers take pictures of a large number of selected real-world scenarios, they will spend a lot of manpower and time, resulting in high equipment testing costs. Summary of the Invention
[0004] The purpose of this application is to provide a scene acquisition method, device, and electronic device that can solve the problem that the development and debugging phase of electronic devices in related technologies requires a lot of manpower and time, and the equipment testing cost is high.
[0005] In a first aspect, embodiments of this application provide a scene acquisition method, which includes: acquiring scene features corresponding to a target scene, wherein the scene features include subject features corresponding to a target object in the target scene and background features corresponding to a background part; acquiring a first image card associated with the subject features and a second image card associated with the background features; and combining the first image card and the second image card based on the positional relationship between the target object and the background part to obtain an image card combination screen corresponding to the target scene.
[0006] Secondly, embodiments of this application provide a scene acquisition device, which includes: an acquisition module, configured to acquire scene features corresponding to a target scene, wherein the scene features include subject features corresponding to a target object in the target scene and background features corresponding to a background part; the acquisition module is further configured to acquire a first image card associated with the subject features and a second image card associated with the background features; and a scene module, configured to combine the first image card and the second image card based on the positional relationship between the target object and the background part to obtain a combined image card image screen corresponding to the target scene.
[0007] Thirdly, embodiments of this application provide an electronic device, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps of the scenario acquisition method as described in the first aspect.
[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the scenario acquisition method as described in the first aspect.
[0009] Fifthly, embodiments of this application provide a chip that includes a processor and a communication interface, the communication interface and the processor being coupled together, the processor being used to run programs or instructions to implement the steps of the scenario acquisition method as described in the first aspect.
[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the steps of the scene acquisition method as described in the first aspect.
[0011] In this embodiment, the main features corresponding to the target object in the target scene and the background features corresponding to the background part can be obtained. A first image card is obtained through the main features, and a second image card is obtained through the background features. Since the first and second image cards correspond to the target object and the background part in the target scene, respectively, combining the first and second image cards based on the positional relationship between the target object and the background part can simulate the target scene, thus obtaining a simulated scene of the target scene, i.e., a combined image card image. Based on this, testers do not need to go to the actual target scene to take pictures; instead, they can complete the device test by taking pictures of the first and second image cards and the combined image card image, effectively saving time and manpower and reducing the cost of device testing. Attached Figure Description
[0012] Figure 1 This is one of the flowcharts illustrating the scene acquisition method provided in the embodiments of this application;
[0013] Figure 2 This is a schematic diagram illustrating an example of a graphics card combination interface provided in an embodiment of this application;
[0014] Figure 3 This is a second flowchart illustrating the scene acquisition method provided in the embodiments of this application;
[0015] Figure 4 This is the third flowchart illustrating the scene acquisition method provided in the embodiments of this application;
[0016] Figure 5 This is the fourth flowchart illustrating the scene acquisition method provided in the embodiments of this application;
[0017] Figure 6 This is a schematic diagram of the structure of a scene acquisition device provided in an embodiment of this application;
[0018] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0019] Figure 8This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0021] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0022] As in the background technology, during the development and debugging phase of electronic devices, it is necessary to use the electronic devices to capture a large number of different real-world scenes. These numerous images are then used to verify the image capture performance of the electronic devices and identify any issues. Since these different real-world scenes are often located in different places, testing involves significant manpower and time expenditure for testers, resulting in high equipment testing costs.
[0023] To address the problems in related technologies, this application provides a scene acquisition method. This method acquires the main features corresponding to the target object in the target scene and the background features corresponding to the background portion. A first image card is obtained through the main features, and a second image card is obtained through the background features. Since the first and second image cards correspond to the target object and background portion in the target scene, respectively, combining the first and second image cards based on the positional relationship between the target object and the background portion can simulate the target scene, thus obtaining a simulated scene of the target scene, i.e., a combined image card image. Based on this, testers do not need to go to the actual target scene to take pictures; instead, they can complete the device test by taking pictures of the first and second image cards and the combined image card image. This eliminates the need for actual scene shooting, effectively saving time and manpower, reducing device testing costs, and solving the problem in related technologies where the development and debugging phases of electronic devices require significant manpower and time, resulting in high device testing costs.
[0024] The scenario acquisition method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0025] Figure 1 This is a flowchart illustrating a scene acquisition method provided in an embodiment of this application. The execution subject of this scene acquisition method can be an electronic device. It should be noted that the aforementioned execution subject does not constitute a limitation on this application.
[0026] like Figure 1 As shown, the scene acquisition method provided in this application embodiment may include steps 110-130.
[0027] Step 110: Obtain the scene features corresponding to the target scene.
[0028] The scene features include the main features corresponding to the target object in the target scene, and the background features corresponding to the background.
[0029] The target scenario can be the scenario that the user wants to simulate or build, i.e., the scenario to be simulated.
[0030] For example, if testers want to test the shooting effect of electronic devices under strong outdoor light, they can use the strong outdoor light scene as the target scene and simulate the strong outdoor light scene by obtaining the scene characteristics of the strong outdoor light scene.
[0031] The target object can be the main subject of the shooting scene, and the number of target objects in the target scene can be at least one. The background part is the part other than the main subject of the shooting scene.
[0032] For example, such as Figure 2 As shown, in the target scene 201, the target object is the shooting subject 202 in 201, and the background part is the part 203 in 201 other than 202.
[0033] Step 120: Obtain the first image card associated with the subject features and the second image card associated with the background features.
[0034] Specifically, the electronic device can obtain a first image card associated with the target object from multiple image cards that matches the subject features, and obtain a second image card associated with the background from multiple image cards that matches the background features. When there are multiple target objects, the electronic device can obtain at least one first image card associated with each target object.
[0035] For example, if multiple image cards include 18 grayscale values, the main feature is a grayscale value of 50%, and the background feature is a grayscale value of 10%, then the image card with a grayscale value of 50% can be selected as the first image card from the 18 image cards with grayscale values, and the image card with a grayscale value of 10% can be selected as the second image card.
[0036] It should be noted that the number of the first or second card can be at least one, and this application does not impose a specific limit on the number of the first and second cards.
[0037] In one example, such as Figure 2 As shown, the first picture card associated with the target object 202 includes four cards, each corresponding to one of three colors. Together, they form the picture card combination 205 corresponding to the target object 202.
[0038] In another example, the second image cards consist of two: a pure white image card and an 18% neutral gray image card. Different backgrounds can be corresponding to different proportions of the two second image cards within the image.
[0039] Step 130: Based on the positional relationship between the target object and the background, combine the first and second image cards to obtain the image card combination screen corresponding to the target scene.
[0040] For example, such as Figure 2 As shown, the four first cards are combined to obtain the card combination corresponding to the target object 202. The second card 206 corresponds to the background part 203. The card combination screen 204 of the first card and the second card can be used as a simulated scene of the target scene 201. Therefore, there is no need to go to the real target scene 201 to take pictures. By taking pictures of the card combination screen 204, the scene image of the target scene 201 can be obtained.
[0041] The scene acquisition method provided in this application can acquire the main features corresponding to the target object in the target scene and the background features corresponding to the background part. A first image card is obtained through the main features, and a second image card is obtained through the background features. Since the first and second image cards correspond to the target object and the background part in the target scene, respectively, combining the first and second image cards based on the positional relationship between the target object and the background part can simulate the target scene, thus obtaining a simulated scene of the target scene, i.e., a combined image card image. Based on this, testers do not need to go to the actual target scene to take pictures; instead, they can complete the device test by taking pictures of the first and second image cards and the combined image card image, eliminating the need for actual scene shooting, effectively saving time and manpower, and reducing the cost of device testing.
[0042] The specific implementation methods of steps 110-130 above will be explained in detail below.
[0043] Step 110 involves obtaining the scene features corresponding to the target scene.
[0044] In some embodiments of this application, before step 110, the method may further include the following steps: receiving preset dimension information input by the user; determining the content included in the scene features based on the preset dimension information.
[0045] The target shooting strategy may include at least one of the automatic exposure strategy and automatic white balance strategy corresponding to the electronic device.
[0046] Optionally, if the preset dimension information is Automatic Exposure (AE), the subject feature can be the average gray value of the target object, and the background feature can be the proportion of bright and dark areas in the background. If the preset dimension information is Automatic White Balance (AWB), the subject feature can be saturation, and the background feature can be the proportion of the light source in the background.
[0047] In this embodiment, the content of both the subject features and background features in the scene features is determined by preset dimension information. Therefore, users can customize the dimensions they want to focus on. After inputting the preset dimension information into the electronic device, the electronic device can obtain the subject features and background features that match the preset dimension information. In this way, the combined image can be adapted to the preset dimension information, simulating the target scene that matches the user's focus dimension as much as possible, which is convenient for testing the shooting effect under that dimension.
[0048] In some embodiments of this application, scene features may include at least one of the following: grayscale value, brightness, dynamic range, reflectivity, contrast, color, color saturation, and type.
[0049] It should be noted that the more parameters included in the scene features, the better the first image card matches the target object, and the better the second image card matches the background. Therefore, the combined image card of the first and second images card is closer to the target scene.
[0050] In one example, multiple cards include 24 colors. The main feature is a combination of highly saturated red and yellow. Therefore, red and yellow cards can be selected from the 24 color cards as the first card. The background feature is a combination of less saturated white and gray. Therefore, white and gray cards can be selected from the 24 color cards as the second card.
[0051] In the embodiments of this application, the scene features can include parameters of any type, thus enabling the scene features to meet the needs of various target scenes as much as possible, improving the adaptability of the combined image and card screen to the scene, and expanding the scene range that the combined image and card screen can simulate.
[0052] In some embodiments of this application, Figure 3 This is a flowchart illustrating another scene acquisition method provided in an embodiment of this application. Step 110 may include... Figure 3 Steps 310 and 320 are shown.
[0053] Step 310: Obtain the first image.
[0054] The scene in which the first image is taken is the target scene, and the first image may include at least one image.
[0055] In one embodiment, when testing the camera performance of an electronic device, there are some fixed test scenarios. Therefore, the target scenario can be any fixed test scenario. After taking an image of the target scenario once, the image corresponding to the target scenario can be saved. If the electronic device needs to be tested later, the image corresponding to the target scenario, i.e., the first image, can be directly obtained, and the target scenario can be reconstructed from the first image.
[0056] For example, the first image can be submitted manually by the user.
[0057] In another embodiment, the first image can be a problem image captured by an electronic device, and the target scene is the scene where the problem image was captured. By inputting the problem image into the device, the problem present when the problem image was captured can be reproduced. Optionally, the problem image can be manually input by a tester, or the electronic device can be connected to a customer complaint system. When the customer complaint system receives a user complaint request, it can send the problem image from the user complaint request to the electronic device, thereby allowing the electronic device to receive the problem image and simulate the scene when the problem image was captured.
[0058] Step 320: Based on a preset recognition algorithm, the first image is recognized to determine the target object and background part in the first image, and the main features corresponding to the target object and the background features corresponding to the background part are generated.
[0059] The preset recognition algorithm can be set according to the required recognition accuracy, and this application does not make specific limitations here.
[0060] Optionally, if lower accuracy is required, the preset recognition algorithm can be an edge segmentation algorithm; if higher accuracy is required, the preset recognition algorithm can be an AI recognition algorithm.
[0061] For example, electronic devices can use edge segmentation algorithms to identify objects near the center of the first image as target objects. Alternatively, to simplify the calculation, the first image can be divided into nine regions (similar to the composition lines that can be displayed in a camera preview interface), and only the central region can be identified, with the central region being the target object.
[0062] In this embodiment, after acquiring the first image, a preset recognition algorithm can be used to identify the target object and background portion in the first image, generating the main features corresponding to the target object and the background features corresponding to the background portion. Based on this, a first image card matching the target object and a second image card matching the background portion can be obtained according to the main features and background features. The scene in the first image can be simulated using the first and second image cards, i.e., simulating the target scene when the first image was taken. Therefore, by capturing a combination of image cards, a scene image corresponding to the target scene can be obtained, eliminating the need for testers to go to the actual target scene to take pictures, reducing testing costs and shortening testing time. When the first image is a problematic image, the target scene when the problematic image was taken can be flexibly simulated using a combination of image cards. By analyzing the scene image obtained from capturing the combination of image cards, the problems existing when the problematic image was taken can be quickly reproduced, improving problem handling efficiency.
[0063] In some other embodiments of this application, obtaining the scene features corresponding to the target scene may specifically include: receiving the scene features corresponding to the target scene input by the user.
[0064] Specifically, users can directly input the scene features of the target scene to be simulated into the electronic device, so that the electronic device can simulate the target scene based on the subject features and background features in the scene features, thereby obtaining the scene image corresponding to the target scene.
[0065] For example, if the target scene is a white plus scene, the scene features may include a higher proportion of light colors in the image; or, if the target scene is a black minus scene, the scene features may include a higher proportion of dark colors in the image; or, if the target scene is a High Dynamic Range (HDR) scene, the scene features may include a wider dynamic range in the image.
[0066] In this embodiment, by receiving the main features and background features of the target scene to be simulated input by the user, a first image card matching the main features and a second image card matching the background features can be obtained, thus obtaining a first image card matching the target object and a second image card matching the background. Based on this, by combining the first and second image cards, a simulated scene of the target scene can be constructed, i.e., an image card combination screen. By capturing this image card combination screen, the scene image corresponding to the target scene can be obtained. When there are multiple target scenes, by inputting the scene features of each target scene into the electronic device, the image card combination screen corresponding to each target scene can be quickly obtained, thereby quickly obtaining scene images corresponding to multiple target scenes, shortening the debugging cycle of the electronic device, and improving testing efficiency.
[0067] In step 130, based on the positional relationship between the target object and the background, the first and second image cards are combined to obtain the image card combination screen corresponding to the target scene.
[0068] In some embodiments of this application, the electronic device can be connected to the grasping component, the background feature includes at least two feature parameter values, and the second image card associated with the background feature includes at least two images, wherein the feature parameter values corresponding to the at least two second image cards are different. Figure 4 This is a flowchart illustrating another scene acquisition method provided in an embodiment of this application. Step 130 may include... Figure 4 Steps 410 and 420 are shown.
[0069] Step 410: Determine the proportion of each sub-region in the background portion of the background portion.
[0070] The sub-regions in the background are divided based on the feature parameter values, and the proportion of the sub-regions to the background can be the ratio of the area of the sub-regions to the area of the background.
[0071] For example, the background portion P of the target scene consists of bright and dark areas. Therefore, the background features may include feature parameter values: average brightness value A1, average brightness value A2, and second cards associated with the background features include card a1 and card a2, where card a1 corresponds to the average brightness value A1 and card a2 corresponds to the average brightness value A2. The electronic device can divide the background portion P into a sub-region P1 corresponding to A1 and a sub-region P2 corresponding to A2, and determine the area ratio of P1 to P as x1 and the area ratio of P2 to P as x2.
[0072] Step 420: Control the grabbing component to grab the first picture card and the second picture card, and place at least one of the first picture card and the second picture card according to the positional relationship, and place at least two second picture cards according to the proportion to obtain a picture card combination screen.
[0073] Specifically, the electronic device can hold at least one of the first and second diagram cards. With the second diagram card fixed, the first diagram card can be placed on the plane where the second diagram card is located; or, with the first diagram card fixed, the second diagram card can be placed on the plane where the first diagram card is located; or, the first and second diagram cards can be placed on the same plane.
[0074] Referring to the example above, the background P of the target scene consists of bright and dark areas. The second image cards associated with the background features include image card a1 and image card a2, where image card a1 corresponds to the average brightness value A1, and image card a2 corresponds to the average brightness value A2. The electronic device can divide the background P into a sub-region P1 corresponding to A1 and a sub-region P2 corresponding to A2, and determine the area ratio of P1 to P as x1 and the area ratio of P2 to P as x2. Therefore, when placing image cards a1 and a2, x1 and x2 can be referenced for placement to obtain a background image card combination image, ensuring that the proportion of image card a1 in the entire background image card combination image is close to x1, and the proportion of image card a2 in the entire background image card combination image is close to x2. Simultaneously, referring to the target object Q being located at the center of the target scene, the electronic device can control the grasping component, such as controlling a robotic arm to grasp the first image card of the entity, placing the first image card at the center of the background image card combination image to obtain the final image card combination image.
[0075] In this embodiment, the electronic device can determine the positional relationship between the target object and the background based on the scene features corresponding to the target scene. Thus, when the electronic device controls the grasping component to grasp the first and second image cards, it can place the first and second image cards according to the positional relationship between the target object and the background, so that the resulting image card combination image maximally reproduces the target scene and improves the similarity between the target scene and the image card combination image. Simultaneously, when the background features include at least two feature parameter values and the second image cards include at least two images, by determining the proportion of the sub-regions corresponding to different feature parameter values in the background, at least two second image cards can be placed with reference to this proportion. This ensures that the proportion of the second image card corresponding to a certain feature parameter value in the image card combination image is adapted to the proportion of the sub-region corresponding to that feature parameter value in the background, thereby improving the similarity between the background and the background in the image card combination image.
[0076] In one embodiment, the two sets of spare image cards can be placed separately. One set of spare image cards corresponds to the subject being photographed, and the other set corresponds to the background. Each set includes multiple spare image cards. The electronic device can control the grasping component to select the first image card corresponding to the subject from one set of spare image cards, and to select the second image card corresponding to the background from the other set of spare image cards.
[0077] In some embodiments of this application, in order to test the shooting strategy of the device, the method may further include the following steps: receiving preset dimension information input by the user; determining a target shooting strategy based on the preset dimension information; and capturing a combined image of the first image card and the second image card based on the target shooting strategy to obtain a scene image corresponding to the target scene.
[0078] Optionally, the electronic device can directly capture the combined image of the image cards, or it can control other electronic devices with shooting capabilities to capture the combined image of the image cards.
[0079] Optionally, if the preset dimension information is Automatic Exposure (AE), then the target shooting strategy can be determined to be Automatic Exposure; if the preset dimension information is Automatic White Balance (AWB), then the target shooting strategy can be determined to be Automatic White Balance.
[0080] In this embodiment, the user can input preset dimension information into the electronic device to customize the device strategy to be tested. The electronic device can determine the target shooting strategy based on the preset dimension information and use the target shooting strategy to capture the combined image and card frame. By shooting in different scenarios based on the same target shooting strategy, the poorly performing scene images among multiple scene images can be identified. Based on the scene images and their corresponding shooting scenarios, problems are extracted. The developers adjust the target shooting strategy according to the existing problems to improve the target shooting strategy of the electronic device and ensure that the electronic device can achieve good shooting results in any shooting scenario.
[0081] In some embodiments of this application, in order to further improve the similarity between the combined image and the target scene, Figure 5 This is a flowchart illustrating another scene acquisition method provided in this application embodiment. Based on a target shooting strategy, a combined image of a first image card and a second image card is captured to obtain a scene image corresponding to the target scene. Specifically, this may include... Figure 5 Steps 510-530 are shown.
[0082] Step 510: Determine the light source information corresponding to the target scene based on the scene characteristics.
[0083] The light source information may include at least one of the following: brightness value, color value, and color temperature.
[0084] Step 520: Determine the target illumination parameters based on the light source information.
[0085] Optionally, the electronic device can directly determine the parameters corresponding to the light source information as the target supplementary lighting parameters, or the electronic device can adjust the parameters in the light source information, such as increasing the preset value, to obtain the target supplementary lighting parameters.
[0086] Step 530: Apply fill light to the image of the combined image and card based on the target fill light parameters, and capture the image of the combined image and card after fill light based on the target shooting strategy to obtain the scene image corresponding to the target scene.
[0087] Specifically, the electronic device can be connected to the light source system, so the electronic device can control the light source system to provide supplementary lighting to the image of the combined image and the target scene based on the target supplementary lighting parameters, so that the image of the combined image and the target scene are close to the light source corresponding to the target scene, and ensure that the brightness and color temperature of the combined image and the target scene are similar.
[0088] For example, the light source system can be compatible with a variety of light sources with different color temperatures and colors, such as D75, D65, D50, CWF, TL84, A, H light, etc. The brightness value of each light source can be adjusted to meet the supplementary lighting needs of the picture card combination image.
[0089] In this embodiment, since the brightness and color temperature of the ambient light vary during photography, they can also affect the photographic effect. Therefore, in order to ensure that the final captured scene image is consistent with the image captured directly from the target scene, the electronic device can determine the target lighting parameters based on the light source information of the target scene. By using the target lighting parameters to illuminate the image-card combination screen, the image-card combination screen can be made closer to the light source corresponding to the target scene, ensuring that the brightness and color temperature of the image-card combination screen are similar to those of the target scene, thereby improving the similarity between the image-card combination screen and the target scene, and thus improving the similarity between the captured scene image and the image captured directly from the target scene.
[0090] In other embodiments of this application, after capturing a combined image of the first and second image cards based on a target shooting strategy to obtain a scene image corresponding to the target scene, the method may further include: obtaining target shooting parameters corresponding to the scene image, wherein the target shooting parameters include at least one of automatic exposure parameters and automatic white balance parameters; and adjusting the target shooting strategy based on the target shooting parameters and preset shooting parameters.
[0091] Among them, the preset shooting parameters can be the shooting parameters under the ideal effect, and the target shooting parameters correspond to the preset shooting parameters.
[0092] For example, when the target shooting parameters are the automatic exposure parameters corresponding to the scene image, the preset shooting parameters can be the automatic exposure parameters under the ideal effect, and the target shooting strategy can be the automatic exposure strategy corresponding to the electronic device. By comparing the two automatic exposure parameters, the automatic exposure strategy corresponding to the electronic device can be optimized and adjusted to improve the photo-taking effect of the electronic device.
[0093] In this embodiment of the application, after a scene image is captured based on the target shooting strategy, the problems existing in the scene image can be extracted by comparing the target shooting parameters and preset shooting parameters corresponding to the scene image, thereby solving the problems existing in the target shooting strategy, optimizing the target shooting strategy, and improving the photo-taking effect of the electronic device.
[0094] It should be noted that the scene acquisition method provided in this application embodiment can be executed by a scene acquisition device or a control module within that scene acquisition device for executing the scene acquisition method. This application embodiment uses the execution of the scene acquisition method by a scene acquisition device as an example to illustrate the scene acquisition device provided in this application embodiment. The scene acquisition device will be described in detail below.
[0095] Figure 6 This is a schematic diagram of the structure of a scene acquisition device provided in this application.
[0096] like Figure 6 As shown, this application embodiment provides a scene acquisition device 600, which includes: an acquisition module 610 and a scene module 620.
[0097] The acquisition module 610 is used to acquire scene features corresponding to the target scene, including the main features corresponding to the target object in the target scene and the background features corresponding to the background part; the acquisition module 610 is also used to acquire a first image card associated with the main features and a second image card associated with the background features; the scene module 620 is used to combine the first image card and the second image card based on the positional relationship between the target object and the background part to obtain a combined image card screen corresponding to the target scene.
[0098] The scene acquisition device provided in this application embodiment can acquire the main features corresponding to the target object in the target scene and the background features corresponding to the background part. It acquires a first image card through the main features and a second image card through the background features. Since the first and second image cards correspond to the target object and the background part in the target scene, respectively, combining the first and second image cards based on the positional relationship between the target object and the background part can simulate the target scene, thus obtaining a simulated scene of the target scene, i.e., a combined image card image. Based on this, testers do not need to go to the actual target scene to take pictures; instead, they can complete the equipment test by taking pictures of the first and second image cards and the combined image card image, effectively saving time and manpower and reducing equipment testing costs.
[0099] In some embodiments of this application, the device further includes: a receiving module, configured to receive preset dimension information input by a user before acquiring scene features corresponding to the target scene; and a determining module, configured to determine the content included in the scene features based on the preset dimension information.
[0100] In some embodiments of this application, scene features include at least one of the following: grayscale value, brightness, dynamic range, reflectivity, contrast, color, and color saturation.
[0101] In some embodiments of this application, the acquisition module 610 includes: an acquisition unit for acquiring a first image; and a recognition unit for recognizing the first image based on a preset recognition algorithm, determining the target object and background portion in the first image, and acquiring the subject features corresponding to the target object and the background features corresponding to the background portion.
[0102] In some embodiments of this application, the acquisition module 610 is specifically used to: receive scene features corresponding to the target scene input by the user.
[0103] In some embodiments of this application, the device is connected to a grasping component. The background features include at least two feature parameter values, and the second image cards associated with the background features include at least two images. The feature parameter values corresponding to the at least two second image cards are different. The scene module is specifically used to: determine the proportion of each sub-region in the background portion, wherein the sub-regions in the background portion are divided based on the feature parameter values; control the grasping component to grasp the first image card and the second image card, and place at least one of the first image card and the second image card according to the positional relationship, and place at least two second image cards according to the proportion to obtain a combined image card image screen.
[0104] In some embodiments of this application, the device further includes: a receiving module for receiving preset dimension information input by a user; a determining module for determining a target shooting strategy based on the preset dimension information; and a shooting module for shooting a combined image of a first image card and a second image card based on the target shooting strategy to obtain a scene image corresponding to the target scene.
[0105] In some embodiments of this application, the shooting module includes: a determining unit, configured to determine light source information corresponding to the target scene based on scene characteristics; the determining unit is further configured to determine target supplementary lighting parameters based on the light source information; and a shooting unit, configured to supplement the image of the combined image and card based on the target supplementary lighting parameters, and to shoot the image of the combined image and card after supplementary lighting based on the target shooting strategy, thereby obtaining a scene image corresponding to the target scene.
[0106] In some embodiments of this application, the device further includes: an acquisition module 610, configured to acquire target shooting parameters corresponding to the scene image after capturing a combined image of the first image card and the second image card based on a target shooting strategy, the target shooting parameters including at least one of automatic exposure parameters and automatic white balance parameters; and an adjustment module, configured to adjust the target shooting strategy based on the target shooting parameters and preset shooting parameters.
[0107] The scene acquisition device provided in this application embodiment can achieve... Figures 1-5 The various processes implemented by the electronic device in the method embodiment will not be described again here to avoid repetition.
[0108] The scene acquisition device in this application embodiment can be an electronic device, or a component, integrated circuit, or chip within an electronic device. The electronic device can be a terminal, or any other device besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0109] The scene acquisition device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0110] Optionally, such as Figure 7 As shown, this application embodiment also provides an electronic device 700, including a processor 701, a memory 702, and a program or instructions stored in the memory 702 and executable on the processor 701. When the program or instructions are executed by the processor 701, they implement the various processes of the above-described scenario acquisition method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0111] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0112] Figure 8 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application.
[0113] The electronic device 800 includes, but is not limited to, components such as: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, and processor 810.
[0114] Those skilled in the art will understand that the electronic device 800 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 810 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0115] The processor 810 is used to acquire scene features corresponding to the target scene, including subject features corresponding to the target object in the target scene and background features corresponding to the background part; the processor 810 is also used to acquire a first image card associated with the subject features and a second image card associated with the background features; the processor 810 is used to combine the first image card and the second image card based on the positional relationship between the target object and the background part to obtain a combined image card screen corresponding to the target scene.
[0116] In this embodiment, the main features corresponding to the target object in the target scene and the background features corresponding to the background part can be obtained. A first image card is obtained through the main features, and a second image card is obtained through the background features. Since the first and second image cards correspond to the target object and the background part in the target scene, respectively, combining the first and second image cards based on the positional relationship between the target object and the background part can simulate the target scene, thus obtaining a simulated scene of the target scene, i.e., a combined image card image. Based on this, testers do not need to go to the actual target scene to take pictures; instead, they can complete the device test by taking pictures of the first and second image cards and the combined image card image, effectively saving time and manpower and reducing the cost of device testing.
[0117] In some embodiments of this application, the user input unit 807 is used to receive preset dimension information input by the user before obtaining the scene features corresponding to the target scene; the processor 810 is used to determine the content included in the scene features based on the preset dimension information.
[0118] In some embodiments of this application, scene features include at least one of the following: grayscale value, brightness, dynamic range, reflectivity, contrast, color, and color saturation.
[0119] In some embodiments of this application, the processor 810 is specifically used to: acquire a first image; identify the first image based on a preset recognition algorithm, determine the target object and background part in the first image, and acquire the main features corresponding to the target object and the background features corresponding to the background part.
[0120] In some embodiments of this application, the processor 810 is specifically used to: receive scene features corresponding to the target scene input by the user.
[0121] In some embodiments of this application, the electronic device is connected to a grasping component. The background features include at least two feature parameter values, and the second image cards associated with the background features include at least two images. The feature parameter values corresponding to the at least two second image cards are different. The processor 810 is specifically used to: determine the proportion of each sub-region in the background portion to the background portion, wherein the sub-regions in the background portion are divided based on the feature parameter values; control the grasping component to grasp the first image card and the second image card, and place at least one of the first image card and the second image card according to the positional relationship, and place at least two second image cards according to the proportion to obtain an image card combination screen.
[0122] In some embodiments of this application, the user input unit 807 is used to receive preset dimension information input by the user; the processor 810 is used to determine the target shooting strategy according to the preset dimension information; the processor 810 is used to capture the combined image of the first image card and the second image card based on the target shooting strategy to obtain the scene image corresponding to the target scene.
[0123] In some embodiments of this application, the processor 810 is specifically used to: determine the light source information corresponding to the target scene based on scene characteristics; determine the target supplementary lighting parameters based on the light source information; supplement the image and card combination image based on the target supplementary lighting parameters, and capture the supplemented image and card combination image based on the target shooting strategy to obtain the scene image corresponding to the target scene.
[0124] In some embodiments of this application, the processor 810 is configured to, after capturing a combined image of the first and second image cards based on a target shooting strategy to obtain a scene image corresponding to the target scene, acquire target shooting parameters corresponding to the scene image, the target shooting parameters including at least one of automatic exposure parameters and automatic white balance parameters; the processor 810 is configured to adjust the target shooting strategy based on the target shooting parameters and preset shooting parameters.
[0125] It should be understood that, in this embodiment, the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042. The GPU 8041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0126] The memory 809 can be used to store software programs and various data. The memory 809 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 809 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 809 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0127] Processor 810 may include one or more processing units; optionally, processor 810 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 810.
[0128] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described scenario acquisition method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0129] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer-readable storage medium, examples of which include non-transitory computer-readable storage media such as computer read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0130] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described scenario acquisition method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0131] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0132] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described scenario acquisition method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0133] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0135] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A scene acquisition method, characterized in that, include: Obtain scene features corresponding to the target scene, wherein the scene features include the main features corresponding to the target object in the target scene and the background features corresponding to the background part. The scene features include at least one of the following: grayscale value, brightness, dynamic range, reflectivity, contrast, color, and color saturation. Obtain a first image card associated with the main feature and a second image card associated with the background feature; Based on the positional relationship between the target object and the background, the first image card and the second image card are combined to obtain the image card combination screen corresponding to the target scene; The more parameters included in the scene features, the better the first image card matches the target object, the better the second image card matches the background, and the closer the combined image card image is to the target scene. The method further includes: Receive preset dimension information input by the user; The target shooting strategy is determined based on the preset dimension information, wherein, when the preset dimension information is automatic exposure, the target shooting strategy is an automatic exposure strategy, and when the preset dimension information is automatic white balance, the target shooting strategy is an automatic white balance strategy. Based on the scene characteristics, determine the light source information corresponding to the target scene; Determine the target supplementary lighting parameters based on the light source information; The image of the combined image and card is illuminated based on the target illumination parameters, and the image of the combined image and card is captured after illumination based on the target shooting strategy to obtain the scene image corresponding to the target scene.
2. The method according to claim 1, characterized in that, Before obtaining the scene features corresponding to the target scene, the method further includes: The content included in the scene features is determined based on the preset dimension information.
3. The method according to claim 1, characterized in that, The acquisition of scene features corresponding to the target scene includes: Get the first image; The first image is identified based on a preset recognition algorithm to determine the target object and background part in the first image, and to obtain the main features corresponding to the target object and the background features corresponding to the background part.
4. The method according to claim 1, characterized in that, The acquisition of scene features corresponding to the target scene includes: Receive scene features corresponding to the target scene input by the user.
5. The method according to claim 1, characterized in that, The method is applied to an electronic device connected to a grasping component. The background feature includes at least two feature parameter values. The second image card associated with the background feature includes at least two images, and the feature parameter values corresponding to the at least two second image cards are different. Based on the positional relationship between the target object and the background portion, the first image card and the second image card are combined to obtain an image card combination screen corresponding to the target scene, including: Determine the proportion of each sub-region in the background portion, wherein the sub-regions in the background portion are divided based on the feature parameter values; The grabbing component is controlled to grab the first image card and the second image card, and at least one of the first image card and the second image card is placed according to the positional relationship, and at least two second image cards are placed according to the ratio to obtain the image card combination screen.
6. The method according to claim 1, characterized in that, After applying supplemental lighting to the image of the combined image and card based on the target supplemental lighting parameters, and capturing the supplemented image of the combined image and card based on the target shooting strategy to obtain a scene image corresponding to the target scene, the method further includes: Obtain the target shooting parameters corresponding to the scene image, wherein the target shooting parameters include at least one of automatic exposure parameters and automatic white balance parameters; The target shooting strategy is adjusted based on the target shooting parameters and preset shooting parameters.
7. A scene acquisition device, characterized in that, include: The acquisition module is used to acquire scene features corresponding to the target scene. The scene features include the main features corresponding to the target object in the target scene and the background features corresponding to the background part. The scene features include at least one of the following: grayscale value, brightness, dynamic range, reflectivity, contrast, color, and color saturation. The acquisition module is further configured to acquire a first image card associated with the main feature and a second image card associated with the background feature; The scene module is used to combine the first image card and the second image card based on the positional relationship between the target object and the background part to obtain the image card combination screen corresponding to the target scene; The more parameters included in the scene features, the better the first image card matches the target object, the better the second image card matches the background, and the closer the combined image card image is to the target scene. The device further includes: The receiving module is used to receive preset dimension information input by the user; The determining module is used to determine the target shooting strategy based on the preset dimension information, wherein, when the preset dimension information is automatic exposure, the target shooting strategy is an automatic exposure strategy, and when the preset dimension information is automatic white balance, the target shooting strategy is an automatic white balance strategy. The device further includes: The shooting module is used to capture a combined image of the first image card and the second image card based on the target shooting strategy, so as to obtain a scene image corresponding to the target scene; The shooting module includes: The determining unit is used to determine the light source information corresponding to the target scene based on the scene features; The determining unit is further configured to determine target supplementary lighting parameters based on the light source information; The shooting unit is used to supplement the lighting of the image card combination based on the target supplementary lighting parameters, and to shoot the image card combination after supplementary lighting based on the target shooting strategy, so as to obtain the scene image corresponding to the target scene.
8. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps of the scene acquisition method as described in any one of claims 1-6.
Citation Information
Patent Citations
Graph card, device and method for testing resolving power of fisheye lens
CN109348217A
Composite three-dimensional scene and set for and method of creating same
US20060164553A1
