Imaging device, and control method and program thereof
By generating and synchronizing metadata with video frames in imaging devices, the need for large-capacity memory delays is eliminated, ensuring synchronized metadata and video output without increasing production costs.
Patent Information
- Application Number
- JP2022012030
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-01-28
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-01-28
Smart Images

Figure 0007550805000019 
Figure 0007550805000020 
Figure 0007550805000001
Abstract
Description
[Technical field]
[0001] The present invention relates to an imaging device, an image processing device, and a control method and program thereof. [Background technology]
[0002] In recent years, a technology called Visual Effects (hereinafter referred to as VFX) has been attracting attention in the field of video production. VFX is a technology that realizes unrealistic screen effects (visual effects) by combining Computer Graphics (hereinafter referred to as CG) with live-action footage. Usually, the combination of CG and live-action footage is carried out in the post-production stage after filming. However, in recent years, there has been an increasing need to create the CG first and then film while checking the combined CG and live-action footage in real time. When combining CG and live-action footage, shooting parameters (hereinafter referred to as metadata) that are superimposed on each frame of the live-action footage are used.
[0003] However, due to system constraints of image signal processing, or due to lens communication characteristics that differ for each lens attached to an interchangeable lens type imaging device, metadata and video may not be synchronized. If metadata and video cannot be synchronized, it becomes impossible to correctly refer to the metadata when synthesizing CG in real time. Patent Document 1 discloses a configuration that ensures the association between video signals / audio signals and auxiliary information by providing memory means for each of the video signal / audio signal and the auxiliary information associated therewith. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2004-265459 A [Patent Document 2] JP 2017-219591 A (referred to in the embodiments) Summary of the Invention [Problem to be solved by the invention]
[0005] However, the technology described in Patent Document 1 requires delaying the video within the imaging device. Therefore, it is necessary to mount a dedicated large-capacity memory for storing the delayed video. Recently, many products have been released that are equipped with a RAW video recording function or that output the RAW video from an external output terminal such as SDI (Serial Digital Interface) or HDMI (High-Definition Multimedia Interface), a registered trademark. When this type of video signal is delayed, a larger capacity memory is required, making it difficult to suppress an increase in the production cost of the imaging device. In addition, if the video is delayed within the imaging device, it may not be possible to obtain the desired real-time characteristics for the composite image.
[0006] The present invention provides a technique for reducing delay in video output with metadata added. [Means for solving the problem]
[0007] An imaging device according to an aspect of the present invention has the following arrangement. An imaging means for capturing an image; a generating means for generating metadata relating to the image capturing by the image capturing means for each video frame of the video; an output means for outputting a video frame to which the metadata generated by the generation means is added; A setting means for setting a mode in which a video delay is permitted in response to a user operation; a delay means for delaying the video frames output by the output means when the mode is set, so that the generated metadata is added to the video frames to which the metadata corresponds; Equipped with The generating means includes in the generated metadata information indicating an amount of delay based on a deviation between a video frame to which the generated metadata corresponds and a video frame to which the generated metadata is added and output by the output means. Effect of the Invention
[0008] According to the present invention, delay in video output with metadata added thereto, which is output from an imaging device, is reduced. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a block diagram showing an example of the arrangement of an imaging apparatus according to a first embodiment. [Diagram 2] FIG. 2 is a diagram showing an example of a format of a video file according to the first embodiment. [Diagram 3] 1 is a diagram for explaining the flow of video signal processing in an imaging device and problems associated with the processing; [Figure 4] FIG. 4 is a diagram showing an example of metadata according to the first embodiment. [Diagram 5] 4 is a flowchart showing a process of video output by the imaging device of the first embodiment. [Figure 6] 1 is a block diagram showing an example of the configuration of an image processing apparatus according to a first embodiment. [Figure 7] 4 is a flowchart showing a process of the image processing device according to the first embodiment. [Figure 8] 1 is a diagram for explaining a flow of video signal processing by an imaging device and problems associated with the processing; [Figure 9] FIG. 11 is a diagram showing an example of metadata in the second embodiment. [Figure 10] 10 is a flowchart showing a process of video output by an imaging device according to a second embodiment. [Figure 11] Figure showing an example of a GUI for setting metadata delay. [Figure 12] FIG. 10 is a diagram for explaining the flow of video signal processing in an imaging apparatus according to a second embodiment. [Figure 13] 13 is a flowchart illustrating a lens data recording process according to a third embodiment. [Figure 14] 11 is a flowchart showing a period determination process / period update process of periodic communication. [Figure 15] FIG. 2 is a diagram for explaining communication by asynchronous serial communication. [Figure 16] FIG. 2 is a diagram for explaining communication by a clock synchronous serial method. [Figure 17A]FIG. 13 is a diagram showing an association between a video signal and lens data according to the third embodiment. [Figure 17B] FIG. 13 is a diagram showing an association between a video signal and lens data according to the third embodiment. [Figure 17C] FIG. 13 is a diagram showing an association between a video signal and lens data according to the third embodiment. [Figure 17D] FIG. 13 is a diagram showing an association between a video signal and lens data according to the third embodiment. [Figure 18A] FIG. 13 is a diagram showing an association between a video signal and lens data according to the fourth embodiment. [Figure 18B] FIG. 13 is a diagram showing an association between a video signal and lens data according to the fourth embodiment. [Figure 18C] FIG. 13 is a diagram showing an association between a video signal and lens data according to the fourth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] Hereinafter, the embodiments will be described in detail with reference to the attached drawings. Note that the following embodiments do not limit the invention according to the claims. Although the embodiments describe a number of features, not all of these features are essential to the invention, and the features may be combined in any manner. Furthermore, in the attached drawings, the same reference numbers are used for the same or similar configurations, and duplicated descriptions are omitted.
[0011] [First embodiment] In the following embodiment, a description will be given of control of recording and playback of moving images by the imaging device 100, in particular, a method of controlling metadata for use in real-time composition processing in VFX. Fig. 1 is a block diagram showing an example of the configuration of the imaging device 100. The imaging device 100 includes a camera body 121 and an interchangeable lens 120 that is detachable from the camera body 121.
[0012] The lens 101 is driven and controlled by the lens driving unit 102 to perform zooming, focusing, and the like. The subject image that passes through the lens 101 is adjusted to an appropriate amount of light by the aperture 104, and is formed on the imaging surface of the imaging element of the imaging unit 106. The aperture 104 is driven and controlled by the aperture driving unit 105. The imaging element photoelectrically converts the subject image coupled to the imaging surface. The imaging unit 106 reads out the photoelectrically converted subject image from the imaging element, adjusts the gain, and then converts it into a digital signal by A / D conversion, which converts an analog signal into a digital signal. The digital signal of the subject image thus obtained (for example, R, Gr, Gb, and B signals) is sent from the imaging unit 106 to the image signal processing circuit 107. The image signal processing circuit 107 performs various image signal processing such as development processing, low-pass filter processing for reducing noise, shading processing, white balance (WB) processing, and cyclic NR processing. The image signal processing circuit 107 further performs various corrections, compression of image data, and the like.
[0013] The system control unit 109 includes one or more processors, and controls the entire imaging device 100 and performs various calculations. The system control unit 109 also transmits various commands to the lens control unit 117 via the electrical contact unit 118. The system control unit 109 also requests the interchangeable lens 120 (lens control unit 117) to transmit lens information (optical information, etc.). The system control unit 109 also drives and controls the mechanical shutter 103. The first memory unit 108 temporarily stores image data. The recording medium control I / F unit 110 is an interface for recording or reading image data to the recording medium 112. The display unit 111 has, for example, a liquid crystal display, and displays image data. The recording medium 112 is a removable recording medium such as a semiconductor memory, and records image data. The external I / F unit 113 is an interface for communicating with an external computer, etc. The second memory unit 114 stores various programs executed by the processor of the system control unit 109, calculation results in the system control unit 109, etc.
[0014] An operation unit 115 accepts various operations by the user. Information regarding the operating conditions of the imaging device 100 set by the user via the operation unit 115 is sent to a system control unit 109. The system control unit 109 controls the entire imaging device 100 based on this information. A metadata processing unit 116 stores shooting parameters and the like linked to image data in a predetermined storage area (for example, a second memory unit 114).
[0015] The electrical contact unit 118 is composed of electrical contacts (camera terminal / lens terminal) corresponding to two communication lines provided on each of the interchangeable lens 120 and the camera body 121. The lens control unit 117 communicates with the camera body via the electrical contact unit 118. The lens control unit 117 also controls the driving of the lens driving unit 102 and the aperture driving unit 105 in response to operation information from the lens operation unit 119. The lens control unit 117 also communicates with the camera body 121 via the electrical contact unit 118, receives commands from the system control unit 109, and transmits lens information (optical information, etc.) based on the received commands. The lens operation unit 119 is provided with operation members such as a zoom operation ring, a focus operation ring, and an aperture drive ring. When each operation member is operated by the user, an operation signal is output to the lens control unit 117. The lens control unit 117 performs control according to the corresponding operation in accordance with the operation signal.
[0016] FIG. 2 is a diagram showing an example of a format of a video file in this embodiment. The ftyp box 200 stores information indicating compatibility of a file format. The moov box 201 stores management information and thumbnail images required for playback. The XMP box 202 stores XMP. Any metadata can be set in the XMP box 202. Note that XMP stands for Extensibile Metadata Platform. The uuid box 203 stores additional any information. Any information can be added by the uuid box 203. For example, in the case of RAW video, a preview image 220 may be stored in the uuid box 203. The mdat box 204 stores encoded video data, audio data, time code data, and metadata for each video frame. Note that, hereinafter, a video frame is also simply referred to as a frame.
[0017] Next, the configuration of the moov box 201 will be described. The uuid box 213 stores additional arbitrary information. In the illustrated example, the uuid box 213 stores a thumbnail image 218 to be displayed during playback and management information 219 to be used during playback. The track boxes 205-208 store management information related to video data, audio data, time code data, and metadata in units of frames. The track boxes 205-208 each have stsz boxes 209-212 and stco boxes 214-217. The stsz boxes 209-212 store the data sizes of the video data, audio data, time code data, and metadata in units of frames for each encoding unit. The stco boxes 214-217 store information indicating the storage positions in the mdat box 204 of the video data, audio data, time code data, and metadata in units of frames, respectively. Each piece of data, such as video data, audio data, time code data, and metadata, is stored in the mdat box 204 in units called chunks, each of which is made up of one or more coding units.
[0018] The mdat box 204 stores video data 230, 234, ..., audio data 231, 235, ..., time code data 232, 236, ..., and frame-based metadata 233, 237, .... Each piece of data in the mdat box 204 can be accessed in chunk units by the value written in the stco box. For example, the video data 230 (CV1) can be traced from the storage location information 250 of the stco box 214.
[0019] Next, the operation of the imaging device 100 of this embodiment having the above configuration will be described. First, a problem regarding synchronization of a video signal and metadata that occurs when RAW video is output from an external output terminal such as SDI or HDMI (registered trademark) will be described below. Next, a configuration of a first embodiment that solves such a problem will be described. In the first embodiment, it is possible to synchronize a video signal and metadata without using a configuration that uses a large-capacity memory to delay the video.
[0020] FIG. 3 is a diagram for explaining the flow of video signal processing and the problem that the present embodiment is trying to solve. In the video signal processing of video frame N, first, in step 301, exposure is performed by the imaging element (CMOS sensor) of the imaging unit 106. Next, in step 302, the exposed video is read out from the imaging element, and a RAW image is acquired by performing gain adjustment, A / D conversion, etc. The acquired RAW image is provided to a first path (steps 303 to 305) in which the image is output after development processing, and a second path (step 306) in which the image is output to the outside as it is. In the first path, in step 303, the RAW image is developed, and in step 304, the developed image is post-processed to generate a developed image. Then, in step 305, the developed image is output to the outside from the external I / F unit 113. In the second path, in step 306, the RAW image is output from the external I / F unit 113. Generally, in the first path, various image processing operations are performed from the acquired RAW image, such as detecting exposure and color information, detecting a subject, and detecting a motion vector amount for use in image stabilization. In contrast, when the RAW image is output to the outside in step 306, the RAW image is output before the results of the image processing operations are obtained. Therefore, when the RAW image is output, a problem occurs in that the image processing results cannot be superimposed on the video as frame-synchronized metadata. In the conventional technology, a large-capacity memory is provided to delay the external output of the RAW image in step 306 until, for example, the timing of the external output of the developed image in step 305, so that the image processing results can be superimposed as metadata.
[0021] In contrast, in the first embodiment, by adding new metadata, it is possible to synchronize video and metadata on the downstream image processing device side while eliminating the need to delay the external output of RAW images.
[0022] FIG. 4 is a diagram showing an example of metadata in units of frames according to the first embodiment. The metadata is stored in the mdat box 204, for example. The metadata 400 includes various metadata such as management information 401, exposure information 402, lens information 403, face detection information 404, and electronic image stabilization information 405. For example, the management information 401 includes basic information such as TimeCode. The exposure information 402 includes information such as shutter, gain, and aperture. The lens information 403 includes information such as focus lens position and zoom position. The face detection information 404 includes information such as face detection position and number. The electronic image stabilization information 405 includes information such as optical center position and electronic magnification. As described above with reference to FIG. 3, data obtained by image processing a RAW image is generated later than the timing of external output of the RAW image (step 306). Therefore, in this embodiment, data indicating a frame delay amount (frame delay amount 411a to 411d) is added to each metadata, so that the frames and metadata can be matched in a downstream external image processing device. The delay amount indicates a difference between a video frame to which the generated metadata corresponds and a video frame to which the generated metadata is added and output. For example, if face detection information 404 is added to a frame delayed by one frame, 1 is entered in the frame delay amount 411c. In the image processing device at the subsequent stage, the video and metadata are synchronized by performing development processing while taking into account the delay amount. Although the number of frames is used as the frame delay amount 411, this is not limiting. For example, the frame delay amount 411 may be expressed by time information such as TimeCode information. In this case, in the image processing device at the subsequent stage, the video and metadata can be synchronized by taking into account the difference between the TimeCode of the video and the TimeCode of each piece of metadata.
[0023] FIG. 5 is a flowchart showing the process of video output of the imaging device 100 according to the first embodiment. In the process shown in FIG. 5, the user can select either a first mode process in which video output is performed using metadata of the frame delay amount described in FIG. 4, or a second mode process in which video output is performed with a video delay according to a conventional method. The user can select, via the operation unit 115, whether the imaging device 100 performs the process in the first mode (processing in which the frame delay amount is set in the metadata) or the second mode (processing in which the video is delayed within the imaging device 100). Furthermore, in this embodiment, the user can select metadata used in image processing performed by a downstream image processing device.
[0024] In step S501, the system control unit 109 determines whether a mode (second mode) for delaying video in the imaging device 100 has been set by a user operation. If the second mode has been set, video delay is permitted in the imaging device 100, and video is output after being delayed as necessary. If the system control unit 109 determines that the mode for delaying video is set (YES in step S501), the process proceeds to step S502. In step S502, the system control unit 109 determines whether metadata that will cause a delay exists among metadata selected by the user as metadata to be used in subsequent image processing. The metadata that will cause a delay is metadata that is generated later than the timing of the external output of the RAW image (step 306). If the system control unit 109 determines that metadata that will cause a delay exists (YES in step S502), the process proceeds to step S503. In step S503, the system control unit 109 delays video using a frame memory, generates metadata corresponding to a video frame, and then outputs the video frame and the metadata corresponding thereto. In this way, video output in which the video and metadata are synchronized is performed. The second memory unit 114 can be used as the frame memory.
[0025] On the other hand, in step S502, if the system control unit 109 determines that there is no metadata that will cause a delay (NO in step S502), the process proceeds to step S504. In step S504, the system control unit 109 assigns invalid data to the metadata that will cause a delay, and outputs a RAW image without delaying as in step S503. This results in a video output without delay. Also, the metadata selected by the user, that is, the metadata used in the subsequent image processing, is output in synchronization with the video. Also, in step S501, if the system control unit 109 determines that the second mode for delaying the video is not set (NO in step S501), the process proceeds to step S505. In step S505, the system control unit 109 assigns data indicating the amount of delay to the metadata that will cause a delay, and immediately outputs the video (RAW image) without delaying it. For example, the system control unit 109 sets the number of frames (or TimeCode) as the amount of delay to the frame delay amount 411c of the face detection information 404. It should be noted that for metadata that does not cause delay, the frame delay amount is set to 0, but this is not limited to this. For example, metadata that does not cause delay may not include frame delay amount data.
[0026] As described above, when the first mode that does not delay video is selected, the system control unit 109 outputs video and metadata from the imaging device 100 without delaying the video by adding data indicating the frame delay amount of each metadata. Even when the second mode that delays video is selected, video delays caused by metadata unnecessary for processing in the later stage can be avoided by having the user select metadata to be used in the later stage (for example, an external image processing device).
[0027] FIG. 6 is a block diagram showing an example of the configuration of an image processing device 600, which is an example of an external device connected via the external I / F unit 113 of the imaging device 100. In FIG. 6, the input I / F unit 601 is an interface for receiving an image from an external device (for example, the external I / F 113 of the imaging device 100). The memory unit 602 temporarily records the image (image data) received by the input I / F unit 601. The image processing unit 603 performs image signal processing such as CG synthesis on the input image. The image processing unit 603 further performs various corrections, data compression, etc. on the image synthesized with CG. The output I / F unit 604 is an interface for outputting the image synthesized with CG to an external device (for example, the imaging device 100, a display device not shown). The control unit 605 includes, for example, one or more processors and a memory storing a program, and the one or more processors execute the program stored in the memory to control the entire image processing device 600 and perform various calculations. Note that the memory unit 602 may be used as the memory for storing the program. The metadata processing unit 606 analyzes metadata (such as shooting parameters) associated with the input video data. Note that the image processing unit 603 may be realized as part of the functions of the control unit 605.
[0028] FIG. 7 is a flowchart showing the operation of the image processing device 600 during image processing. In step S701, the control unit 605 analyzes the metadata n added to the input video frame N, and judges whether the frame delay amount DN of the metadata n used by the image processing unit 603 is greater than 0. If the control unit 605 judges that the frame delay amount DN is greater than 0 (YES in step S701), the process proceeds to step S702. In step S702, the control unit 605 saves the input video frame N in the memory unit 602. Then, the control unit 605 controls the image processing unit 603 to perform image processing on the video frame N saved in the memory unit 602 using the metadata added to the video frame that is the frame delay amount DN later. On the other hand, in step S701, if the control unit 605 judges that the frame delay amount DN of the metadata n is equal to or less than 0 (NO in step S701), the process proceeds to step S703. In step S703, the control unit 605 controls the image processing unit 603 to execute image processing of the input video frame N using metadata n input together with the frame.
[0029] In Fig. 7, one piece of metadata has been described for the sake of simplicity, but in reality, a determination is made for all metadata used in image processing, and video frames are continuously saved in the memory unit 602 until the metadata with the largest amount of delay is input. Then, the control unit 605 acquires each piece of metadata from a video frame specified by the amount of frame delay, and performs image processing. If the amount of delay for all metadata to be used is 0 or less, the determination in step S701 becomes NO, and step S703 is executed. The reason why the amount of delay is set to 0 or less is that it may be set to a negative value when there is metadata that can be generated earlier than the video.
[0030] As described above, according to the first embodiment, even if the video and metadata are out of sync, the image processing device 600 can synchronize the video frame and the metadata based on the frame delay amount given to each metadata. Therefore, the imaging device 100 can output the video without delaying the video until the metadata is acquired. Therefore, the delay in the imaging device 100 is reduced, and the memory amount for delaying the video is also reduced. In addition, when the image processing speed of the image processing device 600 is faster than the image processing speed of the imaging device 100, the effect of shortening the video delay of the entire system is obtained. In addition, in a system in which RAW development is performed in the image processing device 600, the next video frame is input during development, and post-processing is performed using the metadata given to it, the video delay can be further reduced and image processing can be performed. In addition, according to the above embodiment, even if the setting (second mode) is set to delay the video in the imaging device 100, the user can select the metadata to be used in the subsequent image processing to avoid the video delay caused by the metadata unnecessary for the subsequent image processing. For example, when RAW video output from the external I / F unit 113 is developed by the external image processing device 600, a situation in which video output from the imaging device 100 is delayed due to metadata that is not required for the development process can be prevented. This makes it possible to reduce video delays in the entire system.
[0031] [Second embodiment] In the first embodiment, a metadata delay amount is set in the metadata, so that an external device (image processing device 600) that receives RAW video from the imaging device 100 can obtain metadata synchronized with the RAW video. On the other hand, if the timing at which metadata generation is completed in the imaging device 100 changes, the synchronization state and delay state of the metadata output together with the RAW video from the imaging device 100 will change. If the delay state changes, a discrepancy occurs between the actual delay amount of the metadata and the delay amount set in the metadata, making it difficult for the image processing device 600 to correctly match video frames with the metadata. The second embodiment solves this problem.
[0032] The configurations of the imaging device 100 and image processing device 600 according to the second embodiment are similar to those of the first embodiment (FIGS. 1 and 6). Information on the driving conditions for the imaging device 100 set by the user via the operation unit 115 and delay information on metadata are sent to the system control unit 109. The system control unit 109 performs overall control of the imaging device 100 based on this information. The system control unit 109 of the second embodiment can store shooting parameters and the like linked to video frames in a specified area, and can also delay the timing of adding specified metadata to video frames.
[0033] FIG. 8 is a diagram for explaining the flow of video signal processing by an imaging device and the problems involved. In the video signal processing of video frame N (RAW image N), steps 801 to 806 are the same as steps 301 to 306 shown in FIG. 3. The same processing as steps 801 to 806 is performed for video frame N+1 and video frame N+2. In step 811, metadata of lens information 403 (hereinafter, lens metadata) is generated from information acquired from the lens. In step 812, the lens metadata N generated in step 811 and corresponding to video frame N is output in synchronization with the RAW image (frame N) output to the external device in step 806. In addition, in step 813, the lens metadata N generated in step S811 and corresponding to video frame N is output in synchronization with the output of the developed image of video frame N (step 805).
[0034] However, if it takes a long time to generate the lens metadata N+1 as shown in step 814, the lens metadata N+1 cannot be generated in time for the output timing of the RAW image of video frame N+1. Therefore, in step 815, lens metadata N is set for video frame N+1. Then, in step 816, the lens metadata N+1 corresponding to video frame N+1 generated in step 814 is set for the RAW image of video frame N+2. As a result, the video frames of the RAW image output to the outside will be a mixture of those that are synchronized with the lens metadata and those that are not.
[0035] FIG. 9 is a diagram showing whether delay adjustment of metadata is possible according to the second embodiment. As in the first embodiment (FIG. 4), metadata 900 includes management information 401, exposure information 402, lens information 403, face detection information 404, and electronic image stabilization information 405. Column 911 indicates whether the delay time when metadata is added to a video frame is adjustable. Metadata marked with a circle in column 911 is metadata for which the delay time can be adjusted, and metadata marked with a cross is metadata for which the delay time cannot be adjusted. For metadata for which the delay time can be adjusted, the delay time can be set by a user's menu operation (described later with reference to FIG. 11). For example, the delay time can be adjusted so that metadata of lens information 403 (lens metadata) is always added to video frames shifted by the same amount. This adjustment makes the amount of shift between the lens metadata and the video frames constant, and reduces or eliminates fluctuations in the timing of the lens metadata as described in FIG. 8. In FIG. 9, whether the delay time is adjustable is set for each piece of metadata such as the focus position, the zoom position, etc., but whether the delay time is adjustable may be set for each piece of exposure information 402, lens information 403, etc.
[0036] The metadata 900 of this embodiment allows adjustment of the delay time for metadata that may not be set in time for the RAW video to be output to the outside. For example, a delay time can be set for metadata such as the above-mentioned lens metadata (lens information 403) that may or may not be in time for the external output of the video frames of the RAW video. By setting the delay time, the metadata is stably output together with the video frames that are shifted by a predetermined number of frames. For example, the user can set the delay time so that the lens metadata is neither synchronized nor asynchronous with the video frames, thereby making it possible to keep the amount of deviation of the metadata from the video frames constant.
[0037] FIG. 10 is a flowchart showing a process of video output by the imaging device 100 of the second embodiment. In the imaging device 100 of the second embodiment, the user can select a delay time of metadata by a menu operation. In step S1001, the system control unit 109 judges whether or not a delay time of metadata is set by a menu operation of the user. When the system control unit 109 judges that a delay time of metadata is set (YES in step S1001), the process proceeds to step S1002. In step S1002, the system control unit 109 acquires a delay time set by a menu operation for the metadata. In step S1003, the system control unit 109 delays the addition of metadata to a video frame based on the delay time acquired in step S1002. More specifically, for example, the metadata is treated as incomplete (generation is not completed) until the set delay time has elapsed after the completion of the generation of the metadata. In this way, the system control unit 109 outputs the metadata together with the video frame after the timing delayed by the delay time from the actual completion of the generation. On the other hand, if in step S1001 system control unit 109 determines that no delay time is set in the metadata (NO in step S1001), the process proceeds to step S1004. In step S1004, system control unit 109 outputs the metadata together with the video frame as soon as generation is completed, without delaying the metadata as described above. The above processes in steps S1001 to S1003 are performed for all metadata.
[0038] As described above, according to the second embodiment, since a delay time can be set for a predetermined metadata, it is possible to make the amount of deviation of the metadata from the video frame constant. Therefore, in the configuration using the frame delay amount described in the first embodiment, it is possible to more reliably associate the video frame with the metadata.
[0039] FIG. 11 is a diagram showing a menu configuration (GUI: Graphical User Interface) when a user selects a delay time of a predetermined metadata by a menu operation. The user can set a delay time of the metadata from a list 1101 by selecting "System Setup" and "Metadata Delay" in that order on a menu screen 1100 displayed on a display unit 111. Note that, on the menu screen 1100 of FIG. 11, the same delay time specified from the list 1101 is set for the metadata set in FIG. 9 to be able to adjust the delay amount, but this is not limited thereto. It is also possible to set an individual delay time for metadata for which the delay time is adjustable. The delay time may also be set by time information such as a time code.
[0040] FIG. 12 is a diagram for explaining the flow of video processing in this embodiment. FIG. 12 shows the operation when a delay time is set for metadata by a menu operation by the user as shown in FIG. 11. In FIG. 8, synchronized lens metadata N is set for RAW image N, but lens metadata N is also set for RAW image N+1. In contrast, in FIG. 12, a metadata delay time is set by the user, so lens metadata N is set in step 1202 for RAW image N+1 output in step 1201. That is, lens metadata delayed by one frame for video is set. By delaying the lens metadata in this way, it becomes possible to uniformly set lens metadata delayed by one frame for the RAW image N+1 in step 1201 and the same video in the developed image output N+1 in step 1203. However, synchronized lens metadata may be set as shown in FIG. 8 for the external output of the developed image shown in FIG. 12 (lens metadata N may be added to the developed image N). In addition, the occurrence of cases where synchronization with the lens metadata is achieved and cases where it is not achieved depending on the frame of the RAW image is reduced or eliminated.
[0041] As described above, according to the second embodiment, the user can set a delay time for the metadata from the menu, thereby enabling the metadata to be synchronized with the video at a certain delay amount. This allows the metadata to be correctly associated with the video when editing the video or compositing with CG in the image processing device 600 described in the first embodiment, for example.
[0042] [Third embodiment] In the configuration shown in FIG. 1, the camera body 121 periodically communicates with the interchangeable lens 120 via the electrical contact unit 118 (hereinafter, "periodic communication") and acquires data from the interchangeable lens 120 on a frame-by-frame basis. However, when the frame rate of the video captured by the camera body 121 becomes high, the periodic communication between the interchangeable lens 120 and the camera body 121 may not be able to keep up, and data of the interchangeable lens 120 may not be acquired for all frames. In such a case, in order to prioritize acquisition of data of the interchangeable lens 120 at a fixed cycle, the communication cycle between the interchangeable lens 120 and the camera body 121 is made slower than the frame cycle. Patent Document 2 discloses a technology for determining the communication processing capability of the attached lens in an imaging device with interchangeable lenses, and determining the acquisition cycle of lens data based on the determination result and the operation cycle, thereby performing communication at an appropriate frequency according to the communication processing capability of the lens. The communication processing capability of the attached interchangeable lens 120 can be acquired by measuring the data communication time transmitted from the interchangeable lens 120.
[0043] Due to the sophistication of imaging control and the increase in frame rate, the time occupied by communication processing per unit time tends to increase. Therefore, it is required to take into consideration the internal processing time of the camera body 121, such as storing and distributing received lens data. Patent Document 2 describes measuring the data communication time sent from the lens. However, simply measuring such data communication time does not allow accurate understanding of the time required to obtain data, and there is a possibility that the communication frequency between the interchangeable lens 120 and the camera body 121 cannot be set appropriately. In the following third and fourth embodiments, a configuration is described that enables communication with the lens at an appropriate frequency by accurately understanding the time required to obtain data, taking into consideration the lens processing capacity and the camera processing capacity.
[0044] An example of a communication method between an interchangeable lens 120 and a camera body 121 that can be used in the third embodiment will be described with reference to FIG. 15(a) and FIG. 16(a).
[0045] <Communication method> The communication method between the interchangeable lens 120 and the camera body 121 includes start-stop synchronous and clock synchronous serial communication. Either method may be used in this embodiment. Note that a communication method other than the above-mentioned two communication methods may also be used, but two representative communication methods will be described in this embodiment.
[0046] FIG. 15(a) is a diagram for explaining asynchronous serial communication between the camera body 121 and the interchangeable lens 120. As shown in the figure, no clock signal line for synchronization is provided. In asynchronous serial communication, when transmitting one word of information, a synchronization signal called a start bit is added before the word to be transmitted and a synchronization signal called a stop bit is added after the word to be transmitted. These start bit and stop bit synchronize the communication between the transmitting device and the receiving device. DCL is a communication line that transmits commands or data from the camera body 121 to the interchangeable lens 120. DLC is a communication line that the camera body 121 receives data from the interchangeable lens 120.
[0047] Next, clock-synchronized serial communication will be described with reference to FIG. 16(a). FIG. 16(a) shows signals in clock-synchronized serial communication between the camera body 121 and the interchangeable lens 120. As shown in the figure, three communication lines are used in clock-synchronized serial communication. LCLK is a communication line that transmits a synchronous clock signal (hereinafter simply referred to as a clock signal) output from the camera body 121 to the interchangeable lens 120. DCL is a communication line that transmits commands or data from the camera body 121 to the interchangeable lens 120 in synchronization with the clock signal. DLC is a communication line that transmits data from the interchangeable lens 120 to the camera body 121 in synchronization with the clock signal. Electrical contacts (camera terminal / lens terminal) corresponding to the three communication lines LCLK, DCL, and DLC are provided in the electrical contact unit 118 of the camera body 121 and the interchangeable lens 120, respectively.
[0048] In clock-synchronized serial communication, since the clock signal is output from the camera body 121, it is the camera body 121 that determines the timing of communication. However, after receiving data from the camera body 121, the interchangeable lens 120 cannot perform the next communication while performing communication processing such as analyzing the received command and processing that occurs accordingly. Therefore, the interchangeable lens 120 needs to inform the camera body 121 that communication processing is in progress. Therefore, the interchangeable lens 120 forcibly pulls LCLK to Low during communication processing, making communication impossible during that time. That is, the interchangeable lens 120 switches the setting of the LCLK terminal from input to output and outputs Low to LCLK (BUSY signal in FIG. 16(a)), thereby prohibiting serial communication during a period when communication is impossible. Then, after the communication processing is completed, the interchangeable lens 120 returns LCLK to High and switches the setting of the LCLK terminal from output to input to permit serial communication.
[0049] <Lens data recording> Next, the recording of lens data in this embodiment will be described with reference to the flowchart in Fig. 13. The processing of the flowchart shown in Fig. 13 is realized by the processor of the system control unit 109 executing a computer program (software) stored in a memory (for example, the second memory unit 114). After the power is turned on and the camera body 121 starts up, the processing of Fig. 13 is executed mainly by the system control unit 109. That is, the processing of Fig. 13 starts immediately after the camera body 121 starts up with the interchangeable lens 120 connected, or after the interchangeable lens 120 is connected with the camera body 121 started up.
[0050] When power is supplied to the interchangeable lens 120 in step S1301, the system control unit 109 performs initial communication in step S1302. In the initial communication, for example, performance information and identification information are exchanged between the interchangeable lens 120 and the camera body 121. Examples of performance information include communication speed information compatible with the interchangeable lens and speed and drive resolution information at which actuators of the zoom lens and focus lens can be driven. Examples of identification information include ID information unique to the lens and attachment information of accessories such as an extender. In step S1303, the system control unit 109 determines the imaging cycle (video frame rate) of the imaging unit 106 based on information set via the operation unit 115.
[0051] In step S1304, the system control unit 109 determines the period of periodic communication performed with the interchangeable lens 120 (periodical communication period determination process). Periodic communication is performed between the camera body 121 and the interchangeable lens 120 via the electrical contact unit 118 at the determined period. Lens information and internal status information of the interchangeable lens 120 used by the functions of the camera body 121 such as AF, AE, and image processing (hereinafter also referred to as camera functions) are periodically acquired by the periodic communication. In this embodiment, examples of lens information used by the camera functions include focus lens position and drive speed, focal length, open F value, subject distance, drive amount and position of the anti-vibration lens, and information used in various image corrections. In addition, examples of internal status information of the interchangeable lens 120 include information on the operation status of the focus lens and zoom lens, the lens 101 including the anti-vibration lens, and the aperture 104 controlled by the lens control unit 117. Hereinafter, the lens information and internal status information are collectively referred to as lens data. The period of periodic communication is determined, for example, so that the lens data is updated in conjunction with the frame rate of the video. The information obtained from the interchangeable lens 120 during regular communication is stored in a predetermined area as shooting parameters linked to the image data by the system control unit 109. Details of the cycle determination process in step S1304 will be described later with reference to FIG.
[0052] A periodic communication cycle is determined in step S1304 based on information obtained in the initial communication in step S1302 described above. However, the periodic communication cycle determined in the cycle determination process in step S1304 is an initial value, and is updated as necessary in step S1310 (cycle update process) described below. In steps S1305 to S1309, the system control unit 109 obtains lens data through periodic communication with the interchangeable lens 120. The system control unit 109 stores the lens data obtained through the periodic communication in steps S1305 to S1309 in a predetermined area of memory together with the video signal from the image signal processing circuit 107 as shooting parameters linked to the video frame. For example, the second memory unit 114 can be used as such a memory.
[0053] The periodic communication in steps S1305 to S1309 will be described. When the periodic communication is started, in step S1305, the system control unit 109 transmits a command for requesting data from the camera body 121 to the interchangeable lens 120. In step S1306, the system control unit 109 associates the current frame number with the frame number assigned when the lens data is received from the interchangeable lens 120. In step S1307, the system control unit 109 receives the lens data transmitted by the interchangeable lens 120 in response to the command. Then, in step S1308, the system control unit 109 assigns the frame number associated in step S1306 to the lens data received in step S1307 as metadata, and temporarily records the data in a memory (for example, the second memory unit 114). In step S1309, the system control unit 109 associates the video signal with metadata including the lens data based on the frame number associated in step S1306, and records the associated video signal on the recording medium 112 or outputs the associated video signal to the outside.
[0054] In step S1310, the system control unit 109 performs a periodic communication period update process. In the periodic communication period determination process in step S1304, an initial value is set when starting periodic communication immediately after the camera body 121 is started or after the interchangeable lens 120 is connected. In contrast, the periodic update process in step S1310 is performed at the set period of periodic communication, and the period of periodic communication is updated as necessary. The reason for periodically performing the periodic communication period update process in this manner is as follows. If the lens processing load increases due to actuator control such as autofocus, aperture, and vibration prevention of the interchangeable lens 120, the response time may become longer. In addition, data loss may occur due to communication failure caused by aging deterioration of the joint between the camera body 121 and the interchangeable lens 120 and increased contact resistance due to individual differences, which may cause a problem in which metadata including lens data cannot be linked to video signals. By periodically performing the period determination process and dynamically changing the communication period, the metadata and video signals can be linked more reliably. The periodic communication period update process in step S1310 will be described in detail below with reference to FIG.
[0055] <Periodic communication cycle determination process / cycle update process> The cycle determination process executed in step S1304 of Fig. 13 will be described with reference to Fig. 14(a), and the cycle update process executed in step S1310 will be described with reference to Fig. 14(b).
[0056] The camera body 121 acquires the communication speed of the interchangeable lens 120 in the initial communication (step S1302), and communicates with the interchangeable lens 120 using the communication speed. However, the time actually required for communication (actual communication time) cannot be determined only by the communication speed of the interchangeable lens 120. For example, the time from when the interchangeable lens 120 receives a command to when it transmits data (response waiting time) differs depending on the processing capacity of the interchangeable lens 120. In addition, the time required to temporarily record the lens data received from the interchangeable lens 120 (recording processing time) differs depending on the processing capacity of the camera body 121. When determining the communication cycle of the periodic communication, it is necessary to take these response waiting times and recording processing times into consideration. Therefore, in the cycle determination process and cycle update process of the periodic communication in this embodiment, the camera body 121 actually performs a predetermined communication at a predetermined timing, and measures the communication capacity between the interchangeable lens 120 and the camera body 121.
[0057] In this embodiment, it is assumed that the main camera function is to obtain lens data required for VFX, and as an example, the communication of the following information is taken as measurement target A and measurement target B in the period determination process / periodic update process. Measurement target A (also called lens data A): internal status information indicating the internal state of the interchangeable lens 120 (angle of view, subject distance, etc.). Measurement target B (also called lens data B): Lens information used for image processing dependent on the shooting lens, such as distortion correction and peripheral illumination correction.
[0058] The cycle determination process (step S1304 in FIG. 13) of the periodic communication performed after the initial communication will be described with reference to the flowchart in FIG. 14(a). In steps S1401 and S1402, the system control unit 109 measures the processing time required for the measurement target A. In step S1401, after starting the time measurement, the system control unit 109 transmits a command to the interchangeable lens 120 requesting information on the measurement target A, and waits for a response from the interchangeable lens 120. When the system control unit 109 receives information on the measurement target A in response from the interchangeable lens 120, it ends the time measurement. The system control unit 109 records the time thus measured as the actual communication time CA of the measurement target A. Next, in step S1402, after starting the time measurement, the system control unit 109 temporarily records the information on the measurement target A received from the interchangeable lens 120 in a predetermined recording area, and ends the time measurement. The system control unit 109 records the time thus measured as the recording processing time DA of the measurement target A.
[0059] Next, in steps S1403 and S1404, the system control unit 109 measures the processing time required for measurement object B. In step S1403, after starting time measurement, the system control unit 109 transmits a command to the interchangeable lens 120 requesting information on measurement object B, and waits for a response from the interchangeable lens 120. The system control unit 109 receives the information on measurement object B in response from the interchangeable lens 120, and ends time measurement. The system control unit 109 records the time thus measured as the actual communication time CB of measurement object B. In step S1404, after starting time measurement, the system control unit 109 temporarily records the information on measurement object B received from the interchangeable lens 120 in a predetermined recording area, and ends time measurement. The system control unit 109 records the time thus measured as the recorded processing time DB of measurement object B, and proceeds to step S1405.
[0060] In step S1405, the system control unit 109 adds up the times CA, DA, CB, and DB measured in steps S1401 to S1404 to calculate the total communication time. The system control unit 109 compares the frame period (imaging time) of the frame rate determined in step S1303 with the total communication time, and if the total communication time is shorter than the frame period, sets the communication period of the periodic communication to the frame period. On the other hand, if the total communication time is longer than the frame period, sets the communication period of the periodic communication to the minimum time longer than the total communication time among times that are integer multiples of the frame period.
[0061] The method of setting the communication cycle for periodic communication is not limited to the above time, and it may be set to a cycle longer than the measured total communication time. Also, the flowchart in Fig. 14(a) is based on the premise that there are two pieces of information to be measured, but of course this is not limited to this. The same applies when there are three or more measurement targets, and the actual communication time and recording processing time are measured for all measurement targets, and the sum of these times is used as the above "total communication time."
[0062] Next, the periodic update process of the periodic communication in step S1310 in Fig. 13 will be described with reference to the flowchart in Fig. 14(b). The processes in steps S1401 to S1404 are the same as those described in Fig. 14(a). However, the communication process time and the recording process time measured in steps S1401 to S1404 are the times measured for the communication process and the recording process executed in steps S1307 to S1308.
[0063] In step S1411, system control unit 109 determines whether or not the measurements in steps S1401 to S1404 have been performed for a predetermined period of time. If system control unit 109 determines that measurements have been performed for the predetermined period of time (YES in step S1411), it proceeds to step S1412. On the other hand, if system control unit 109 determines that measurements have not yet been performed for the predetermined period of time (NO in step S1411), it skips step S1412 and ends the process. The reason for determining whether measurements have been performed for the predetermined period of time is to obtain stable measurement results.
[0064] If the confirmation in step S1411 is not performed, the system control unit 109 determines and updates the period of the periodic communication for each frame period in step S1412. Therefore, even if an abnormal measurement value is suddenly detected, a process is performed to match the period of the periodic communication to the abnormal measurement value. Therefore, the period of the periodic communication may not be stable, and the linking of the video signal and the lens data may become complicated. By confirming that the measurement result is stable after a predetermined period of time has passed, it is possible to stably determine the update period without reacting unnecessarily even if an abnormal measurement value is suddenly detected. Specifically, in step S1411, the system control unit 109 determines whether the communication processing time has been measured for a predetermined time or number of times. In step S1412, the system control unit 109 determines the communication period of the periodic communication when the communication is stable based on the measurement result for the predetermined time or number of times (for example, by statistically processing the total communication time measured multiple times). For example, the system control unit 109 determines the communication period of the periodic communication using the median value of multiple total communication times obtained from multiple measurement results. Alternatively, the system control unit 109 may determine the communication cycle for periodic communication by, for example, excluding a predetermined number of maximum and minimum measurement values from the results of multiple measurements and averaging the remaining measurement values. This process makes it possible to determine an appropriate update cycle even when the actual communication time is longer due to an increase in processing load caused by lens AF or aperture control, or when the actual communication time differs due to a difference in commands from the initial communication.
[0065] Next, the details of the measurement of actual communication times CA and CB (and CC) and recording processing times DA and DB (and DC) performed in steps S1401 to S1404 in Figures 14(a) and (b) will be explained using Figures 15(b) and 16(b).
[0066] 15(b) and 16(b) show communication processing for obtaining lens data of the continuation targets A, B, and C from the interchangeable lens 120. As shown in FIG. 15(b) and FIG. 16(b), the system control unit 109 obtains information on each of the measurement targets A to C from the interchangeable lens 120 using a communication command consisting of a plurality of byte strings. The communication processing time required for obtaining information on the measurement targets A, B, and C is the sum of the actual communication times CA, CB, and CC of the communication commands and the recording processing times DA, DB, and DC. For example, FIG. 15(b) shows measurement of communication time in the case of asynchronous communication. In FIG. 15(b), the communication command for obtaining information on the measurement target A is composed of 4 bytes of data, the communication command for obtaining information on the measurement target B is composed of 5 bytes of data, and the communication command for obtaining information on the measurement target C is composed of 2 bytes of data. When the interchangeable lens 120 receives a command (1 byte) requesting information on the measurement target A transmitted from the camera body 121, a response waiting time occurs in order to prepare the lens data to be transmitted. The communication processing time of measurement target A is measured by measuring the actual communication time CA from sending the command to request information from measurement target A to completing reception of the information (3 bytes) of measurement target A, and the recording processing time DA required until the received information is temporarily recorded. The same is true for other measurement targets B and C. Then, by adding up the communication processing times required to acquire measurement targets A, B, and C, the total communication time used to determine or update the communication cycle of periodic communication is obtained.
[0067] FIG. 16(b) shows the measurement of the communication processing time in the case of the clock synchronous system. However, FIG. 16(b) shows a state in which the communication command for acquiring the information of the measurement target A is composed of 3-byte data, and the communication command for acquiring the information of the measurement target B is composed of 4-byte data. The interchangeable lens 120 outputs a BUSY signal for each byte. The communication processing time of the measurement target A is obtained by measuring the actual communication time CA from the transmission of the first command for acquiring the information of the measurement target A to the release of the BUSY signal of the final command, and the recording processing time DA required for temporarily recording the received lens data. The same applies to the other measurement targets B and C. As described above, the communication processing time of each measurement target is composed of the actual communication time and the recording processing time, and means the time from the start of communication to acquire the information of each measurement target to the time when the next communication becomes possible. The system control unit 109 determines the communication cycle of the regular communication based on the total communication time obtained by summing up the communication processing times measured in the above procedure.
[0068] When the processing capability of the camera body 121 or the interchangeable lens 120 is low or when the frame rate is high, the total communication time to be measured (the sum of the actual communication time and the recording processing time) may be longer than the frame rate. When such an interchangeable lens 120 is connected, the time required for communication crosses over the next vertical synchronization signal, and the association with the video signal for each frame is lost. As a result, CG synthesis using lens data synchronized with the frame is not possible, and the CG synthesis is out of sync with the actual image. Therefore, when the total communication time is longer than the frame rate, the periodic communication cycle is slowed down to acquire lens data at a stable, constant cycle.
[0069] Next, the following cases 1 to 4 will be described with reference to FIGS. 17A to 17D. CASE1: When the total communication time is shorter than the frame period CASE2: Basic processing when the total communication time is longer than the frame period CASE 3: In CASE 2, improve the accuracy of lens data CASE 4: In CASE 3, the communication time is more than twice the frame period.
[0070] First, CASE1 will be described with reference to Fig. 17A. In the figure, [1] to [7] written in the vertical synchronization signal row indicate frame numbers, and data numbered [1] to [7] in the following rows indicate that they are data related to the frames with the same numbers. Data A and B written in the Body to Lens and Lens to Body rows indicate periods during which communication commands are sent and received to request and receive information (lens data A and B) on the aforementioned measurement targets A and B. The dotted line frame surrounding A and B indicates that the set of lens data A and B is information acquired from the interchangeable lens 120 for one frame.
[0071] Temporary recording: [1] to [6] written in the rows of the video signal are processes in which the system control unit 109 temporarily records the video signals of frames [1] to [6] in the first memory unit 108. Temporary recording: [1] to [7] written in the rows of the lens data are processes in which the system control unit 109 temporarily records the lens data corresponding to frames [1] to [7] in the second memory unit 114. The actual communication times CA and CB are times measured in steps S1401 and S1403. The recording processing time DA of the lens data A and the recording processing time DB of the lens data B are times measured in steps S1402 and S1404. In CASE 1, the total communication time (the total time of the actual communication time and the recording processing time of all lens data) is within one frame, and the lens data synchronized with the video signal can be recorded at the timing of the next frame. [1] to [6] written in the Recording / External Output: Video Signal and Recording / External Output: Lens Data rows are processes that record the video signal and lens data corresponding to frames [1] to [6]. The video signal and lens data of frames [1] to [6] are recorded and output externally at the same timing. In other words, in CASE1, the video signal and lens data of each frame are recorded / output externally in sync.
[0072] As described above, in CASE 1, communication to obtain lens data A and B (information on measurement targets A and B) is performed every frame period and associated with the video signal. Therefore, video recording and output in which the video signal and lens data are synchronized with each other with a minimum delay relative to the readout of the video signal is possible.
[0073] CASE2 shown in FIG. 17B is an example of a case where the total communication time (the total time of the actual communication time and the recording processing time of all lens data) does not fit within one frame. The total communication time does not fit within one frame of the video, and the process of temporarily recording the lens data of frame [1] ends while the video signal of frame [2] is being acquired. Therefore, the timing at which the lens data can be recorded / externally output is the timing shown in FIG. 17B. That is, by delaying the recording / external output of the video signal until the timing at which the lens data [1] corresponding to frame [1] can be recorded / externally output, the video signal and the lens data are recorded / output in synchronization. In addition, the completion of acquisition of the lens data of frame [1] straddles the vertical synchronization signal, and periodic communication in frame [2] cannot be performed. Therefore, the lens data acquired at the timing of the next periodic communication is the lens data corresponding to frame [3], and the system control unit 109 cannot acquire the lens data for frame [2] from the interchangeable lens 120. Therefore, the system control unit 109 uses a copy of the lens data [1] corresponding to the frame [1] as the lens data to be recorded / externally output in synchronization with the video signal of the frame [2]. That is, the system control unit 109 uses the latest lens data among the lens data acquired by periodic communication in a video frame prior to the video frame as the lens data corresponding to the video frame for which periodic communication is not performed. In this way, the loss of lens data to be used for CG synthesis is prevented. In addition, in CASE 2, the timing of recording the video signal and the lens data is delayed by one frame from the timing of CASE 1. In addition, in FIG. 17B, the latest lens data among the acquired lens data is copied and used as the lens data of the video frame for which lens data cannot be acquired, but this is not limited to this. For example, the lens data of the video frame for which lens data cannot be acquired may be predicted, for example, by extrapolation, using the latest predetermined number of lens data among the acquired lens data. For prediction by extrapolation, for example, a simple linear prediction or an approximation of a second or higher order based on the lens characteristics may be used.Even if the periodic communication cycle is two frames or more, the same processing as above can be applied.
[0074] CASE 3 shown in FIG. 17C is an example of a case where, like CASE 2, the total communication time (the total of the actual communication time and the recording processing time for all lens data) does not fit within one frame. In CASE 2, for frames where lens data cannot be acquired, the lens data acquired in the previous frame is copied. However, with this type of processing, even though the live-action image has been updated, the lens data is from the previous frame, so there is a possibility that a discrepancy will occur between the live-action image and the CG image that is composited with it. To solve this problem, in CASE 3, the lens data corresponding to the frames where lens data cannot be acquired is interpolated with the lens data of the previous and following frames.
[0075] As an example, assume that the focal length information in the lens data is 50 mm in frame [1] and 60 mm in frame [3]. In this case, by recording 55 mm, which is the intermediate value of the lens data obtained for the preceding and following frames [1] and [3], as the lens data for frame [2] for which lens data cannot be obtained, the deviation of the CG image to be composited with the live-action image is reduced. However, in order to obtain the lens data for frame [2] by interpolation, the lens data corresponding to frame [3] is required. Therefore, it is necessary to delay the recording / external output of the video signal for frame [2] until the lens data for frame [3] can be obtained. Therefore, in CASE 3, the timing of recording the video signal and lens data is delayed by two frames from the timing of CASE 1.
[0076] In the above example, simple linear interpolation is used, but the present invention is not limited to this. For example, interpolation using a quadratic approximation or higher order approximation based on the characteristics of the lens, or interpolation using lens data from before frame [1], etc. may be used. Needless to say, the lens data to be interpolated is not limited to focal length. For example, parameters (lens data) related to subject distance information calculated from the focus position and defocus amount, distortion amount, peripheral light falloff, etc. may also be interpolated.
[0077] In CASE 4 shown in Fig. 17D, lens data C is added to lens data A and B as information acquired from the interchangeable lens 120 by regular communication. CASE 4 is an example of a case where acquisition of lens data by regular communication does not fit within two frames, but fits within three frames. In CASE 3, one lens data was interpolated using lens data from previous and following frames, but in CASE 4, there are two or more lens data to be interpolated.
[0078] In CASE 4, the lens data of frames [2] and [3] is obtained by interpolating using the lens data of frames [1] and [4]. Therefore, it is necessary to delay the timing of recording the video signal of frame [2] until the lens data of frame [4] can be obtained. In addition, when interpolating the lens data of frames [2] and [3], it is necessary to assign different weights to the lens data of frames [1] and [4]. Specifically, when interpolating the lens data of frame [2], the weight of the lens data of frame [1] is made heavier than the weight of the lens data of frame [4], and when interpolating the lens data of frame [3], the weights can be reversed. In addition, since it is necessary to delay the recording / external output of the video signal of frame [2] until the lens data of frame [4] can be obtained as described above, the timing of recording the video signal and the lens data is delayed by four frames from the timing of CASE 1. Note that the method of interpolating the lens data in CASE 4 is not limited to linear interpolation as in CASE 3, and other methods may be used. In addition, weighting determined using the characteristics of the lens may be performed. In addition, the lens data may be interpolated by prediction using lens data of frames prior to frame [1].
[0079] The above-described processing makes it possible to acquire lens data at appropriate intervals even if the response time becomes longer due to an increase in the lens processing load associated with lens actuator control. Also, even if data loss occurs due to communication failures caused by aging deterioration of the joint between the camera body 121 and the interchangeable lens 120 or increased contact resistance due to individual differences, it becomes possible to stably acquire lens data.
[0080] [Fourth embodiment] In the third embodiment, as described with reference to FIG. 17C (CASE 3) and FIG. 17D (CASE 4), a method has been described in which lens data in a frame in which lens data cannot be acquired is interpolated using lens data in the preceding and following frames. In CASE 3, in order to link the video and the lens data, the video signal is recorded / output to the outside with a delay of two frames from the timing of CASE 1. Furthermore, in CASE 4, in the case where there are two consecutive frames in which lens data cannot be acquired, the video signal is recorded / output to the outside with a delay of four frames from the timing of CASE 1. If the number of frames in which lens data cannot be acquired increases further, it is clear that the timing at which the video signal is recorded / output to the outside will be further delayed.
[0081] In VFX shooting, it is expected that the cameraman will perform camera work while checking the composited image in real time. In such a case, if there is an image delay, it may be difficult to perform operations such as panning, tilting, and zooming to adjust the angle of view, and focus adjustment, which may hinder the work. In the fourth embodiment, such problems can be solved. Hereinafter, the image output process according to the fourth embodiment will be described with reference to Figs. 18A to 18C. In the fourth embodiment, the following CASE5 to CASE7 will be described. Note that the meanings of symbols in the figures in the following description are the same as those of CASE1 to CASE4 described in Figs. 17A to 17D of the third embodiment, and only the differences will be described. CASE5: Basic processing when communication time is longer than frame rate CASE 6: Supplementing external output data with a copy of the latest lens data CASE 7: When supplementing external output data with lens data predictions.
[0082] In CASE5 to CASE7, the processes of recording / external output of the video signal and recording / external output of the lens data in the third embodiment are divided into recording of the video signal, external output of the video signal, recording of the lens data, and external output of the lens data. This makes it possible to make the frame timing of the recorded video and the external output video different, and enables processing appropriate for recording and external output.
[0083] CASE 5 shown in FIG. 18A shows a processing example in which the total communication time (the total time of the actual communication time and the recording processing time of all lens data) does not fit within one frame. In CASE 5, the lens data of the frame in which the lens data cannot be acquired is interpolated with the lens data of the frames before and after which the lens data can be acquired. CASE 5 is an example in which the communication time fits within two frames. In CASE 5, the lens data [1] of frame [1] ends while the video signal of frame [2] is acquired, so the timing at which the lens data [1] can be recorded is the timing after the processing of frame [3] starts. It is assumed that the recorded video signal and lens data will be processed in post-production to synthesize CG with the actual video. Therefore, it is desirable that the frame and lens data of the same timing are linked and recorded. Therefore, similar to CASE 3 (FIG. 17C) of the third embodiment, the recording of the video signal is delayed until the lens data of frame [1] can be recorded, and the video signal and the lens data are recorded in synchronization.
[0084] On the other hand, video signals for external output are often used for camera work such as adjusting the angle of view and focusing, and video delays are a factor that impede work. Therefore, in this embodiment, video data to be output to an external output is output without delay. Specifically, during processing of frame [2] for which processing of frame [1] has been completed, a video signal of frame [1] is sent to the external I / F unit 113, thereby allowing a connected external monitor or the like to display the image with little delay. In addition, the latest lens data that can be obtained at the time of processing frame [2] (lens data of a frame prior to frame [1]) is used as the lens data to be synchronized with frame [1].
[0085] Through the above processing, the recorded video information and lens data are frame-synchronized, making them suitable for post-production. On the other hand, the output data is video with little delay, making it possible to perform real-time CG composition while minimizing the impact on operations such as adjusting the angle of view and focus.
[0086] CASE 6 shown in FIG. 18B is an example of a case where the acquisition of lens data does not fit within two frames. In CASE 6, the acquisition of lens data fits within three frames, and similarly to CASE 4 (FIG. 17D), the lens data recorded in relation to frame [2] and frame [3] is interpolated using the lens data of frame [1] and frame [4]. Therefore, the video signal and the lens data are recorded in synchronization by delaying the timing of recording the video signal of frame [2] until the lens data of frame [4] can be acquired. On the other hand, in the case of external output, for example, the external output of frame [3] is executed during the processing of frame [4], for which the processing of frame [3] has been completed. That is, the video signal of frame [3] is transmitted to the external I / F unit 113 during the processing of frame [4], and is displayed on a connected external monitor or the like. In addition, the lens data of frame [1], which is the latest lens data acquired at the time of processing frame [3], is used as the lens data to be synchronized with frame [3]. Next, after the processing of frame [4] is completed, and during the processing of frame [5], the video signal of frame [4] is transmitted to the external I / F unit 113. In addition, as the lens data to be synchronized with the video signal of frame [4], a copy of the lens data of frame [2], which is the latest lens data that has been obtained at the time when frame [4] is being processed, is used.
[0087] By the above process, even in a situation where the acquisition of lens data is delayed, the recorded video information and lens data are frame synchronized, and the lens data is interpolated, resulting in the recording of video with more accurate lens data. Meanwhile, the metadata output together with the video frame to be output to the outside is generated based on the lens data already received by the periodic communication at the time the metadata is generated (by reusing the lens data already received). Therefore, the video output to the outside can be video with little delay, and real-time CG composition is possible while minimizing the impact on operations such as adjusting the angle of view and adjusting the focus.
[0088] CASE 7 shown in FIG. 18C is an example of a case where the data does not fit within two frames, similar to CASE 6, and shows a method for further improving the accuracy of the lens data linked to the video output to the outside. In CASEs 5 and 6, a copy of the latest lens data available at that time is used as the lens data to be linked to the external output. When a copy of the lens data is used, the content of the video frame is updated, but the metadata is not updated. For this reason, if there is CG that is composited in real time in the external output, there is a possibility that a misalignment with the live-action video will occur, resulting in an unnatural image. CASE 7 shows an example of an operation that solves this problem.
[0089] In CASE7, the process of recording the video signal and the lens data in synchronization with each other is the same as in CASE6. Meanwhile, for example, during the processing of frame [4] in which the processing of frame [3] has been completed, the video signal of frame [3] is transmitted to the external I / F unit 113, and the video signal of frame [3] is output to the outside. The video signal output to the outside can be displayed on a connected external monitor or the like. The system control unit 109 predicts the lens data to be output to the outside in synchronization with frame [3] by extrapolating the latest lens data (lens data of frame [1]) that can be acquired during the processing of frame [3] and the lens data acquired before that. As a method of extrapolation, a simple linear prediction may be used, or an approximation of the second or higher order from the characteristics of the lens may be used. In addition, any number of frames may be used for the prediction. Furthermore, the lens data may be obtained by predicting the lens operation of the photographer using a Kalman filter or the like.
[0090] By the above process, even in a situation where the acquisition of lens data is delayed, the recorded image and the lens data are synchronized in frame, and the image is recorded with more accurate lens information due to the interpolation of the lens data. Furthermore, the metadata output together with the image frame to be output to the outside is generated by prediction and interpolation based on the lens data that has already been received by the periodic communication at the time of generating the metadata. As a result, the image output to the outside is an image with little delay, and the lens data is also predicted information, so the matching accuracy of real-time CG synthesis is improved while minimizing the impact on operations such as adjusting the angle of view and adjusting the focus.
[0091] Furthermore, according to the third and fourth embodiments, in an image capture device with interchangeable lenses, it becomes possible to communicate with the lens at an appropriate frequency according to the communication processing capability of the lens and the processing capability of the image capture device.
[0092] In the above-mentioned embodiments, the present invention is applied to a digital camera, but the present invention is not limited to this example. That is, the present invention may be applied to any device with an image sensor. That is, the present invention is applicable to any device capable of capturing images, such as a mobile phone terminal, a portable image viewer, a television equipped with a camera, a digital photo frame, a music player, a game console, an electronic book reader, etc. In addition, the invention related to the configuration for playing back moving images in the above-mentioned embodiments can also be applied to an image processing device that does not have a function for capturing images.
[0093] (Other Examples) The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.
[0094] The invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Accordingly, the following claims are appended to apprise the public of the scope of the invention. [Explanation of symbols]
[0095] 100: imaging device, 120: interchangeable lens, 121: camera body, 109: system control unit
Claims
1. An imaging means for capturing an image; a generating means for generating metadata relating to the image capturing by the image capturing means for each video frame of the video; an output means for outputting a video frame to which the metadata generated by the generation means is added; a setting means for setting a mode in which a video delay is permitted in response to a user operation; a delay means for delaying the video frames output by the output means when the mode is set so that the generated metadata is added to the video frames to which the metadata corresponds, An imaging device characterized in that the generation means includes, in the generated metadata, information indicating an amount of delay based on a difference between a video frame to which the generated metadata corresponds and a video frame to which the generated metadata is added and output by the output means.
2. 2. The imaging device according to claim 1, wherein the delay amount is a number of frames representing the delay, or a time representing the delay.
3. The metadata generating device further includes a selecting unit for selecting a set of metadata to be used in a subsequent process from among the metadata generated by the generating unit, The imaging device according to claim 1, characterized in that, when the mode is set, the delay means delays a video frame to be output until the metadata having the largest delay amount among the metadata included in the metadata set is imparted to the corresponding video frame.
4. 4. The imaging apparatus according to claim 3, wherein the generating means adds information indicating invalidity to metadata that is not included in the set of metadata selected by the selecting means and that will cause a delay.
5. 5. The imaging device according to claim 1, wherein the metadata includes information obtained from an attached interchangeable lens and information obtained by image processing of video frames of the video.
6. 5. The imaging device according to claim 1, wherein, when a delay time is set in the metadata generated by the generation means, the output means adds the metadata to the video frame after the delay time has elapsed from the completion of generation of the metadata.
7. A method for controlling an imaging device having an imaging means for capturing an image, comprising the steps of: a generating step of generating metadata relating to the image capture by the image capture means for each video frame of the video; an output step of outputting the video frame to which the metadata generated in the generation step is added; A setting process for setting a mode that allows video delay in response to a user operation; a delaying step of delaying the video frame output in the outputting step when the mode is set, so that the generated metadata is added to the video frame to which the metadata corresponds; A method for controlling an imaging device, characterized in that the generation step includes including, in the generated metadata, information indicating an amount of delay based on a difference between a video frame to which the generated metadata corresponds and a video frame to which the generated metadata is added and output in the output step.
8. A program for causing a computer to execute the control method according to claim 7.
Citation Information
Patent Citations
Magnetic recording and playback device
JP2004265459A
Imaging apparatus, lens device, method for controlling imaging apparatus, program, and storage medium
JP2017219591A
Imaging apparatus and control method thereof, electronic device and control method thereof, and program
JP2019062369A
Imaging apparatus, control method of the same, program, and imaging system
JP2019114914A
Control device and optical device
JP2020160300A
