Shooting picture generation method and device, equipment and storage medium
By detachably connecting multiple camera modules and adjusting the lens orientation, dynamically expanding the combination number and field of view angle, the adaptability problem of existing cameras at different shooting distances is solved, and the efficient generation of clear panoramic images is achieved.
Patent Information
- Application Number
- CN202410052118.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2025-07-22
AI Technical Summary
The existing camera devices are difficult to adapt to scenes of different shooting distances, resulting in limited use scenarios and inability to capture clear and comprehensive camera images.
By removably connecting multiple camera modules and facing the lenses, dynamically adjusting the number of combinations and field of view angles to suit scenes of different shooting distances.
It realizes clear panoramic photography at different shooting distances, reduces the complexity of stitching, and improves picture generation efficiency and adaptability.
Smart Images

Figure CN120358406A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of camera technologies, and in particular, to a method, apparatus, device, and storage medium for generating a camera image. Background Art
[0002] In order to monitor students' listening status in class, cameras can be installed in the classroom. The students are photographed by the cameras to collect camera images containing the students, and the listening status of the students is analyzed based on the camera images. The field of view angle and focusing distance of a conventional camera are limited. When the field of view angle of the camera increases, the focusing distance of the camera decreases, and when the focusing distance of the camera increases, the field of view angle decreases. In a large classroom, a single camera is difficult to capture a clear and comprehensive camera image.
[0003] In the prior art, multiple images captured by an image acquisition device with multiple cameras are stitched together to obtain a clear and comprehensive camera image. However, the number of cameras in the image acquisition device is fixed and cannot adapt to shooting scenarios with different shooting distances, so the usage scenarios are greatly limited, which is not conducive to popularization and use. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for generating a camera image to solve the problem in the prior art that it cannot adapt to shooting scenarios with different shooting distances, and the limitation of shooting distance on usage scenarios is small, which is conducive to popularization and use.
[0005] In a first aspect, this application provides a method for generating a camera image, which is applied to a first camera module. At least one side of the first camera module is detachably connected to a second camera module, and the lenses of the first camera module and the second camera module face the same direction. The method includes:
[0006] Determine whether the first camera module is a slave camera or a master camera;
[0007] When the first camera module is the slave camera, stitch the image transmitted by the second camera module with the image captured by itself, and transmit the stitched image according to the orientation of the master camera;
[0008] When the first camera module is the master camera, stitch the image transmitted by the second camera module with the image captured by itself to generate a camera image.
[0009] By means of the above technical means, multiple camera modules are detachably connected and the lenses of the multiple camera modules face the same direction, so as to facilitate the dynamic expansion of the combination quantity of the camera modules. The larger the combination quantity of the camera modules, the larger the combined field of view angle of the camera modules. The combined structure of the camera modules can dynamically adjust the combination quantity and the combined field of view angle of the camera modules based on the shooting distance of the shooting scene, so as to adapt to shooting scenes with different shooting distances, solve the problem in the prior art that shooting scenes with different shooting distances cannot be adapted, and is conducive to the popularization and use of the camera modules. After multiple camera modules are spliced together, the slave camera and the master camera can be automatically identified. The slave camera splices the picture transmitted by the corresponding connected slave camera with the picture it shoots and then transmits it to the master camera. The master camera splices the picture transmitted by the corresponding connected slave camera with the picture it shoots to generate the final captured picture. The splicing of the pictures captured by the camera modules can be completed without pre-obtaining the positions of the respective camera modules. The picture splicing method is relatively simple, and the splicing process is allocated to each camera module to balance the processing load of each camera module, which is conducive to improving the generation efficiency of the captured picture.
[0010] Optionally, determining that the first camera module is a slave camera or a master camera includes:
[0011] Determining that the first camera module is a slave camera or a master camera according to the orientation of the second camera module and a preset master camera orientation strategy.
[0012] By means of the above technical means, it is not necessary for the staff to specifically obtain the device numbers of the respective camera modules to determine whether the camera module is a master camera or a slave camera, which greatly reduces the implementation difficulty and complexity of the solution.
[0013] Optionally, the second camera module is connected to the right side and / or the left side of the first camera module; correspondingly, determining that the first camera module is a slave camera or a master camera according to the orientation of the second camera module and a preset master camera orientation strategy includes:
[0014] In the case where the master camera orientation strategy is that the leftmost camera module is the master camera, if the left side of the first camera module is not connected to the second camera module, it is determined that the first camera module is the master camera; if the left side of the first camera module is connected to the second camera module, it is determined that the first camera module is the slave camera;
[0015] In the case where the master camera orientation strategy is that the rightmost camera module is the master camera, if the right side of the first camera module is not connected to the second camera module, it is determined that the first camera module is the master camera; if the right side of the first camera module is connected to the second camera module, it is determined that the first camera module is the slave camera.
[0016] Through the above technical means, the first camera module can determine whether it is the main camera or the slave camera based on the second camera module connected to the corresponding contact, without the need to perform data communication with the second camera module, greatly improving the determination efficiency of the main camera or the slave camera.
[0017] Optionally, the first camera module is connected to one of the second camera modules; correspondingly, the method further includes:
[0018] In the case where the first camera module is the slave camera, transmit the captured image to the second camera module.
[0019] Through the above technical means, each slave camera can transmit the image to be stitched to the main camera with just one image transmission, without the need for multiple repeated transmissions, greatly improving the image transmission efficiency, and thus improving the efficiency of the captured image generated by the main camera through stitching.
[0020] Optionally, the right side and the left side of the first camera module are connected to the second camera module; correspondingly, the step of stitching the image transmitted by the second camera module with its own captured image and transmitting the stitched image according to the orientation of the main camera includes:
[0021] In the case where the main camera is on the right side of the first camera module, receive the image transmitted by the second camera module connected on the left side, stitch the received image on the left side of its own captured image, and transmit the stitched image to the second camera module connected on the right side;
[0022] In the case where the main camera is on the left side of the first camera module, receive the image transmitted by the second camera module connected on the right side, stitch the received image on the right side of its own captured image, and transmit the stitched image to the second camera module connected on the left side.
[0023] Through the above technical means, the slave camera can stitch the image transmitted by the slave camera on one side to the corresponding side of its own captured image, thus realizing the stitching of the captured image, without the need to pre-obtain the position of the slave camera and perform image stitching based on the position of the slave camera, greatly reducing the complexity of the captured image stitching and being beneficial to improving the generation efficiency of the captured image. Transmit the stitched image according to the orientation of the main camera to ensure the accuracy of subsequent stitching and improve the efficiency of transmitting the image to the main camera.
[0024] Optionally, the right side and / or the left side of the first camera module are connected to the second camera module; correspondingly, the step of stitching the image transmitted by the second camera module with its own captured image to generate a captured image includes:
[0025] The screen transmitted by the second camera module connected on the left is spliced on the left side of the screen captured by itself, and / or the screen transmitted by the second camera module connected on the right is spliced on the right side of the screen captured by itself to obtain a captured screen.
[0026] Through the above technical means, the main camera splices the screen transmitted by the slave camera on one side on the corresponding side of the screen captured by itself, and the splicing of the captured screen can be realized without pre-obtaining the position of the slave camera and performing screen splicing based on the position of the slave camera, greatly reducing the complexity of the splicing of the captured screen and being beneficial to improving the generation efficiency of the captured screen.
[0027] Optionally, the method further includes:
[0028] When the first camera module is the main camera, receive a parameter adjustment instruction through network communication, and adjust its own shooting parameters according to the parameter adjustment instruction;
[0029] Transmit the parameter adjustment instruction to each slave camera so that the slave camera adjusts its shooting parameters according to the parameter adjustment instruction.
[0030] Through the above technical means, the main camera coordinates and schedules the slave cameras based on the control instructions sent by the external device to realize the control of each camera module by the external device.
[0031] In a second aspect, the present application provides a captured screen generation device applied to a first camera module. The first camera module is detachably connected to a second camera module on at least one side, and the lenses of the first camera module and the second camera module face the same direction. The device includes:
[0032] A master-slave judgment module configured to determine whether the first camera module is a slave camera or a main camera;
[0033] A first splicing module configured to splice the screen transmitted by the second camera module with the screen captured by itself when the first camera module is the slave camera, and transmit the spliced screen according to the orientation of the main camera;
[0034] A second splicing module configured to splice the screen transmitted by the second camera module with the screen captured by itself when the first camera module is the main camera to generate a captured screen.
[0035] In a third aspect, the present application provides a captured screen generation device, including:
[0036] One or more processors; a memory storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the camera image generation method as described in the first aspect.
[0037] In a fourth aspect, the present application provides a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to execute the camera image generation method as described in the first aspect.
[0038] In the present application, by detachably connecting multiple camera modules and having the lenses of the multiple camera modules face the same direction, it is convenient to dynamically expand the combination number of the camera modules. The larger the combination number of the camera modules, the larger the combined field of view angle of the camera modules. The combined structure of the camera modules can dynamically adjust the combination number and combined field of view angle of the camera modules based on the shooting distance of the shooting scene to adapt to shooting scenes with different shooting distances, solving the problem in the prior art that it cannot adapt to shooting scenes with different shooting distances and facilitating the popularization and use of camera modules. After multiple camera modules are spliced together, the slave camera and the master camera can be automatically identified. The slave camera splices the image transmitted by the corresponding connected slave camera with its own captured image and then transmits it to the master camera. The master camera splices the image transmitted by the corresponding connected slave camera with its own captured image to generate the final camera image. The splicing of the images captured by the camera modules can be completed without pre-acquiring the positions of each camera module. The image splicing method is relatively simple, and the splicing process is distributed to each camera module to balance the processing load of each camera module, which is beneficial to improving the generation efficiency of the camera image. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a schematic diagram of the left and right side connection of multiple camera modules provided by an embodiment of the present application;
[0040] Figure 2 is a schematic diagram of the upper and lower side connection of multiple camera modules provided by an embodiment of the present application;
[0041] Figure 3 is a schematic diagram of the upper, lower, left, and right side connection of multiple camera modules provided by an embodiment of the present application;
[0042] Figure 4 is a schematic diagram of the structure of a camera module provided by an embodiment of the present application;
[0043] Figure 5 is a flowchart of a camera image generation method provided by an embodiment of the present application;
[0044] Figure 6 is one of the schematic diagrams of the spliced image provided by an embodiment of the present application;
[0045] Figure 7 It is the second schematic diagram of the stitched picture provided by the embodiment of the present application;
[0046] Figure 8 It is the schematic diagram of the captured picture provided by the embodiment of the present application;
[0047] Figure 9 It is the structural schematic diagram of a captured picture generating device provided by the embodiment of the present application;
[0048] Figure 10 It is the structural schematic diagram of a captured picture generating device provided by the embodiment of the present application. Detailed implementation manners
[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the following further describes the specific embodiments of the present application in detail with reference to the drawings. It can be understood that the specific embodiments described herein are only used to explain the present application, rather than limiting the present application. Additionally, it should be noted that for the convenience of description, only the parts related to the present application are shown in the drawings, rather than all the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but there can also be additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0050] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally represents an "or" relationship between the associated objects before and after.
[0051] In relatively common existing implementation methods, an image acquisition device captures multiple images through multiple cameras, and then stitches the multiple images based on the position information of each camera to obtain a captured image. However, the number of cameras of the image acquisition device is fixed. When used in a shooting scenario with a large shooting distance, if the image acquisition device wants to adapt to the shooting distance by reducing the field of view angle and increasing the focusing distance, it is found that the field of view angle after stitching of the multiple cameras is small and the entire shooting scenario cannot be captured. Therefore, the current image acquisition device cannot adapt to shooting scenarios with different shooting distances, and its usage scenario is greatly limited, which is not conducive to popularization and use.
[0052] To solve the above problems, this embodiment provides a method for generating a captured image, in which multiple camera modules are detachably connected and the lenses of the multiple camera modules face the same direction, so as to facilitate dynamically expanding the combined number of camera modules. The combined structure of the camera modules can dynamically adjust the combined number and combined field of view angle of the camera modules based on the shooting distance of the shooting scenario, so as to adapt to shooting scenarios with different shooting distances, which is conducive to popularization and use.
[0053] The method for generating a captured image provided in this embodiment can be executed by a captured image generation device. The captured image generation device can be implemented in software and / or hardware. The captured image generation device can be composed of two or more physical entities, or can be composed of one physical entity. For example, the captured image generation device can be a first camera module, and the first camera module is any one of the multiple connected camera modules. At least one side of the first camera module is detachably connected to a second camera module, that is, the second camera module is also one of the multiple connected camera modules. It should be noted that when the second camera module is connected to the first camera module, the lenses of the first camera module and the second camera module face the same direction to ensure that the images captured by the first camera module and the second camera module can be correctly stitched subsequently. In addition, the captured image generation device can also be a combined device obtained after connecting multiple camera modules.
[0054] In this embodiment, multiple camera modules can be connected on the left and right sides. Figure 1 is a schematic diagram of the left and right side connection of multiple camera modules provided by an embodiment of the present application. As Figure 1 shown, the left side and / or the right side of the camera module 10 is connected to other camera modules 10, and the lenses 11 of the connected camera modules 10 face the same direction. Multiple camera modules can also be connected on the upper and lower sides. Figure 2 is a schematic diagram of the upper and lower side connection of multiple camera modules provided by an embodiment of the present application. As Figure 2 shown, the upper side and / or the lower side of the camera module 10 is connected to other camera modules 10, and the lenses of the connected camera modules 10 face the same direction. Multiple camera modules can also be connected on the upper, lower, left, and right sides. Figure 3Schematic diagram of the connection of multiple camera modules on the upper, lower, left and right sides provided in the embodiment of the present application. Figure 3 As shown, the upper side, lower side, left side and / or right side of the camera module 10 are connected to other camera modules 10, and the lenses of the connected camera modules 10 face the same direction. Figure 1 , Figure 2 and Figure 3 The number of camera module combinations shown is for illustration only, and the specific number of camera module combinations needs to be set according to actual conditions.
[0055] In this embodiment, the first camera module and the second camera module are connected via contacts. Figure 4 Schematic diagram of the structure of the camera module provided in the embodiment of the present application. Figure 4 As shown, the camera module 10 is provided with contacts 12 on the upper, lower, left and right sides ( Figure 4 The contacts on the bottom and left sides are not shown). When the left side of the first camera module is connected to the second camera module, the left contact of the first camera module is connected to the right contact of the second camera module, and the same applies to other connection methods. Compared with other connection methods, the disassembly method of the contact connection is simpler and easier to implement, which is beneficial to reducing the assembly implementation cost of the camera module. Furthermore, an anti-fool structure is provided between the first camera module and the second camera module to avoid the lenses facing different directions when the camera modules are assembled, thereby ensuring the accuracy of the assembly. Reference Figure 4 The contacts are tilted at a certain angle. When the lenses of the first camera module and the correspondingly connected second camera module face the same direction, the correspondingly contacted contacts can cooperate with each other, thus realizing fool-proof connection of the camera modules.
[0056] The first camera module and the second camera module include an Ethernet power supply port, which is used to connect to power and network communication. Generally speaking, the Ethernet power supply port is set on the opposite side of the lens. When the Ethernet power supply port is plugged into a network cable, the first camera module and the second camera module are powered and establish a network connection with an external device.
[0057] The camera image generation device is installed with at least one type of operating system, wherein the operating system includes but is not limited to the Android system, the Linux system and the Windows system. The camera image generation device can install at least one application based on the operating system, and the application can be an application that comes with the operating system, or an application downloaded from a third-party device or server. In this embodiment, the camera image generation device has at least an application that can execute the camera image generation method.
[0058] For ease of understanding, this embodiment is described by taking the first camera module as an example of the main body for executing the camera image generation method.
[0059] Figure 5It is a flowchart of a method for generating a camera image provided by an embodiment of the present application. As Figure 5 shown, the steps of the method for generating a camera image include:
[0060] S110. Determine whether the first camera module is a slave camera or a master camera.
[0061] In this embodiment, the slave camera is used to splice the image transmitted by the corresponding connected camera module with the image captured by itself and then transmit it to another connected camera module. The master camera is used to splice the image transmitted by the corresponding connected camera module with the image captured by itself to generate a camera image.
[0062] Since the image splicing processes performed by the slave camera and the master camera are different, for this, before performing image splicing, the first camera module can determine whether it is a slave camera or a master camera. Exemplarily, the staff can select one of the camera modules as the master camera in advance based on the device numbers of multiple connected camera modules and save the device number of the master camera to each camera module. The first camera module can compare the pre-saved device number of the master camera with its own device number. When the device number of the master camera is inconsistent with its own device number, it determines that it is a slave camera. When the device number of the main camera is consistent with its own device number, it determines that it is a master camera. Further, in order for the slave camera to transmit the corresponding captured image or the spliced image to the master camera later, the master camera notifies the corresponding connected second camera module that it is the master camera through a contact, so that the second camera module notifies the other connected camera modules of the orientation of the master camera. For example, Figure 1 in the camera module B is the master camera, and the master camera sends a notification that it is the master camera to the camera modules on both the left and right sides. The camera module A receives the notification through the right contact, and then determines that the master camera is on its right side. The camera module D receives the notification through the left contact, and then determines that the master camera is on its left side. The camera module D then sends the notification to the camera module C through the right contact. After the camera module C receives the notification through the left contact, it can determine that the master camera is on its left side. It can be understood that the slave camera does not need to know the specific position of the master camera, but only needs to determine which direction (up, down, left, or right) the master camera is located in to transmit the corresponding captured or spliced image to that direction, which greatly reduces the implementation difficulty of image transmission and is beneficial to improving the efficiency of image transmission.
[0063] In another embodiment, the first camera module can be determined as a slave camera or a master camera according to the orientation of the second camera module and a preset master camera orientation strategy. The master camera orientation strategy can be understood as the position information of the master camera among multiple connected camera modules. Exemplarily, the first camera module can calculate its own position information based on the orientation of the corresponding connected second camera module, and then compare its own position information with the position information of the master camera defined by the master camera orientation strategy to determine whether it is a slave camera or a master camera. In this embodiment, the camera module can be determined as a slave camera or a master camera through the master camera orientation strategy, without the need for staff to specifically obtain the device numbers of each camera module, greatly reducing the implementation difficulty and complexity of the solution.
[0064] Assume that multiple camera modules are connected in the connection structure as Figure 1 shown, that is, the second camera module is connected to the right side and / or the left side of the first camera module. When the master camera orientation strategy is that the leftmost camera module is the master camera, if the left side of the first camera module is not connected to the second camera module, the first camera module is determined as the master camera; if the left side of the first camera module is connected to the second camera module, the first camera module is determined as the slave camera. Referring to Figure 1 , camera module A can determine that there is no camera module connected to its left side and there is a camera module connected to its right side based on the left and right contacts, and determine that it is the leftmost camera module, and then determine that it is the master camera. Camera modules B and D can determine that there are camera modules connected to both their left and right sides based on the left and right contacts, and determine that they are the middle camera modules, and then determine that they are the slave cameras. Camera module C can determine that there is a camera module connected to its left side and no camera module connected to its right side based on the left and right contacts, and determine that it is the rightmost camera module, and then determine that it is the slave camera. When the master camera orientation strategy is that the rightmost camera module is the master camera, if the right side of the first camera module is not connected to the second camera module, the first camera module is determined as the master camera; if the right side of the first camera module is connected to the second camera module, the first camera module is determined as the slave camera. Referring to Figure 1 , camera module C can determine that it is the master camera, while camera modules B, D, and A can determine that they are the slave cameras.
[0065] Assume that multiple camera modules are as Figure 2It is connected to the shown connection structure, that is, the upper side and / or the lower side of the first camera module is connected to the second camera module. When the main camera orientation strategy is that the uppermost camera module is the main camera, if the upper side of the first camera module is not connected to the second camera module, it is determined that the first camera module is the main camera; if the upper side of the first camera module is connected to the second camera module, it is determined that the first camera module is the slave camera. When the main camera orientation strategy is that the lowermost camera module is the main camera, if the lower side of the first camera module is not connected to the second camera module, it is determined that the first camera module is the main camera; if the lower side of the first camera module is connected to the second camera module, it is determined that the first camera module is the slave camera.
[0066] Assume that multiple camera modules are connected as Figure 3 shown in the connection structure, that is, the upper side, the lower side, the left side and / or the right side of the first camera module is connected to the second camera module. When the main camera orientation strategy is that the upper right corner camera module is the main camera, if the upper side and the right side of the first camera module are not connected to the second camera module, it is determined that the first camera module is the main camera; if the upper side or the right side of the first camera module is connected to the second camera module, it is determined that the first camera module is the slave camera. When the main camera orientation strategy is that the upper left corner camera module is the main camera, if the upper side and the left side of the first camera module are not connected to the second camera module, it is determined that the first camera module is the main camera; if the upper side or the left side of the first camera module is connected to the second camera module, it is determined that the first camera module is the slave camera. When the main camera orientation strategy is that the lower right corner camera module is the main camera, if the lower side and the right side of the first camera module are not connected to the second camera module, it is determined that the first camera module is the main camera; if the lower side or the right side of the first camera module is connected to the second camera module, it is determined that the first camera module is the slave camera. When the main camera orientation strategy is that the lower left corner camera module is the main camera, if the lower side and the left side of the first camera module are not connected to the second camera module, it is determined that the first camera module is the main camera; if the lower side or the left side of the first camera module is connected to the second camera module, it is determined that the first camera module is the slave camera.
[0067] As can be seen from the above, when the main camera defined by the main camera orientation strategy is located at the edge position, the first camera module can judge whether it is the main camera or the slave camera based on the second camera module connected to the corresponding contact, without data communication with the second camera module, which greatly improves the judgment efficiency of the main camera or the slave camera. When the main camera defined by the main camera orientation strategy is located in the middle position, the first camera module needs to communicate with the second camera module to judge whether it is the slave camera or the main camera. Refer to Figure 1, when the main camera orientation strategy is that the second camera module from the left is the main camera, the camera module A notifies the camera module B that it is the leftmost camera module, then the camera module B can confirm that it is the main camera, the camera module C notifies the camera module D that it is the rightmost camera module, then the camera module D can confirm that it is the slave camera.
[0068] It should be noted that after the first camera module determines that it is a slave camera or a main camera, it can determine the orientation of the main camera based on its own position and the main camera orientation strategy. Refer to Figure 1 , when the main camera orientation strategy is that the leftmost camera module is the main camera, after the camera module B determines that it is in the middle, it can determine that the main camera is on its right, and the same applies to other camera modules.
[0069] In one embodiment, when the Ethernet power supply port of the first camera module is connected to a network cable, it is determined that the first camera module is the main camera. It can be understood that in this embodiment, the main camera supplies power to multiple connected camera modules through the Ethernet power supply port, and the main camera communicates with external devices based on the Ethernet power supply port, so that the external devices can obtain the captured video image generated by the main camera through the network, simplifying the connection structure between the camera module and the power supply, and improving the efficiency of the external devices to obtain the captured video image. After the first camera module determines whether it is a slave camera or a main camera based on whether the Ethernet power supply port is connected to a network cable, it notifies the corresponding connected second camera module whether it is the main camera or the slave camera through the contact, so that each slave camera can determine the orientation of the main camera.
[0070] S120. When the first camera module is a slave camera, splice the image transmitted by the second camera module with the image captured by itself, and transmit the spliced image according to the orientation of the main camera.
[0071] Exemplarily, when the first camera module is a slave camera, it can determine whether it is the slave camera that initially sends the image. When the first camera module is the slave camera that initially sends the image, transmit the image captured by itself to the second camera module according to the orientation of the main camera. When the first camera module is not the slave camera that initially sends the image, receive the image transmitted by a second camera module, splice the received image with the image captured by itself, and transmit the spliced image to another second camera module according to the orientation of the main camera.
[0072] In this embodiment, the slave camera located at the edge can be used as the slave camera that initially sends the image, so that each slave camera can transmit the image to be spliced to the main camera with just one image transmission, without multiple repeated transmissions, greatly improving the image transmission efficiency, and thus improving the efficiency of the captured video image spliced by the main camera. Refer to Figure 1, assume that the main camera is the camera module A on the far left. After the camera module C determines that it is the slave camera on the far right, it can determine itself as the slave camera for initially sending the picture, and transmit the picture it captured to the camera module D connected on the left based on the fact that the main camera is on its left. After receiving the picture transmitted by the camera module C, the camera module D stitches the picture transmitted by the camera module C with the picture it captured, and transmits the stitched picture to the camera module B connected on the left based on the fact that the main camera is on its left. After receiving the picture transmitted by the camera module D, the camera module B stitches the picture transmitted by the camera module B with the picture it captured, and transmits the stitched picture to the camera module A connected on the left based on the fact that the main camera is on its left. It should be noted that regardless of whether the main camera is at the edge or in the middle, the connection method of the camera modules is left - right, up - down, or up - down - left - right connection. After setting the slave camera at the edge as the slave camera for initially sending the picture, in any case, the slave camera only needs to complete one picture transmission. However, when the connection method of the camera modules is up - down - left - right connection, the slave camera at the edge corner is the slave camera for initially sending the picture. For example Figure 3 the slave cameras at the upper left corner, upper right corner, lower left corner, and lower right corner in
[0073] From the above, when the connection method of the camera modules is left - right connection or up - down connection, if the first camera module is connected to a second camera module, then in the case where the first camera module is a slave camera, it transmits the picture it captured to the second camera module. It can be understood that referring to Figure 1 and Figure 2 , the first camera module at the edge is only connected to one second camera module. Therefore, when the first camera module determines that it is a slave camera and is only connected to one second camera module, it determines itself as the slave camera for initially sending the picture, and transmits the picture it captured to the corresponding connected second camera module.
[0074] When the connection method of the camera modules is up - down - left - right connection, if the first camera module is connected to two second camera modules, then in the case where the first camera module is a slave camera, it transmits the picture it captured to the second camera module. Similarly, referring to Figure 3 , the first camera module at the edge corner is only connected to two second camera modules. Therefore, when the first camera module determines that it is a slave camera and is only connected to two second camera modules, it determines itself as the slave camera for initially sending the picture, and transmits the picture it captured to one of the second camera modules according to the orientation of the main camera.
[0075] Further, when the connection mode of the camera module is left-right connection, if the first camera module is connected to the second camera module on the right and left sides and determines itself as a slave camera, it determines that it is not the slave camera that initially sends the picture, receives the picture transmitted by the second camera module connected on the right or left side, splices the picture with the picture it captures, and then transmits the spliced picture to the second camera module connected on the left or right side.
[0076] In this embodiment, when the main camera is on the right side of the first camera module, it receives the picture transmitted by the second camera module connected on the left side, splices the received picture on the left side of the picture it captures, and transmits the spliced picture to the second camera module connected on the right side. Refer to Figure 1 , assuming that camera module C is the main camera, camera module B receives picture A (which is also the picture captured by camera module A) sent by camera module A through the left contact, splices picture A on the left side of the picture B it captures to obtain a spliced picture, and transmits the spliced picture to the camera module D connected on the right side through the right contact. Camera module D splices the picture received from the corresponding left contact on the left side of the picture D it captures to obtain a new spliced picture, and transmits the new spliced picture to the camera module C connected on the right side through the corresponding right contact. Finally, the spliced picture received by camera module C is as Figure 6 shown.
[0077] Similarly, when the main camera is on the left side of the first camera module, it receives the picture transmitted by the second camera module connected on the right side, splices the received picture on the right side of the picture it captures, and transmits the spliced picture to the second camera module connected on the left side. Refer to Figure 1 , assuming that camera module A is the main camera, camera module D receives picture C (which is also the picture captured by camera module C) sent by camera module C through the right contact, splices picture C on the right side of the picture D it captures to obtain a spliced picture, and transmits the spliced picture to the camera module B connected on the left side through the left contact. Camera module B splices the picture received from the corresponding right contact on the right side of the picture B it captures to obtain a new spliced picture, and transmits the new spliced picture to the camera module A connected on the left side through the corresponding left contact. Finally, the spliced picture received by camera module A is as Figure 7 shown.
[0078] When the connection mode of the camera module is up-and-down connection, if the upper and lower sides of the first camera module are connected to the second camera module and it is determined that itself is a slave camera, it determines that itself is not the slave camera that initially sends the picture, and receives the picture transmitted by the second camera module connected to the lower side or the upper side, splices the picture with the picture it captures, and then transmits the spliced picture to the second camera module connected to the upper side or the lower side. Correspondingly, when the main camera is located on the upper side of the first camera module, it receives the picture transmitted by the second camera module connected to the lower side, splices the received picture on the lower side of the picture it captures, and transmits the spliced picture to the second camera module connected to the upper side. When the main camera is located on the lower side of the first camera module, it receives the picture transmitted by the second camera module connected to the upper side, splices the received picture on the upper side of the picture it captures, and transmits the spliced picture to the second camera module connected to the lower side.
[0079] When the connection mode of the camera module is up-and-down, left-and-right connection, it is a combination of the above two implementation methods, which will not be elaborated here.
[0080] In this embodiment, by splicing the picture transmitted by the slave camera on one side on the corresponding side of the picture captured by itself, the splicing of the camera picture can be realized without pre-obtaining the position of the slave camera and performing picture splicing based on the position of the slave camera, which greatly reduces the complexity of the splicing of the camera picture and is beneficial to improving the generation efficiency of the camera picture. The spliced picture is transmitted according to the orientation of the main camera to ensure the accuracy of subsequent splicing and improve the efficiency of transmitting the picture to the main camera.
[0081] S130. When the first camera module is the main camera, splice the picture transmitted by the second camera module with the picture it captures to generate a camera picture.
[0082] Exemplarily, after the main camera receives the picture through a certain side contact, it splices the picture on the corresponding side of the picture it captures, and obtains the camera picture after one or more splicings. Exemplarily, when the connection mode of the camera module is left-and-right connection, the right side and / or the left side of the first camera module as the main camera is connected to the second camera module. The main camera can splice the picture transmitted by the second camera module connected to the left side on the left side of the picture it captures, and / or splice the picture transmitted by the second camera module connected to the right side on the right side of the picture it captures to obtain the camera picture. Refer to Figure 1 , when the camera module C is the main camera, the camera module C receives the Figure 6 picture shown through the left contact of the camera module D, and the camera module C splices the received picture on the left side of the picture C it captures to obtain the Figure 8 camera picture shown. When the camera module A is the main camera, the camera module A receives the Figure 7For the shown screen, camera module A splices the received screen to the right side of the screen A captured by itself, obtaining the captured screen as shown in Figure 8 For the case where camera module B is the main camera, camera module B receives screen A transmitted by camera module A through the left contact and the spliced screen transmitted by camera module D through the right contact. Camera module B splices screen A to the left side of the screen B captured by itself and splices the spliced screen to the right side of screen B, obtaining the captured screen as shown in Figure 8 For the shown captured screen.
[0083] When the connection mode of the camera modules is left - right connection, the second camera module is connected to the upper side and / or lower side of the first camera module serving as the main camera. The main camera can splice the screen transmitted by the second camera module connected to the lower side to the lower side of the screen captured by itself, and / or splice the screen transmitted by the second camera module connected to the upper side to the upper side of the screen captured by itself, obtaining the captured screen. When the connection mode of the camera modules is up - down - left - right connection, the screen splicing method executed by the main camera is a combination of the above two implementation methods, which will not be elaborated here.
[0084] In this embodiment, by splicing the screen transmitted by the slave camera on one side to the corresponding side of the screen captured by the main camera, the splicing of the captured screen can be realized without pre - obtaining the position of the slave camera and performing screen splicing based on the position of the slave camera, greatly reducing the complexity of the splicing of the captured screen and being beneficial to improving the generation efficiency of the captured screen.
[0085] In one embodiment, when only the power - over - Ethernet port of the main camera is connected to the network cable, the main camera is responsible for communicating with external devices. The main camera can coordinate and dispatch the slave cameras based on the control instructions sent by the external devices to realize the control of each camera module by the external device. In this embodiment, when the first camera module is the main camera, it receives the parameter adjustment instruction through network communication, adjusts its own shooting parameters according to the parameter adjustment instruction, and transmits the parameter adjustment instruction to each slave camera so that the slave cameras adjust their shooting parameters according to the parameter adjustment instruction. Among them, the parameter adjustment instruction is an instruction used by the external device to control each camera module to adjust the shooting parameters. The external device sends the parameter adjustment instruction to the main camera through network communication. The main camera adjusts shooting parameters such as the focusing parameter and the zoom parameter based on the parameter adjustment instruction, and the main camera transmits the parameter adjustment instruction to the corresponding connected slave camera through the contact. The slave camera adjusts its shooting parameters based on the parameter adjustment instruction and transmits the parameter adjustment instruction to another connected slave camera until all slave cameras receive the parameter adjustment instruction and adjust their shooting parameters based on the parameter adjustment instruction.
[0086] It can be understood that when the shooting distance of the shooting scene is large, the field of view angle of each camera module can be reduced and the number of combinations of camera modules can be increased. When the shooting distance of the shooting scene is small, the field of view angle of each camera module can be increased and the number of combinations of camera modules can be reduced, so as to ensure that the captured images generated by multiple camera modules cover the shooting scene while the clarity of the images is relatively high, adapting to shooting scenes with different shooting distances.
[0087] In summary, the method for generating a captured image provided by the embodiment of the present application detachably connects multiple camera modules and the lenses of the multiple camera modules face the same direction, so as to facilitate dynamically expanding the number of combinations of camera modules. The larger the number of combinations of camera modules, the larger the combined field of view angle of the camera modules. The combined structure of the camera modules can dynamically adjust the number of combinations and the combined field of view angle of the camera modules based on the shooting distance of the shooting scene to adapt to shooting scenes with different shooting distances, solving the problem of being able to adapt to shooting scenes with different shooting distances, which is beneficial to the popularization and use of camera modules. After multiple camera modules are spliced together, the slave camera and the master camera can be automatically identified. The slave camera splices the image transmitted by the corresponding connected slave camera with the image captured by itself and then transmits it to the master camera. The master camera splices the image transmitted by the corresponding connected slave camera with the image captured by itself to generate the final captured image. The splicing of the images captured by the camera modules can be completed without pre-obtaining the positions of each camera module. The image splicing method is relatively simple, and the splicing process is allocated to each camera module to balance the processing load of each camera module, which is beneficial to improving the generation efficiency of the captured image.
[0088] Based on the above embodiments, Figure 9 is a schematic structural diagram of a captured image generating device provided by an embodiment of the present application. Referring to Figure 9 , the captured image generating device provided in this embodiment specifically includes: a master-slave judgment module 21, a first splicing module 22, and a second splicing module 23.
[0089] Among them, the master-slave judgment module 21 is configured to determine whether the first camera module is a slave camera or a master camera;
[0090] The first splicing module 22 is configured to splice the image transmitted by the second camera module with the image captured by itself when the first camera module is a slave camera, and transmit the spliced image according to the orientation of the master camera;
[0091] The second splicing module 23 is configured to splice the image transmitted by the second camera module with the image captured by itself when the first camera module is a master camera to generate a captured image.
[0092] Based on the above embodiments, the master-slave determination module 21 includes: a first master-slave determination unit configured to determine whether the first camera module is a slave camera or a master camera according to the orientation of the second camera module and a preset master camera orientation strategy.
[0093] Based on the above embodiments, the second camera module is connected to the right side and / or the left side of the first camera module; correspondingly, the first master-slave determination unit includes: a first determination subunit configured to, when the master camera orientation strategy is that the leftmost camera module is the master camera, determine that the first camera module is the master camera if the left side of the first camera module is not connected to the second camera module, and determine that the first camera module is the slave camera if the left side of the first camera module is connected to the second camera module; a second determination subunit configured to, when the master camera orientation strategy is that the rightmost camera module is the master camera, determine that the first camera module is the master camera if the right side of the first camera module is not connected to the second camera module, and determine that the first camera module is the slave camera if the right side of the first camera module is connected to the second camera module.
[0094] Based on the above embodiments, the first camera module is connected to one second camera module; correspondingly, the captured image generating device includes: an image transmission module configured to transmit the image captured by itself to the second camera module when the first camera module is the slave camera.
[0095] Based on the above embodiments, the second camera module is connected to the right side and the left side of the first camera module; correspondingly, the first splicing module 22 includes: a first splicing unit configured to, when the master camera is on the right side of the first camera module, receive the image transmitted by the second camera module connected to the left side, splice the received image on the left side of the image captured by itself, and transmit the spliced image to the second camera module connected to the right side; a second splicing unit configured to, when the master camera is on the left side of the first camera module, receive the image transmitted by the second camera module connected to the right side, splice the received image on the right side of the image captured by itself, and transmit the spliced image to the second camera module connected to the left side.
[0096] Based on the above embodiments, the second camera module is connected to the right side and / or the left side of the first camera module; correspondingly, the second splicing module 23 includes: a third splicing unit configured to splice the image transmitted by the second camera module connected to the left side on the left side of the image captured by itself, and / or splice the image transmitted by the second camera module connected to the right side on the right side of the image captured by itself to obtain a captured image.
[0097] Based on the above embodiments, the camera image generation device includes a parameter adjustment module, and the parameter adjustment module includes: a parameter adjustment unit configured to receive a parameter adjustment instruction through network communication when the first camera module is the main camera, and adjust its own shooting parameters according to the parameter adjustment instruction; an instruction transmission unit configured to transmit the parameter adjustment instruction to each slave camera so that the slave camera adjusts its shooting parameters according to the parameter adjustment instruction.
[0098] As described above, the camera image generation device provided by the embodiments of the present application detachably connects multiple camera modules and the lenses of the multiple camera modules face the same direction, so as to facilitate dynamically expanding the combined number of camera modules. The larger the combined number of camera modules, the larger the combined field of view angle of the camera modules. The combined structure of the camera modules can dynamically adjust the combined number and combined field of view angle of the camera modules based on the shooting distance of the shooting scene to adapt to shooting scenes with different shooting distances, solving the problem of being able to adapt to shooting scenes with different shooting distances, which is beneficial to the popularization and use of camera modules. After multiple camera modules are spliced together, the slave camera and the main camera can be automatically identified. The slave camera splices the picture transmitted by the corresponding connected slave camera with its own shot picture and then transmits it to the main camera. The main camera splices the picture transmitted by the corresponding connected slave camera with its own shot picture to generate the final camera image, and the splicing of the pictures shot by the camera modules can be completed without pre-obtaining the positions of each camera module. The picture splicing method is relatively simple, and the splicing process is distributed to each camera module to balance the processing load of each camera module, which is beneficial to improving the generation efficiency of the camera image.
[0099] The camera image generation device provided by the embodiments of the present application can be used to execute the camera image generation method provided by the above embodiments and has corresponding functions and beneficial effects.
[0100] Figure 10 is a schematic structural diagram of a camera image generation device provided by the embodiments of the present application. Refer to Figure 10 The camera image generation device includes: a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The number of processors 31 in the camera image generation device can be one or more, and the number of memories 32 in the camera image generation device can be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the camera image generation device can be connected through a bus or other means.
[0101] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the camera image generation method of any embodiment of the present application (for example, the master-slave determination module 21, the first splicing module 22, and the second splicing module 23 in the camera image generation device). The memory 32 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the device, etc. In addition, the memory 32 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory can further include a memory remotely set relative to the processor, and these remote memories can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The communication device 33 is used for data transmission.
[0103] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 32, that is, implements the above-mentioned camera image generation method.
[0104] The input device 34 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function control of the device. The output device 35 can include a display device such as a display screen.
[0105] The above-provided camera image generation device can be used to execute the camera image generation method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0106] An embodiment of the present application further provides a storage medium containing computer-executable instructions. The computer-executable instructions are used to execute a camera image generation method when executed by a computer processor. The camera image generation method includes: determining whether the first camera module is a slave camera or a master camera; when the first camera module is a slave camera, splicing the image transmitted by the second camera module with the image captured by itself, and transmitting the spliced image according to the orientation of the master camera; when the first camera module is a master camera, splicing the image transmitted by the second camera module with the image captured by itself to generate a camera image.
[0107] Storage medium - Any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROMs, floppy disks or magnetic tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (such as hard disks or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system that is connected to the first computer system via a network (such as the Internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (such as in different computer systems connected via a network). The storage medium may store program instructions executable by one or more processors (such as embodied as a computer program).
[0108] Of course, for a storage medium containing computer-executable instructions provided by an embodiment of the present application, the computer-executable instructions are not limited to the above-described camera image generation method, and may also perform related operations in the camera image generation methods provided by any embodiment of the present application.
[0109] The camera image generation device, storage medium, and camera image generation equipment provided in the above embodiments can execute the camera image generation methods provided by any embodiment of the present application. For technical details not described in detail in the above embodiments, reference may be made to the camera image generation methods provided by any embodiment of the present application.
[0110] The above is only the preferred embodiment of the present application and the technical principles applied. The present application is not limited to the specific embodiments here. Various obvious changes, re-adjustments, and substitutions that can be made by those skilled in the art will not depart from the protection scope of the present application. Therefore, although the present application has been described in relatively detail through the above embodiments, the present application is not limited to the above embodiments. Without departing from the concept of the present application, more other equivalent embodiments may be included, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for generating a camera image, characterized in that, Applied to a first camera module, at least one side of the first camera module is detachably connected to a second camera module, and the lenses of the first camera module and the second camera module face the same direction. The method includes: Determine whether the first camera module is a slave camera or a master camera; When the first camera module is the slave camera, splice the image transmitted by the second camera module with the image captured by itself, and transmit the spliced image according to the orientation of the master camera; When the first camera module is the master camera, splice the image transmitted by the second camera module with the image captured by itself to generate a captured image.
2. The method for generating a camera image according to claim 1, wherein The determining whether the first camera module is a slave camera or a master camera includes: Determine whether the first camera module is a slave camera or a master camera according to the orientation of the second camera module and a preset master camera orientation strategy.
3. The method for generating a camera image according to claim 2, wherein The second camera module is connected to the right side and / or the left side of the first camera module; correspondingly, the determining whether the first camera module is a slave camera or a master camera according to the orientation of the second camera module and a preset master camera orientation strategy includes: When the master camera orientation strategy is that the leftmost camera module is the master camera, if the left side of the first camera module is not connected to the second camera module, determine that the first camera module is the master camera; if the left side of the first camera module is connected to the second camera module, determine that the first camera module is the slave camera; When the master camera orientation strategy is that the rightmost camera module is the master camera, if the right side of the first camera module is not connected to the second camera module, determine that the first camera module is the master camera; if the right side of the first camera module is connected to the second camera module, determine that the first camera module is the slave camera.
4. The method for generating a camera image according to claim 1, wherein The first camera module is connected to one second camera module; correspondingly, the method further includes: When the first camera module is the slave camera, transmit the image captured by itself to the second camera module.
5. The method for generating a camera image according to claim 1, wherein The second camera module is connected to the right side and the left side of the first camera module; correspondingly, the splicing the image transmitted by the second camera module with the image captured by itself and transmitting the spliced image according to the orientation of the master camera includes: When the master camera is on the right side of the first camera module, receive the image transmitted by the second camera module connected to the left side, splice the received image on the left side of the image captured by itself, and transmit the spliced image to the second camera module connected to the right side; When the master camera is on the left side of the first camera module, receive the image transmitted by the second camera module connected to the right side, splice the received image on the right side of the image captured by itself, and transmit the spliced image to the second camera module connected to the left side.
6. The method for generating a camera image according to claim 1, wherein The second camera module is connected to the right side and / or the left side of the first camera module; correspondingly, the splicing the image transmitted by the second camera module with the image captured by itself to generate a captured image includes: The method includes stitching the image transmitted by the second camera module connected on the left to the left side of the image captured by itself, and / or stitching the image transmitted by the second camera module connected on the right to the right side of the image captured by itself to obtain a captured image.
7. The method for generating a camera image according to claim 1, wherein The method further includes: When the first camera module is the main camera, receiving a parameter adjustment instruction through network communication and adjusting its own shooting parameters according to the parameter adjustment instruction; Transmitting the parameter adjustment instruction to each slave camera so that the slave camera adjusts its shooting parameters according to the parameter adjustment instruction.
8. An imaging screen generation device, characterized in that, Applied to a first camera module, at least one side of the first camera module is detachably connected to a second camera module, and the lenses of the first camera module and the second camera module face the same direction. The apparatus includes: A master-slave judgment module configured to determine whether the first camera module is a slave camera or a master camera; A first stitching module configured to, when the first camera module is the slave camera, stitch the image transmitted by the second camera module with the image captured by itself and transmit the stitched image according to the orientation of the master camera; A second stitching module configured to, when the first camera module is the master camera, stitch the image transmitted by the second camera module with the image captured by itself to generate a captured image.
9. An imaging screen generation device, characterized in that, Includes: One or more processors; A memory storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the captured image generation method according to any one of claims 1-7.
10. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the captured image generation method according to any one of claims 1-7 when executed by a computer processor.