Camera data processing method, display method and related equipment
By calculating and embedding the focal length value in the camera device, the problem that the identification information and the video image during the zooming process of the camera device is solved, and the synchronous scaling of the video image and the identification image is realized, and the lossless display effect is provided.
Patent Information
- Application Number
- CN202211644554.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-12-20
AI Technical Summary
During the zooming process of the camera device, the identification information cannot be matched with the video image to zoom in or out, resulting in a mismatch in the display.
The camera control terminal receives zoom commands, calculates the focal length value of each video image, and writes video image data according to the data transmission protocol, embeds the focal length value into the video image data, and the display control terminal adjusts the scaling ratio of the marking image according to the focal length value.
It realizes synchronous scaling of video images and identification images, providing a lossless camera data display experience.
Smart Images

Figure CN116055873B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a camera data processing method, a display method, and related equipment. Background Art
[0002] Video cameras can be connected to output devices such as projectors, televisions, and display screens to display captured materials, handouts, physical objects, or slides. Currently, cameras on video cameras are classified into two types: fixed-focus and zoom-out. During zooming, the video image transmitted by the camera can be magnified or reduced in size based on the camera's focal length. However, if a user adds identification information to the screen of an output device during zooming, the identification information will not be able to scale up or down with the video image in accordance with the focal length change, resulting in a mismatch between the identification information and the video image. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide a camera data processing method, a display method and related equipment.
[0004] Based on the above objectives, a first aspect of the present application provides a data processing method, which is applied to a camera control terminal connected to a camera device, and includes:
[0005] Receive zoom command;
[0006] Controlling the camera device to execute the zoom instruction;
[0007] Calculating, according to the target focal length value carried in the zoom instruction, a focal length value corresponding to each frame of video image captured by the camera device during the process of executing the zoom instruction;
[0008] Based on the focal length value, video image data of each frame of video image is written according to a data transmission protocol, and the video image data is sent.
[0009] Optionally, the calculating, according to the target focal length value carried in the zoom instruction, the focal length value corresponding to each frame of the video image captured by the camera device during the process of executing the zoom instruction, includes:
[0010] Obtaining the current focal length value of the camera device;
[0011] The focal length value corresponding to each frame of the video image is calculated according to the target focal length value, the current focal length value and the preset change frame number.
[0012] Optionally, the compiling video image data based on the focal length value and each frame of the video image according to a data transmission protocol, and sending the video image data includes:
[0013] compress and encode each frame of the video image according to the data transmission protocol to obtain first encoded data;
[0014] Encoding the focal length value according to the data transmission protocol to obtain second encoded data;
[0015] The second coded data is inserted into the first coded data to obtain the video image data.
[0016] Optionally, before writing video image data based on the focal length value and each frame of video image according to a data transmission protocol and sending the video image data, the method further includes: normalizing the focal length value.
[0017] A second aspect of the present application provides a method for displaying camera data, which is applied to a display control terminal connected to a display device. The method includes:
[0018] receiving video image data and acquiring an identification image input by a user through the display device;
[0019] Parsing the video image data to obtain a video image and a focal length value;
[0020] determining a zoom ratio value according to the focal length value;
[0021] The video image and the logo image are displayed on the display device according to the scaling value.
[0022] Optionally, determining a scaling ratio value according to the focal length value includes:
[0023] The scaling value S is calculated by the following formula:
[0024]
[0025] Where f represents the focal length, D max Indicates the maximum zoom factor of the camera in the booth.
[0026] Optionally, displaying the video image and the logo image on the display device according to the scaling ratio value includes:
[0027] Displaying the video image in a pre-constructed video playback layer, and displaying the logo image according to the zoom ratio value in a pre-constructed logo layer, wherein the logo layer is set above the video playback layer;
[0028] The video playback layer and the logo layer are displayed on the display device.
[0029] A third aspect of the present application provides a camera data processing device, which is applied to a camera control terminal connected to a camera device, and includes:
[0030] A receiving module configured to receive a zoom instruction;
[0031] A zoom module, configured to control the camera device to execute the zoom instruction;
[0032] a calculation module configured to calculate, based on the target focal length value carried in the zoom instruction, a focal length value corresponding to each frame of video image captured by the camera device during the process of executing the zoom instruction;
[0033] The writing module is configured to write video image data based on the focal length value and each frame of video image according to a data transmission protocol, and send the video image data.
[0034] A fourth aspect of the present application provides a camera data display device, which is applied to a display control terminal connected to a display device, and includes:
[0035] a receiving and obtaining module configured to receive video image data and obtain an identification image input by a user through the display device;
[0036] a parsing module configured to parse the video image data to obtain a video image and a focal length value;
[0037] a determining module configured to determine a zoom ratio value according to the focal length value;
[0038] The display module is configured to display the video image and the logo image on the display device according to the scaling value.
[0039] The fifth aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable by the processor, wherein the processor implements the method described in the first aspect or the second aspect when executing the computer program.
[0040] A sixth aspect of the present application provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method as described in the first aspect or the second aspect.
[0041] As can be seen from the above, the camera data processing method, display method and related equipment provided by the present application control the camera device to execute the zoom instruction by receiving the zoom instruction, calculate the focal length value corresponding to each frame of video image captured by the camera device during the execution of the zoom instruction according to the target focal length value carried in the zoom instruction, determine the focal length value corresponding to each frame of video image during the zoom process, quantify the scaling change of the video image during the zoom process by the focal length value, write video image data based on the focal length value and each frame of video image according to the data transmission protocol, send the video image data, embed the focal length value in the video image data and send it to the display control end, ensure that the display control end can scale and adjust the identification image input through the display device according to the focal length value during the display of the video image, realize the synchronous scaling of the video image and the identification image, and provide the user with a lossless camera data display experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in this application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are merely embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0043] Figure 1 Schematic diagram of the process of the camera data processing method according to an embodiment of the present application;
[0044] Figure 2 A schematic diagram of a flow chart of a method for compiling video image data according to an embodiment of the present application;
[0045] Figure 3 This is a flow chart of a method for displaying video data according to an embodiment of the present application;
[0046] Figure 4 This is a structural diagram of a camera data processing device according to an embodiment of the present application;
[0047] Figure 5 This is a structural diagram of a camera data display device according to an embodiment of the present application;
[0048] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the objectives, technical solutions and advantages of this application more clear, this application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0050] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the usual meanings understood by people with ordinary skills in the field to which this application belongs. The "first", "second" and similar words used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0051] As described in the background technology, the cameras configured in the camera device include two types: fixed focus and zoom. The camera that supports the zoom lens can provide the user with a lossless display effect during the zoom process. However, when the video image is transmitted to the display control end through the camera, the display control end cannot obtain the specific value of the magnification or reduction ratio of the video image during the zoom process. Normally, when the user uses the camera device to display video data, according to actual needs, identification information is often added to the screen of the display output device connected to the display control end, such as adding identification text or identification line segments, graphics, etc., to better explain and analyze the displayed data. However, since the display control end cannot obtain the magnification or reduction ratio of the video image during the zoom process, it is impossible to control the identification information and the video image information to be scaled at the same ratio, resulting in a mismatch between the identification information and the video image information, and thus failing to provide the user with a lossless display experience.
[0052] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0053] The present application provides a camera data processing method, which is applied to a camera control terminal, wherein the camera control terminal is connected to a camera device and uses the camera device to shoot materials or items to be displayed. The camera control terminal is a controller for controlling the camera device. For example, the camera control terminal can be a processor set inside the camera device. Figure 1 , the camera data processing method comprises the following steps:
[0054] Step 102: Receive a zoom command. A zoom command is used to control a camera to change its focal length. For example, a zoom command controls the camera to increase or decrease its zoom factor. As the zoom factor changes, the focal length also changes. Controlling the zoom factor also controls the focal length. The camera control terminal can receive a zoom command input by a user through a human-computer interaction interface connected to the camera control terminal, or receive a zoom command triggered by a user's direct zoom operation on the camera.
[0055] Step 104: Control the camera device to execute the zoom instruction. After receiving the zoom instruction, the camera control terminal controls the camera device to execute the zoom instruction, which may be to increase the zoom factor / focal length value or decrease the zoom factor / focal length value.
[0056] Step 106: Calculate the focal length value corresponding to each frame of video image captured by the camera device during the process of executing the zoom instruction according to the target focal length value carried in the zoom instruction.
[0057] Specifically, in the present embodiment, the zoom instruction is to increase or decrease the focal length value, and the focal length value is used as a standard for quantifying the zoom of the video image. The target focal length value is the focal length value after the end of this zoom process, that is, the range of zoom in or out that the user plans to perform for the current video image. For example, if the current focal length value is 20mm and the target focal length value is 70mm, it indicates that the user wants to zoom in on the current video image to increase the focal length value from 20mm to 70mm. During the zoom process, the video image captured by the camera device includes several video frames. Because the camera device transmits the video image in real time, each time a video frame is captured, the video frame is immediately transmitted to the display control end for display of the video image. Therefore, it is necessary to calculate the focal length value corresponding to each video frame in the several video frames based on the target focal length value, so as to subsequently adjust the display effect of the display end according to the focal length value corresponding to each video frame.
[0058] Step 108: Compile video image data based on the focal length value and each frame of video image according to a data transmission protocol, and send the video image data.
[0059] Specifically, after obtaining the focal length value and the video image, it is necessary to encode the focal length value and the video image according to the currently used data transmission protocol and then send them to the display control terminal. The process of encoding the video image is performed by a digital signal processing compression unit provided in the camera device, and the focal length value is encoded using a computer programming language according to the data transmission protocol. Exemplarily, the computer programming language in the present embodiment is json. The data transmission protocol in the present embodiment is the UVC (USB Video Class) protocol standard. UVC is a protocol standard defined for USB video capture devices. Each data transmission protocol supports a corresponding data transmission format. The data transmission protocol is determined, that is, the data transmission format is determined. The data to be transmitted is encoded using a computer programming language according to the data transmission format. In other embodiments, the data transmission protocol can also be other data transmission protocols other than UVC, which are not specifically limited here.
[0060] After the video image data is obtained, the camera control end sends the video image data to the display control end so that the display control end can promptly know the focal length value of each frame of the video image and adjust the scaling ratio of the identification image used to identify the video image according to the focal length value, thereby realizing synchronous scaling of the video image and the identification image.
[0061] Based on the above steps 102 to 108, this embodiment controls the camera device to execute the zoom instruction by receiving the zoom instruction, calculates the focal length value corresponding to each frame of video image captured by the camera device during the execution of the zoom instruction according to the target focal length value carried in the zoom instruction, determines the focal length value corresponding to each frame of video image during the zooming process, quantifies the scaling change of the video image during the zooming process through the focal length value, compiles video image data based on the focal length value and each frame of video image according to the data transmission protocol, sends the video image data, embeds the focal length value in the video image data and sends it to the display control end, ensures that the display control end can scale the identification image input through the display device according to the focal length value during the display of the video image, realizes synchronous scaling of the video image and the identification image, and provides the user with a lossless camera data display experience.
[0062] In some embodiments, the calculating, based on the target focal length value carried in the zoom instruction, the focal length value corresponding to each frame of video image captured by the camera device during the process of executing the zoom instruction, includes:
[0063] Obtaining the current focal length value of the camera device;
[0064] The focal length value corresponding to each frame of the video image is calculated according to the target focal length value, the current focal length value and the preset change frame number.
[0065] Specifically, after obtaining the target focal length value, it is also necessary to obtain the current focal length value of the camera device, and determine the focal length value of each frame within the preset number of changing frames during the entire zoom process based on the range of change of the focal length value. The preset number of changing frames is pre-set based on the inherent properties of the camera device. The setting of the preset number of changing frames can ensure that the camera device maintains smoothness during the zoom process, controls the focal length value to change uniformly within each frame of the preset number of changing frames, and provides the user with a smooth and uniform zoom experience. Different camera devices can set different preset number of changing frames, and this embodiment does not impose specific restrictions on the preset number of changing frames.
[0066] The focal length value F corresponding to each frame of video image n Calculated by the following formula:
[0067] F n =(a)F a +(1-a)F b
[0068] Among them, F a Indicates the current focal length value, F b represents the target focal length value, a=n / N, N represents the preset number of change frames, n represents the nth frame in the preset number of change frames N, and 1≤n≤N. The focal length value of each frame of the video image during the zoom process can be calculated using the above formula.
[0069] In some embodiments, reference Figure 2 The step of writing video image data based on the focal length value and each frame of video image according to a data transmission protocol comprises the following steps:
[0070] Step 202: compress and encode each frame of the video image according to the data transmission protocol to obtain first encoded data. The data transmission protocol in this embodiment is the UVC protocol standard, and the data compression format corresponding to the UVC protocol standard is the MJPG (Motion Joint Photographic Experts Group, dynamic JPEG) compression format. MJPG is an image compression format, and each frame of the image is encoded using JPEG. The MJPG compression format is commonly used in image acquisition devices such as digital cameras and webcams. In this embodiment, a DSP (Digital Signal Process) compression unit provided in the camera device is used to perform compression encoding, and the video image is compressed into the MJPG compression format by the DSP compression unit to obtain the first encoded data.
[0071] Step 204: Encode the focal length value according to the data transmission protocol to obtain second coded data. Encode the focal length value according to the data transmission format corresponding to the data transmission protocol. The data transmission format in this embodiment is the JFIF (JPEG File Interchange Format) standard. The JFIF file format standard is designed to facilitate the exchange of JPEG compressed images between a wide range of platforms and applications with minimal storage space cost. A JFIF file consists of a series of markers or marker segments, each of which has a fixed length of 2 bytes. The second coded data is written in the computer programming language json according to the JFIF standard. The second coded data is a custom data segment, as shown in Table 1 below.
[0072] Table 1 Second coding data
[0073]
[0074] In the first column of Table 1, App3 is the marker name, and 0xFF 0xE3 is the corresponding marker content, indicating that the App ID is 3. The App ID range is 0 to 15. When selecting an App ID, conflicts with existing App IDs should be avoided. For example, if the existing App IDs are 0 to 2, the range of App IDs that can be selected in the second encoded data is 3 to 15. The custom data length in the second column of Table 1 is the length of the custom data in the third column. For example, it can be 08, indicating that the custom data length is 8 bytes. The third column in Table 1 is custom data. In this embodiment, the custom data is defined as {"Zoom": 100}, indicating that the current video frame focal length is 100mm.
[0075] Step 206: Insert the second coded data into the first coded data to obtain the video image data. After obtaining the first coded data and the second coded data, the second coded data is inserted between multiple fields of the first coded data. The insertion position may not be fixed. For example, the second coded data may be inserted before the Define Quantization Table (DQT) field and the Start of Frame (SOF) field of the first coded data.
[0076] In some embodiments, before writing the video image data for each frame of the video image according to the data transmission protocol based on the focal length value, the method further includes: normalizing the focal length value.
[0077] Specifically, different camera models have different ways of representing zoom, which may be represented by changes in focal length or by zoom factor. Therefore, it is necessary to unify the representation method and perform numerical normalization. In this embodiment, the focal length value is used to represent the zoom process, and the focal length value is unified into the range of 0 to 100 mm. The focal length value is normalized using the following formula:
[0078]
[0079] Among them, F represents the normalized focal length value of each frame of video image, F n Indicates the focal length value corresponding to each frame of video image, F max Indicates the maximum physical focal length of the camera device, F min Indicates the minimum physical focal length of the camera device.
[0080] This embodiment also provides a method for displaying camera data, which is applied to a display control terminal. The display control terminal is connected to a camera device and a display device respectively. The display device can be a large data screen, a projection screen, or a TV screen. Figure 3 The camera data display method includes the following steps:
[0081] Step 302: Receive video image data and obtain an identification image input by the user through the display device.
[0082] Specifically, the camera control terminal sends the video image data to the display control terminal, which then receives the video image data. Simultaneously, the display control terminal obtains an identification image input by the user from the connected display device. The identification image can be identification text or an identification line segment, etc. The user adds an identification image to the display device screen. The identification image is used to identify the video image currently displayed on the display device screen, annotate or highlight key content, etc. Since the video image data transmitted by the camera control terminal is in frames, the video image data received by the display control terminal is also at the frame level. Each time the display control terminal receives a frame of video image, it displays the corresponding frame of video image on the display device.
[0083] Step 304: Parse the video image data to obtain a video image and focal length value. After receiving the video image data, the display control terminal needs to parse it. The rendering thread of the display control terminal's built-in display software decodes the video image data to obtain a video image, which is then rendered for display on a display device. The display software's identification module parses the video image data to obtain a focal length value. The identification module is used to operate the identification layer pre-built in the display software to correctly display identification information on the identification layer.
[0084] Step 306: Determine a scaling value based on the focal length. The scaling value S is calculated using the following formula:
[0085]
[0086] Where f represents the focal length, D mmax Indicates the maximum zoom ratio of the camera device. For example, if the focal length value f is 20 mm and the maximum zoom ratio is 4 times, the zoom ratio value S is 1.6.
[0087] Step 308: Display the video image and the logo image on the display device according to the scaling ratio. Display the video image and the logo image on the display device according to the scaling ratio calculated in step 306, so that the logo image can be scaled synchronously with the video image to improve the display effect.
[0088] In some embodiments, displaying the video image and the logo image on the display device according to the scaling value includes:
[0089] The video image is displayed in a pre-constructed video playback layer, and the logo image is displayed according to the zoom ratio value in a pre-constructed logo layer, wherein the logo layer is set above the video playback layer:
[0090] The video playback layer and the logo layer are displayed on the display device.
[0091] Typically, display software uses multiple pre-built playback layers to play the entire video file and display it on a display device. Exemplarily, the playback layer includes two layers: a video playback layer and an identification layer. The identification layer transparently overlays the video playback layer. The video image is played in the video playback layer, and the identification image is played in the identification layer. Locations in the identification layer where the identification image exists are opaque, while locations where the identification image does not exist are transparent. Overlaying the identification layer on top of the video playback layer serves to identify the video image.
[0092] In some embodiments, displaying the identification image according to the zoom ratio value in a pre-constructed identification layer includes: transforming the coordinate data of the identification image according to the zoom ratio value, and displaying the identification image after the coordinate data transformation in the identification layer.
[0093] Specifically, the position of the identification image in the identification layer is fixed, so the coordinate position of the identification image in the identification layer is also fixed. The coordinate data is transformed according to the scaling ratio value. For example, when the scaling ratio value is 1.6, the coordinate data (x, y) is magnified 1.6 times to display the identification image in the identification layer. Because the scaling ratio value is obtained by calculating the focal length value, and the focal length value is determined according to the zoom range during the zooming process, scaling the coordinate data of the identification image according to the scaling ratio value can ensure that the identification image and the video image are scaled synchronously, so that the display ratio of the identification image and the video image matches, thereby improving the display effect. It should be noted that the scaling operation in this embodiment uses the center point of the video image as the scaling center point, which can achieve uniform scaling of the identification image.
[0094] In some embodiments, before receiving the video image data and obtaining the identification image input by the user through the display device, the method further includes: sending a zoom instruction, where the zoom instruction is used to control the camera device to perform a zoom operation.
[0095] Specifically, when a user requests a zoom, they can enter a corresponding zoom command through the display control terminal's human-computer interaction interface. The display control terminal then sends the zoom command to the camera control terminal, which then controls the camera device to perform the zoom operation based on the zoom command. While the camera device is performing the zoom operation, it simultaneously sends frame-level video images to the camera control terminal, which then sends the frame-level video images to the display control terminal.
[0096] It should be noted that the embodiments of the present application can be further described in the following manner:
[0097] When a user requests a zoom, they enter a zoom command (UVC command) through the human-computer interaction interface of the display control terminal. The display control terminal sends the zoom command to the camera control terminal, which controls the camera to execute the zoom command based on the zoom command. The zoom command carries the target focal length value after the zoom is completed. The camera control terminal calculates the focal length value corresponding to each frame of video image captured by the camera during the zoom process based on the target focal length value and normalizes the focal length value to obtain the normalized focal length value. A DSP compression unit is used to compress and encode each frame of video image to obtain first encoded data. The focal length value is then encoded according to the data transmission format used by the data transmission protocol to obtain second encoded data. The second encoded data is inserted into the field of the first encoded data to obtain video image data. The camera control terminal sends the video image data to the display control terminal, which simultaneously obtains the user-entered identification image from the connected display device. The display control terminal parses the video image data to obtain the video image and focal length value. When the display control end plays the video image on the display device, it plays the video image in the video playback layer and displays the logo image in the logo layer according to the scaling ratio value calculated by the focal length value, thereby realizing the synchronous scaling of the video image and the logo image.
[0098] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario and performed by multiple devices working together. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the method.
[0099] It should be noted that the above description is limited to some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0100] The present application also provides a camera data processing device, which is applied to a camera control terminal, and the camera control terminal is connected to the camera equipment.
[0101] refer to Figure 4 , the camera data processing device includes:
[0102] The receiving module 402 is configured to receive a zoom instruction;
[0103] A zoom module 404 is configured to control the camera device to execute the zoom instruction;
[0104] A calculation module 406 is configured to calculate, based on the target focal length value carried in the zoom instruction, a focal length value corresponding to each frame of video image captured by the camera device during the process of executing the zoom instruction;
[0105] The writing module 408 is configured to write video image data based on the focal length value and each frame of the video image according to a data transmission protocol, and send the video image data.
[0106] In some embodiments, the calculation module 406 is further configured to obtain the current focal length value of the camera device; and calculate the focal length value corresponding to each frame of the video image according to the target focal length value, the current focal length value and the preset change frame number.
[0107] In some embodiments, the writing module 408 is further configured to compress and encode each frame of the video image according to the data transmission protocol to obtain first encoded data; encode the focal length value according to the data transmission protocol to obtain second encoded data; and insert the second encoded data into the first encoded data to obtain the video image data.
[0108] In some embodiments, a normalization module 410 is further included, and the normalization module 410 is configured to perform normalization processing on the focal length value.
[0109] The present application also provides a camera data processing device, which is applied to a display control terminal, and the display control terminal is connected to a display device.
[0110] refer to Figure 5 , the device comprises:
[0111] A receiving and obtaining module 502 is configured to receive video image data and obtain an identification image input by a user through the display device;
[0112] The parsing module 504 is configured to parse the video image data to obtain a video image and a focal length value;
[0113] a determination module 506 configured to determine a zoom ratio value according to the focal length value;
[0114] The display module 508 is configured to display the video image and the logo image on the display device according to the scaling value.
[0115] In some embodiments, the determining module 506 is further configured to calculate the scaling value S using the following formula:
[0116]
[0117] Where f represents the focal length, D max Indicates the maximum zoom factor of the camera in the booth.
[0118] In some embodiments, the display module 508 is further configured to
[0119] Displaying the video image in a pre-constructed video playback layer, and displaying the logo image according to the zoom ratio value in a pre-constructed logo layer, wherein the logo layer is set above the video playback layer;
[0120] The video playback layer and the logo layer are displayed on the display device.
[0121] For the convenience of description, the above devices are described as being divided into various modules according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0122] The apparatus of the above embodiment is used to implement the corresponding camera data processing method or camera data display method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.
[0123] The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the video data processing method or video data display method described in any one of the above embodiments is implemented.
[0124] Figure 6 10 is a schematic diagram showing a more specific hardware structure of an electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other within the device via the bus 1050.
[0125] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0126] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0127] The input / output interface 1030 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.
[0128] The communication interface 1040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).
[0129] The bus 1050 comprises a path for transmitting information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).
[0130] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.
[0131] The electronic device of the above embodiment is used to implement the corresponding camera data processing method or camera data display method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0132] The present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the camera data processing method or the camera data display method as described in any of the above embodiments.
[0133] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0134] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the booth data processing method or booth data display method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0135] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. Within the scope of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0136] In addition, for simplicity of description and discussion, and in order not to make the embodiment of the application difficult to understand, the known power supply / ground connection with integrated circuit (IC) chip and other components may or may not be shown in the accompanying drawings provided. In addition, the device can be shown in the form of a block diagram to avoid making the embodiment of the application difficult to understand, and this also takes into account the following fact, that is, the details of the embodiment of these block diagram devices are highly dependent on the platform to be implemented in the embodiment of the application (that is, these details should be fully within the scope of understanding of those skilled in the art). When specific details (for example, circuit) are set forth to describe exemplary embodiments of the application, it will be apparent to those skilled in the art that the embodiment of the application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0137] Although the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may utilize the embodiments discussed.
[0138] The embodiments of the present application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of this application.
Claims
1. A camera data processing method, characterized in that: Applied to a camera control terminal connected to a camera device, the method includes: Receive zoom command; Controlling the camera device to execute the zoom instruction; Calculating, according to the target focal length value carried in the zoom instruction, a focal length value corresponding to each frame of video image captured by the camera device during the process of executing the zoom instruction; Based on the focal length value, each frame of the video image writes video image data according to the data transmission protocol, and sends the video image data to the display control end. The identification image is input through the display device. The display control end scales and adjusts the identification image according to the focal length value, and controls the identification image and the video image to be synchronously scaled and displayed on the display device.
2. The method according to claim 1, characterized in that The calculating, according to the target focal length value carried in the zoom instruction, the focal length value corresponding to each frame of the video image captured by the camera device during the process of executing the zoom instruction, includes: Obtaining the current focal length value of the camera device; The focal length value corresponding to each frame of the video image is calculated according to the target focal length value, the current focal length value and the preset change frame number.
3. The method according to claim 1, characterized in that The step of writing video image data based on the focal length value and each frame of the video image according to a data transmission protocol includes: compress and encode each frame of the video image according to the data transmission protocol to obtain first encoded data; Encoding the focal length value according to the data transmission protocol to obtain second encoded data; The second coded data is inserted into the first coded data to obtain the video image data.
4. The method according to claim 1, wherein Before writing video image data for each frame of video image according to a data transmission protocol based on the focal length value, the method further includes: The focal length value is normalized.
5. A method for displaying camera data, characterized in that: Applied to a display control terminal connected to a display device, the method includes: Receiving video image data sent by the camera control terminal and acquiring an identification image input by the user through the display device; Parsing the video image data to obtain a video image and a focal length value; determining a scaling value of the identification image according to the focal length value; The video image and the logo image are displayed on the display device according to the scaling ratio value, so that the logo image is scaled synchronously with the video image.
6. The method according to claim 5, characterized in that Determining the scaling value according to the focal length value includes: The scaling value S is calculated by the following formula: Where f represents the focal length, Indicates the maximum zoom factor of the camera in the booth.
7. The method according to claim 5, characterized in that The displaying the video image and the logo image on the display device according to the scaling value includes: Displaying the video image in a pre-constructed video playback layer, and displaying the logo image according to the zoom ratio value in a pre-constructed logo layer, wherein the logo layer is set above the video playback layer; The video playback layer and the logo layer are displayed on the display device.
8. A camera data processing device, characterized in that: Applied to a camera control terminal connected to a camera device, the device comprises: A receiving module configured to receive a zoom instruction; A zoom module, configured to control the camera device to execute the zoom instruction; a calculation module configured to calculate, based on the target focal length value carried in the zoom instruction, a focal length value corresponding to each frame of video image captured by the camera device during the process of executing the zoom instruction; The writing module is configured to write video image data based on the focal length value and each frame of video image according to a data transmission protocol, and send the video image data to the display control end, input the identification image through the display device, and the display control end scales and adjusts the identification image according to the focal length value, and controls the identification image and the video image to be synchronously scaled and displayed on the display device.
9. A camera data display device, characterized in that: Applied to a display control terminal connected to a display device, the device comprises: A receiving and obtaining module configured to receive video image data sent by the camera control terminal and obtain an identification image input by the user through the display device; a parsing module configured to parse the video image data to obtain a video image and a focal length value; a determining module configured to determine a scaling value of the identification image according to the focal length value; The display module is configured to display the video image and the logo image on the display device according to the scaling ratio value, so that the logo image is scaled synchronously with the video image.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image blurring method and device, storage medium and electronic equipment
CN110324532A
Video shooting method and device and electronic equipment
CN112087579A
Video shooting processing method and electronic equipment
CN112788233A