WO2016004819A1 - Shooting method, shooting device and computer storage medium - Google Patents

Shooting method, shooting device and computer storage medium Download PDF

Info

Publication number
WO2016004819A1
WO2016004819A1 PCT/CN2015/082124 CN2015082124W WO2016004819A1 WO 2016004819 A1 WO2016004819 A1 WO 2016004819A1 CN 2015082124 W CN2015082124 W CN 2015082124W WO 2016004819 A1 WO2016004819 A1 WO 2016004819A1
Authority
WO
WIPO (PCT)
Prior art keywords
subject
photographing
background
moving
foreground
Prior art date
Application number
PCT/CN2015/082124
Other languages
French (fr)
Chinese (zh)
Inventor
赵蕴泽
海茜
Original Assignee
努比亚技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 努比亚技术有限公司 filed Critical 努比亚技术有限公司
Publication of WO2016004819A1 publication Critical patent/WO2016004819A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Definitions

  • the invention relates to the field of photographing, and in particular to a photographing method, a photographing device and a computer storage medium.
  • Shooting equipment (such as digital cameras or mobile phones with cameras) has entered thousands of households, able to record every wonderful moment and leave a good memory for people.
  • the existing shooting equipment determines the subject and the shooting.
  • the relative position of the background if you want to modify it, can only be implemented through software post-processing, and in some specific application scenarios, the location area of the subject is limited, which is not convenient to adjust. At this time, if the background scene needs to be more complete. If presented, it may cause the subject to be too small or not fully displayed.
  • Embodiments of the present invention are expected to solve the problem that the relative position of the photographing subject and the background cannot be adjusted at the time of real-time photographing.
  • a shooting method provided by an embodiment of the present invention includes:
  • a composite photograph of the adjusted subject and the background is generated.
  • the method before the real-time extracting the subject in the foreground, the method further includes:
  • the extracting the moving subject in the foreground includes:
  • a body contour of the photographing subject is identified and extracted according to the threshold interval.
  • the adjusting the position of the shooting body in the background includes:
  • the position or size of the photographing subject is adjusted according to actual needs, and the position of the photographing subject in the background is determined.
  • the method further includes:
  • the synthesized photo is saved in real time.
  • the embodiment of the invention further provides a photographing device, the photographing device comprising:
  • An extraction module configured to extract a moving subject moving in the foreground
  • An adjustment module configured to adjust a position of the shooting body extracted by the extraction module in the background
  • a synthesis module configured to generate a composite photograph of the adjusted subject and the background.
  • the photographing apparatus further includes:
  • Preview module configured to turn on the framing preview of the camera.
  • the extraction module includes:
  • Selecting a unit configured to select a threshold interval of motion speed
  • the identification unit is configured to identify and extract a body contour of the photographing subject according to the threshold interval selected by the selection unit.
  • the adjustment module is configured to adjust a position or a size of the photographing subject according to actual needs, and determine a position of the photographing subject in the background.
  • the photographing apparatus further includes:
  • a storage module configured to save the composite photo in real time.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the photographing method according to the embodiment of the invention.
  • the photographing method, the photographing apparatus and the computer storage medium provided by the embodiments of the present invention extract the photographing subject moving in the foreground; adjust the position of the photographing subject in the background; and generate a composite photograph of the adjusted photographing subject and the background.
  • the position area of the shooting subject is limited by the actual needs, the user adjusts the position of the shooting subject in real time to achieve the WYSIWYG effect, and satisfies the different usage scenarios of the user. Demand, enhance the user experience.
  • FIG. 1 is a schematic flow chart of an embodiment of a photographing method according to the present invention.
  • FIG. 2 is a schematic diagram of a refinement process of step S100 in FIG. 1;
  • FIG. 3 is a schematic flow chart of another embodiment of a photographing method according to the present invention.
  • FIG. 4 is a schematic structural diagram of an embodiment of a photographing apparatus according to the present invention.
  • FIG. 5 is a schematic structural view of the extraction module of Figure 4.
  • Figure 6 is a block diagram showing the main electrical configuration of a camera of one embodiment of the present invention.
  • Embodiments of the present invention provide a photographing method capable of adjusting a position of a photographing subject, which is applied to a photographing apparatus.
  • 1 is a schematic flow chart of an embodiment of a photographing method according to the present invention; referring to FIG. 1, in an embodiment, the photographing method includes the following steps:
  • Step S100 extracting a moving subject moving in the foreground.
  • the method of detecting a moving object such as the optical flow method separates the foreground and the background of the currently captured image, extracts the subject in which the foreground is moving, and recognizes the contour of the subject.
  • the optical flow method is only used as an example here, and of course, it is not limited thereto, and other methods such as a map may be used.
  • the subject that is, the subject, can be understood as an object to be photographed.
  • Step S200 Adjust a position of the shooting subject in the background.
  • the position or size of the photographing subject is adjusted as needed, and the photographed subject after the enlargement is enlarged or dragged, and placed at an ideal position in the current background.
  • Step S300 generating a composite photograph of the adjusted photographing subject and the background.
  • the subject and the background image after the adjustment position are combined to generate a composite photograph, the best effect is displayed on the display, and the composite photograph is saved.
  • the photographing method provided in this embodiment includes the following steps: Step S100: extracting a moving subject moving in the foreground; Step S200, adjusting a position of the shooting subject in the background; Step S300, generating the shooting subject and the background Composite photo.
  • the beneficial effect that can be achieved is that the user adjusts the position of the shooting subject in real time according to actual needs, and the position of the shooting subject is adjusted in real time to achieve the WYSIWYG effect and meet the needs of the user in different usage scenarios. user experience.
  • FIG. 2 is a schematic diagram of the refinement process of step S100 in FIG. 1; referring to FIG. 2, the step S100 specifically includes:
  • Step S110 Select a threshold interval of the motion speed.
  • the motion speed threshold interval is selected through the menu, and the threshold actually determines the speed in the range as the detection target. For example, if the threshold is v, the motion speed is determined to be within the [va, v+b] threshold interval, and the threshold interval is characterized. The point is the key feature point of the shooting subject.
  • selecting the moving speed threshold interval it is necessary to ensure that the moving speed of the shooting subject is within the set threshold interval, and at the same time, the ending position of the shooting subject and the initial position are not overlapped, that is, one is moved.
  • the width value of the subject in the moving direction so that the interference can be eliminated in the frame-by-frame detection process, and the accurate recognition is completed, and the motion speed threshold interval is selected correctly, and the main subject can be excluded when the background is small. Interference caused by body movement.
  • Step S120 Identify and extract a body contour of the photographing subject according to the threshold interval.
  • the specific step of identifying and extracting the body contour of the photographing subject includes: processing a preview frame sequence of a continuously moving photographing subject; and using the target detection method for the preview frame sequence, detecting may occur
  • the foreground target if a foreground target is found in a certain frame and its representative key feature points are found, the key feature points can be randomly generated, or the corner points can be used as the key feature points, and the corner points are the local curvatures on the body contour.
  • the maximal point has a decisive effect on grasping the contour features of the main body. Once the contour features of the target are found, the shape of the target is roughly grasped.
  • the corner feature is an important feature of the image, and the corner points have rotation invariance among various image features.
  • the advantage of not changing with the change of illumination conditions, in the target recognition and target tracking the amount of data involved in the calculation can be reduced, without losing the important gray information of the image, and matching with the corner feature can greatly improve the matching speed;
  • the key feature point is the best position in the current frame, so as to obtain the position coordinates of the foreground target in the current frame; thus iteratively, the foreground target can be tracked, and the acquired foreground and background are separated, thereby filtering some objects. , screen out the required subject, identify the subject of the movement in the foreground, and outline the subject.
  • FIG. 3 is a schematic flowchart of another embodiment of a method for photographing the present invention.
  • the method further includes:
  • Step S100A Turn on the framing preview of the camera.
  • the camera's view preview is turned on, the preview function is loaded, the current picture is tracked in real time, the current subject and background are distinguished, and the moving track and position of the moving subject are tracked in time.
  • step S100A the photographing method of steps S100 to S300 shown in FIG. 1 is performed.
  • the steps S100 to S300 may be as shown above, and details are not described herein again.
  • the method further includes:
  • Step S400 saving the synthesized photo in real time.
  • the generated composite photo of the subject and the background is saved in real time for subsequent appreciation in the photo preview.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the photographing method according to the embodiment of the invention.
  • FIG. 4 is a schematic structural diagram of an embodiment of the photographing device of the present invention. Referring to FIG. 4, the photographing device includes:
  • the extraction module 20 is configured to extract a moving subject moving in the foreground
  • the adjusting module 30 is configured to adjust a position of the shooting body extracted by the extraction module 20 in the background;
  • the synthesis module 40 is configured to generate a composite photo of the subject and the background.
  • the imaging device extraction module 20 separates the foreground and the background of the currently captured image by a method of moving object detection such as the optical flow method, extracts the subject in the foreground movement, and recognizes the contour of the subject.
  • a method of moving object detection such as the optical flow method
  • the subject that is, the subject, can be understood as an object to be photographed.
  • the adjustment module 30 recognizes the contour of the photographing subject, the position or size of the photographing subject is adjusted as needed, and the photographed subject after the extraction is enlarged or dragged to be placed at an ideal position in the current background.
  • the synthesizing module 40 synthesizes the photographing subject and the background image after the adjusted position, generates a composite photograph, displays the best effect through the display, and saves the synthesized photograph.
  • the photographing apparatus includes: an extracting module 20 configured to extract a moving subject moving in the foreground; and an adjusting module 30 configured to adjust a position of the photographing subject extracted by the extracting module 20 in the background; 40. configured to generate a composite photograph of the adjusted subject and the background.
  • the beneficial effect can be achieved: the user shoots according to actual needs When the position area of the main body is limited, the position of the shooting subject is adjusted in real time to achieve the WYSIWYG effect, satisfying the needs of the user in different usage scenarios, and improving the user experience.
  • the extraction module 20 includes:
  • the selecting unit 21 is configured to select a threshold interval of the moving speed
  • the recognition unit 22 is configured to recognize and extract the body contour of the photographing subject according to the threshold interval selected by the selection unit 21.
  • the selection unit 21 selects a motion speed threshold interval through a menu, and the threshold actually determines the speed within a large range as a detection target. For example, if the threshold is v, the motion speed is determined to be within the [va, v+b] threshold interval.
  • the feature point of the threshold interval is the key feature point of the shooting subject.
  • the area that is, the width value of one subject in the moving direction, so that the interference can be eliminated in the frame-by-frame detection process, the accurate recognition is completed, and the motion speed threshold interval is correctly selected, and the movement of the subject when the background is small can be excluded.
  • the identifying unit 22 is configured to identify and extract a body contour of the shooting body according to the threshold interval, specifically: processing a preview frame sequence of a continuously moving subject; and using a target detecting method for the preview frame sequence To detect possible foreground targets; if a foreground target appears in a frame, find its representative key feature points, the corner points are the local maximum points of curvature on the body contour, which have a decisive effect on mastering the contour features of the body.
  • the contour feature of the target is found, and the shape of the target is roughly grasped.
  • the corner feature is an important feature of the image. In various image features, the corner point has the invariance of rotation and does not change with the illumination condition, and the target recognition and In the target tracking, the amount of data involved in the calculation can be reduced without losing the important gray information of the image.
  • the matching with the corner feature can greatly improve the matching speed; for any two adjacent video frames after that, look for The key feature points appearing in the previous frame are in the best position in the current frame, thus obtaining King targets Position coordinates in the current frame; thus iteratively, the foreground target can be tracked, the acquired foreground and background are separated, thereby filtering some objects, filtering out the required subject, and identifying the moving subject in the foreground. Outline the outline of the subject.
  • the photographing apparatus further includes:
  • the preview module 10 is configured to turn on the framing preview of the camera.
  • the preview module 10 turns on the framing preview of the camera, loads the preview function, performs real-time tracking on the current picture, distinguishes the current shooting subject and the background, and timely tracks the moving trajectory and position of the moving subject.
  • the photographing apparatus further includes:
  • the storage module 50 is configured to save the composite photo in real time.
  • the storage module 50 saves the generated composite photo of the shooting subject and the background in real time for subsequent appreciation in the photo preview.
  • the camera device can be implemented by a digital camera, a device having a camera (such as a mobile phone, a tablet computer, a notebook computer, etc.), and an extraction module 20, an adjustment module 30,
  • the synthesis module 40 and the preview module 10, and the selection unit 21 and the identification unit 22 included in the extraction module 20, in practical applications, can pass through a central processing unit (CPU) in the camera.
  • CPU central processing unit
  • a signal processor DSP, Digital Signal Processor
  • FPGA Field-Programmable Gate Array
  • the memory module 50 in the camera device can be implemented by a memory in the camera device in practical applications.
  • FIG. 6 is a block diagram showing the main electrical configuration of a camera of one embodiment of the present invention.
  • the photographic lens 101 is composed of a plurality of optical lenses for forming a subject image, and is a single focus lens or a zoom lens.
  • the photographic lens 101 can be moved in the optical axis direction by the lens driving unit 111, and controls the focus position of the taking lens 101 based on the control signal from the lens driving control unit 112, and also controls the focus distance in the case of the zoom lens.
  • the lens drive control circuit 112 follows the micro
  • the control command of the computer 107 performs drive control of the lens driving unit 111.
  • An imaging element 102 is disposed in the vicinity of a position where the subject image is formed by the photographing lens 101 on the optical axis of the photographing lens 101.
  • the imaging element 102 functions as an imaging unit that captures a subject image and acquires captured image data.
  • Photodiodes constituting each pixel are two-dimensionally arranged in a matrix on the imaging element 102. Each photodiode generates a photoelectric conversion current corresponding to the amount of received light, and the photoelectric conversion current is charged by a capacitor connected to each photodiode.
  • the front surface of each pixel is provided with a Bayer array of RGB color filters.
  • the imaging element 102 is connected to an imaging circuit 103 that performs charge accumulation control and image signal readout control in the imaging element 102, and performs waveform shaping after reducing the reset noise of the read image signal (analog image signal). Further, gain improvement or the like is performed to obtain an appropriate signal level.
  • the imaging circuit 103 is connected to the A/D conversion unit 104, which performs analog-to-digital conversion on the analog image signal, and outputs a digital image signal (hereinafter referred to as image data) to the bus 199.
  • image data a digital image signal
  • the bus 199 is a transmission path for transmitting various data read or generated inside the camera.
  • the A/D conversion unit 104 is connected to the bus 199, and an image processor 105, a JPEG processor 106, a microcomputer 107, a SDRAM (Synchronous DRAM) 108, and a memory interface (hereinafter referred to as a memory I/F) are connected. 109. LCD (Liquid Crystal Display) driver 110.
  • the image processor 105 performs various kinds of images such as OB subtraction processing, white balance adjustment, color matrix calculation, gamma conversion, color difference signal processing, noise removal processing, simultaneous processing, edge processing, and the like on the image data based on the output of the imaging element 102. deal with.
  • the JPEG processor 106 compresses the image data read out from the SDRAM 108 in accordance with the JPEG compression method. Further, the JPEG processor 106 performs decompression of JPEG image data for image reproduction display. When the decompression is performed, the file recorded in the recording medium 115 is read out, and after the compression processing is performed in the JPEG processor 106, The decompressed image data is temporarily stored in the SDRAM 108 and displayed on the LCD 116. Further, in the present embodiment, the JPEG method is adopted as the image compression/decompression method. However, the compression/decompression method is not limited thereto, and other compression/decompression methods such as MPEG, TIFF, and H.264 may be used.
  • the microcomputer 107 functions as a control unit of the entire camera, and collectively controls various processing sequences of the camera.
  • the microcomputer 107 is connected to the operation unit 113 and the flash memory 114.
  • the operation unit 113 includes but is not limited to a physical button or a virtual button, and the entity or virtual button may be a power button, a camera button, an edit button, a dynamic image button, a reproduction button, a menu button, a cross button, an OK button, a delete button, and an enlarge button.
  • the operation members such as various input buttons and various input keys are detected, and the operation states of these operation members are detected.
  • the detection result is output to the microcomputer 107.
  • a touch panel is provided on the front surface of the LCD 116 as a display portion, and the touch position of the user is detected, and the touch position is output to the microcomputer 107.
  • the microcomputer 107 executes various processing sequences corresponding to the operation of the user based on the detection result of the operation member from the operation unit 113. (Similarly, this place can be changed to the computer 107 to execute various processing sequences corresponding to the user's operation based on the detection result of the touch panel on the front of the LCD 116.)
  • the flash memory 114 stores programs for executing various processing sequences of the microcomputer 107.
  • the microcomputer 107 performs overall control of the camera in accordance with the program. Further, the flash memory 114 stores various adjustment values of the camera, and the microcomputer 107 reads out the adjustment value, and performs control of the camera in accordance with the adjustment value.
  • the SDRAM 108 is an electrically rewritable volatile memory for temporarily storing image data or the like.
  • the SDRAM 108 temporarily stores image data output from the A/D conversion unit 104 and image data processed in the image processor 105, the JPEG processor 106, and the like.
  • the memory interface 109 is connected to the recording medium 115, and performs control for writing image data and a file header attached to the image data to the recording medium 115 and reading from the recording medium 115.
  • the recording medium 115 is, for example, a recording medium such as a memory card that can be detachably attached to the camera body. However, it is not limited thereto, and may be a hard disk or the like built in the camera body.
  • the LCD driver 110 is connected to the LCD 116, and stores image data processed by the image processor 105 in the SDRAM.
  • the image data stored in the SDRAM is read and displayed on the LCD 116, or the image data stored in the JPEG processor 106 is compressed.
  • the JPEG processor 106 reads the compressed image data of the SDRAM, decompresses it, and displays the decompressed image data on the LCD 116.
  • the LCD 116 is disposed on the back surface of the camera body or the like to perform image display.
  • the LCD 116 is provided with a touch panel that detects a user's touch operation.
  • the liquid crystal display panel (LCD 116) is disposed as the display portion.
  • the present invention is not limited thereto, and various display panels such as an organic EL may be employed.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit;
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing storage device includes the following steps: the foregoing storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or an optical disk.
  • optical disk A medium that can store program code.
  • the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions.
  • a computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a RAM, a magnetic disk, or an optical disk.
  • Embodiments of the present invention extract a photographing subject moving in the foreground; adjust a position of the photographing subject in the background; and generate a composite photograph of the adjusted photographing subject and the background.
  • the position area of the shooting subject is limited by the actual needs, the user adjusts the position of the shooting subject in real time to achieve the WYSIWYG effect, and satisfies the different usage scenarios of the user. Demand, enhance the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

Disclosed is a shooting method, which comprises the following steps: extracting a shot object moving in the foreground; adjusting the position of the shot object in the background; and generating a synthesized photo of the shot object and the background. Also disclosed are a shooting device and a computer storage medium.

Description

一种拍摄方法、拍摄装置和计算机存储介质Shooting method, photographing device and computer storage medium 技术领域Technical field
本发明涉及拍照领域,尤其涉及一种拍摄方法、拍摄装置和计算机存储介质。The invention relates to the field of photographing, and in particular to a photographing method, a photographing device and a computer storage medium.
背景技术Background technique
拍摄设备(如数码相机或具有摄像头的手机等)已进入千家万户,能够记录每一个精彩瞬间,给人们留下美好的回忆,然而,现有的拍摄设备在拍摄时即确定了拍摄主体和背景的相对位置,如果想要修改,只能通过软件后期处理才能实行,而且在某些特定的应用场景下,主体的位置区域受到一定的限制,不便于调整,这时候如果背景景物需要较完整呈现出来的话,可能会造成主体过小或不能完整显示的情况。Shooting equipment (such as digital cameras or mobile phones with cameras) has entered thousands of households, able to record every wonderful moment and leave a good memory for people. However, the existing shooting equipment determines the subject and the shooting. The relative position of the background, if you want to modify it, can only be implemented through software post-processing, and in some specific application scenarios, the location area of the subject is limited, which is not convenient to adjust. At this time, if the background scene needs to be more complete. If presented, it may cause the subject to be too small or not fully displayed.
发明内容Summary of the invention
本发明实施例期望解决实时拍摄时不能调整拍摄主体和背景的相对位置的问题。Embodiments of the present invention are expected to solve the problem that the relative position of the photographing subject and the background cannot be adjusted at the time of real-time photographing.
为实现上述目的,本发明实施例提供的一种拍摄方法,包括:In order to achieve the above object, a shooting method provided by an embodiment of the present invention includes:
提取前景中移动的拍摄主体;Extracting the moving subject in the foreground;
调整所述拍摄主体在背景中的位置;Adjusting the position of the subject in the background;
生成调整后的拍摄主体和所述背景的合成照片。A composite photograph of the adjusted subject and the background is generated.
作为一种实施方式,所述实时提取前景中的主体之前,还包括:As an implementation manner, before the real-time extracting the subject in the foreground, the method further includes:
开启摄像头的取景预览。Turn on the framing preview of the camera.
作为一种实施方式,所述提取前景中移动的拍摄主体,包括:As an implementation manner, the extracting the moving subject in the foreground includes:
选择运动速度的阈值区间; Select a threshold interval for the speed of movement;
根据所述阈值区间,识别和提取所述拍摄主体的主体轮廓。A body contour of the photographing subject is identified and extracted according to the threshold interval.
作为一种实施方式,所述调整所述拍摄主体在背景中的位置,包括:As an embodiment, the adjusting the position of the shooting body in the background includes:
根据实际需要调整所述拍摄主体的位置或大小,确定所述拍摄主体在所述背景中的位置。The position or size of the photographing subject is adjusted according to actual needs, and the position of the photographing subject in the background is determined.
作为一种实施方式,所述生成调整后的拍摄主体和所述背景的合成照片的步骤之后还包括::As an implementation manner, after the step of generating the adjusted photographing body and the composite photo of the background, the method further includes:
对所述合成照片实时保存。The synthesized photo is saved in real time.
本发明实施例还提供一种拍摄装置,所述拍摄装置包括:The embodiment of the invention further provides a photographing device, the photographing device comprising:
提取模块,配置为提取前景中移动的拍摄主体;An extraction module configured to extract a moving subject moving in the foreground;
调整模块,配置为调整所述提取模块提取出的拍摄主体在背景中的位置;An adjustment module configured to adjust a position of the shooting body extracted by the extraction module in the background;
合成模块,配置为生成调整后的拍摄主体和所述背景的合成照片。A synthesis module configured to generate a composite photograph of the adjusted subject and the background.
作为一种实施方式,所述拍摄装置还包括:As an embodiment, the photographing apparatus further includes:
预览模块,配置为开启摄像头的取景预览。Preview module, configured to turn on the framing preview of the camera.
作为一种实施方式,所述提取模块包括:As an implementation manner, the extraction module includes:
选择单元,配置为选择运动速度的阈值区间;Selecting a unit configured to select a threshold interval of motion speed;
识别单元,配置为根据所述选择单元选择的阈值区间,识别和提取所述拍摄主体的主体轮廓。The identification unit is configured to identify and extract a body contour of the photographing subject according to the threshold interval selected by the selection unit.
作为一种实施方式,所述调整模块,配置为根据实际需要调整所述拍摄主体的位置或大小,确定所述拍摄主体在所述背景中的位置。As an implementation manner, the adjustment module is configured to adjust a position or a size of the photographing subject according to actual needs, and determine a position of the photographing subject in the background.
作为一种实施方式,所述拍摄装置还包括:As an embodiment, the photographing apparatus further includes:
存储模块,配置为对所述合成照片实时保存。a storage module configured to save the composite photo in real time.
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令配置为执行本发明实施例所述的拍摄方法。 The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the photographing method according to the embodiment of the invention.
本发明实施例提供的拍摄方法、拍摄装置和计算机存储介质,通过提取前景中移动的拍摄主体;调整所述拍摄主体在背景中的位置;生成调整后的拍摄主体和所述背景的合成照片。如此,采用本发明实施例的技术方案,用户根据实际需要,当拍摄主体的位置区域受到一定的限制时,实时调整拍摄主***置,达到所见即所得的效果,满足用户不同的使用场景下的需求,提升用户体验。The photographing method, the photographing apparatus and the computer storage medium provided by the embodiments of the present invention extract the photographing subject moving in the foreground; adjust the position of the photographing subject in the background; and generate a composite photograph of the adjusted photographing subject and the background. In this way, according to the technical solution of the embodiment of the present invention, when the position area of the shooting subject is limited by the actual needs, the user adjusts the position of the shooting subject in real time to achieve the WYSIWYG effect, and satisfies the different usage scenarios of the user. Demand, enhance the user experience.
附图说明DRAWINGS
图1为本发明拍摄方法一实施例的流程示意图;1 is a schematic flow chart of an embodiment of a photographing method according to the present invention;
图2为图1中步骤S100的细化流程示意图;2 is a schematic diagram of a refinement process of step S100 in FIG. 1;
图3为本发明拍摄方法另一实施例的流程示意图;3 is a schematic flow chart of another embodiment of a photographing method according to the present invention;
图4为本发明拍摄装置一实施例的组成结构示意图;4 is a schematic structural diagram of an embodiment of a photographing apparatus according to the present invention;
图5为图4中提取模块的组成结构示意图;Figure 5 is a schematic structural view of the extraction module of Figure 4;
图6是表示本发明的一个实施例的相机的主要电气结构的框图;Figure 6 is a block diagram showing the main electrical configuration of a camera of one embodiment of the present invention;
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例提供一种可调节拍摄主***置的拍摄方法,应用于拍摄装置中。图1为本发明拍摄方法一实施例的流程示意图;参照图1,在一实施例中,所述拍摄方法包括以下步骤:Embodiments of the present invention provide a photographing method capable of adjusting a position of a photographing subject, which is applied to a photographing apparatus. 1 is a schematic flow chart of an embodiment of a photographing method according to the present invention; referring to FIG. 1, in an embodiment, the photographing method includes the following steps:
步骤S100、提取前景中移动的拍摄主体。Step S100, extracting a moving subject moving in the foreground.
这里,利用光流法等运动物体检测的方法,分离出当前拍摄图像的前景和背景,对前景移动中的拍摄主体进行提取,识别拍摄主体的轮廓。需 要注意的是,此处仅是以光流法来举例,当然并不局限于此,还可以使用其他方式,比如抠图等。其中,所述拍摄主体也即拍摄对象,可以理解为被拍摄的物体。Here, the method of detecting a moving object such as the optical flow method separates the foreground and the background of the currently captured image, extracts the subject in which the foreground is moving, and recognizes the contour of the subject. Need It should be noted that the optical flow method is only used as an example here, and of course, it is not limited thereto, and other methods such as a map may be used. The subject, that is, the subject, can be understood as an object to be photographed.
步骤S200、调整所述拍摄主体在背景中的位置。Step S200: Adjust a position of the shooting subject in the background.
这里,识别拍摄主体的轮廓后,根据需要调整拍摄主***置或大小,将提取之后的拍摄主体进行放大或拖拽,放置于当前背景中的理想位置。Here, after recognizing the outline of the photographing subject, the position or size of the photographing subject is adjusted as needed, and the photographed subject after the enlargement is enlarged or dragged, and placed at an ideal position in the current background.
步骤S300、生成调整后的拍摄主体和所述背景的合成照片。Step S300, generating a composite photograph of the adjusted photographing subject and the background.
这里,对调整位置后的拍摄主体和背景图像进行合成,生成合成照片,通过显示器显示最佳效果,并对合成相片进行保存。Here, the subject and the background image after the adjustment position are combined to generate a composite photograph, the best effect is displayed on the display, and the composite photograph is saved.
本实施例提供的一种拍摄方法,包括以下步骤:步骤S100、提取前景中移动的拍摄主体;步骤S200、调整所述拍摄主体在背景中的位置;步骤S300、生成所述拍摄主体和所述背景的合成照片。所能实现的有益效果为:用户根据实际需要,当拍摄主体的位置区域受到一定的限制时,实时调整拍摄主***置,达到所见即所得的效果,满足用户不同的使用场景下的需求,提升用户体验。The photographing method provided in this embodiment includes the following steps: Step S100: extracting a moving subject moving in the foreground; Step S200, adjusting a position of the shooting subject in the background; Step S300, generating the shooting subject and the background Composite photo. The beneficial effect that can be achieved is that the user adjusts the position of the shooting subject in real time according to actual needs, and the position of the shooting subject is adjusted in real time to achieve the WYSIWYG effect and meet the needs of the user in different usage scenarios. user experience.
进一步地,图2为图1中步骤S100的细化流程示意图;参见图2,所述步骤S100具体包括:Further, FIG. 2 is a schematic diagram of the refinement process of step S100 in FIG. 1; referring to FIG. 2, the step S100 specifically includes:
步骤S110、选择运动速度的阈值区间。Step S110: Select a threshold interval of the motion speed.
这里,通过菜单选择运动速度阈值区间,这个阈值实际决定多大范围内的速度作为检测目标,比如阈值为v,则认定运动速度在[v-a,v+b]阈值区间之内,这个阈值区间的特征点是拍摄主体的关键特征点,在选择运动速度阈值区间时,需要保证拍摄主体移动的速度在设定的阈值区间内,同时,应保证拍摄主体结束位置和初始位置无重合区域,即移动一个拍摄主体在移动方向上的宽度值,这样方可在逐帧检测过程中排除干扰,完成准确识别,运动速度阈值区间选择正确,可以排除背景较小移动时对拍摄主 体移动时造成的干扰。Here, the motion speed threshold interval is selected through the menu, and the threshold actually determines the speed in the range as the detection target. For example, if the threshold is v, the motion speed is determined to be within the [va, v+b] threshold interval, and the threshold interval is characterized. The point is the key feature point of the shooting subject. When selecting the moving speed threshold interval, it is necessary to ensure that the moving speed of the shooting subject is within the set threshold interval, and at the same time, the ending position of the shooting subject and the initial position are not overlapped, that is, one is moved. The width value of the subject in the moving direction, so that the interference can be eliminated in the frame-by-frame detection process, and the accurate recognition is completed, and the motion speed threshold interval is selected correctly, and the main subject can be excluded when the background is small. Interference caused by body movement.
步骤S120、根据所述阈值区间,识别和提取所述拍摄主体的主体轮廓。Step S120: Identify and extract a body contour of the photographing subject according to the threshold interval.
这里,根据所述阈值区间,识别和提取所述拍摄主体的主体轮廓的具体步骤包括:对一个连续运动的拍摄主体的预览帧序列进行处理;针对预览帧序列,利用目标检测方法,检测可能出现的前景目标;如果某一帧出现了前景目标,找到其具有代表性的关键特征点,关键特征点可以随机产生,也可以利用角点来做关键特征点,角点是主体轮廓上曲率的局部极大点,对掌握主体轮廓特征具有决定作用,一旦找到了目标的轮廓特征也就大致掌握了目标的形状,角点特征是影像的重要特征,在各种影像特征中角点具有旋转不变性和不随光照条件改变而改变的优点,在目标识别和目标跟踪中,可以减少参与计算的数据量,同时又不损失图像的重要灰度信息,利用角点特征进行匹配可以大大提高匹配的速度;对之后的任意两个相邻视频帧而言,寻找上一帧中出现的关键特征点在当前帧中的最佳位置,从而得到前景目标在当前帧中的位置坐标;如此迭代进行,便可实现前景目标的跟踪,将获取的前景和背景进行分离,从而过滤一些物体,筛选出所需的拍摄主体,识别前景中运动的拍摄主体,勾勒出主体轮廓。Here, according to the threshold interval, the specific step of identifying and extracting the body contour of the photographing subject includes: processing a preview frame sequence of a continuously moving photographing subject; and using the target detection method for the preview frame sequence, detecting may occur The foreground target; if a foreground target is found in a certain frame and its representative key feature points are found, the key feature points can be randomly generated, or the corner points can be used as the key feature points, and the corner points are the local curvatures on the body contour. The maximal point has a decisive effect on grasping the contour features of the main body. Once the contour features of the target are found, the shape of the target is roughly grasped. The corner feature is an important feature of the image, and the corner points have rotation invariance among various image features. And the advantage of not changing with the change of illumination conditions, in the target recognition and target tracking, the amount of data involved in the calculation can be reduced, without losing the important gray information of the image, and matching with the corner feature can greatly improve the matching speed; For any two adjacent video frames that follow, look for the previous frame. The key feature point is the best position in the current frame, so as to obtain the position coordinates of the foreground target in the current frame; thus iteratively, the foreground target can be tracked, and the acquired foreground and background are separated, thereby filtering some objects. , screen out the required subject, identify the subject of the movement in the foreground, and outline the subject.
进一步参见图3,图3为本发明拍摄方法另一实施例的流程示意图,在所述实施例中,还包括:Referring to FIG. 3, FIG. 3 is a schematic flowchart of another embodiment of a method for photographing the present invention. In the embodiment, the method further includes:
步骤S100A、开启摄像头的取景预览。Step S100A: Turn on the framing preview of the camera.
这里,开启摄像头的取景预览,加载预览功能,对当前的画面进行实时跟踪,区分当前的拍摄主体和背景,对移动的拍摄主体的运动轨迹和位置进行适时跟踪。Here, the camera's view preview is turned on, the preview function is loaded, the current picture is tracked in real time, the current subject and background are distinguished, and the moving track and position of the moving subject are tracked in time.
步骤S100A之后,执行图1所示的步骤S100至步骤S300的拍摄方法。所述步骤S100至步骤S300可如上所示,这里不再赘述。After step S100A, the photographing method of steps S100 to S300 shown in FIG. 1 is performed. The steps S100 to S300 may be as shown above, and details are not described herein again.
进一步参见图3,在所述实施例中,步骤S300之后还包括: With further reference to FIG. 3, in the embodiment, after step S300, the method further includes:
步骤S400、对所述合成照片实时保存。Step S400, saving the synthesized photo in real time.
这里,对生成的拍摄主体和背景的合成照片进行实时保存,以便后续在相片预览中进行欣赏。Here, the generated composite photo of the subject and the background is saved in real time for subsequent appreciation in the photo preview.
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令配置为执行本发明实施例所述的拍摄方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the photographing method according to the embodiment of the invention.
本实施例进一步提供一种可调节拍摄主***置的拍摄装置,图4为本发明拍摄装置一实施例的组成结构示意图,参见图4,所述拍摄装置包括:The embodiment further provides a photographing device that can adjust the position of the photographing body. FIG. 4 is a schematic structural diagram of an embodiment of the photographing device of the present invention. Referring to FIG. 4, the photographing device includes:
提取模块20,配置为提取前景中移动的拍摄主体;The extraction module 20 is configured to extract a moving subject moving in the foreground;
调整模块30,配置为调整所述提取模块20提取出的拍摄主体在背景中的位置;The adjusting module 30 is configured to adjust a position of the shooting body extracted by the extraction module 20 in the background;
合成模块40,配置为生成所述拍摄主体和所述背景的合成照片。The synthesis module 40 is configured to generate a composite photo of the subject and the background.
这里,所述拍摄装置提取模块20利用光流法等运动物体检测的方法,分离出当前拍摄图像的前景和背景,对前景移动中的拍摄主体进行提取,识别拍摄主体的轮廓。需要注意的是,此处仅是以光流法来举例,当然并不局限于此,还可以使用其他方式,比如抠图等。其中,所述拍摄主体也即拍摄对象,可以理解为被拍摄的物体。所述调整模块30识别拍摄主体的轮廓后,根据需要调整拍摄主***置或大小,将提取之后的拍摄主体进行放大或拖拽,放置于当前背景中的理想位置。所述合成模块40对调整位置后的拍摄主体和背景图像进行合成,生成合成照片,通过显示器显示最佳效果,并对合成相片进行保存。Here, the imaging device extraction module 20 separates the foreground and the background of the currently captured image by a method of moving object detection such as the optical flow method, extracts the subject in the foreground movement, and recognizes the contour of the subject. It should be noted that the optical flow method is only used as an example here, and of course, it is not limited thereto, and other methods, such as a map, may be used. The subject, that is, the subject, can be understood as an object to be photographed. After the adjustment module 30 recognizes the contour of the photographing subject, the position or size of the photographing subject is adjusted as needed, and the photographed subject after the extraction is enlarged or dragged to be placed at an ideal position in the current background. The synthesizing module 40 synthesizes the photographing subject and the background image after the adjusted position, generates a composite photograph, displays the best effect through the display, and saves the synthesized photograph.
本实施例提供的一种拍摄装置,包括:提取模块20,配置为提取前景中移动的拍摄主体;调整模块30,配置为调整所述提取模块20提取出的拍摄主体在背景中的位置;合成模块40,配置为生成调整后的拍摄主体和所述背景的合成照片。所能实现的有益效果为:用户根据实际需要,当拍摄 主体的位置区域受到一定的限制时,实时调整拍摄主***置,达到所见即所得的效果,满足用户不同的使用场景下的需求,提升用户体验。The photographing apparatus provided in this embodiment includes: an extracting module 20 configured to extract a moving subject moving in the foreground; and an adjusting module 30 configured to adjust a position of the photographing subject extracted by the extracting module 20 in the background; 40. configured to generate a composite photograph of the adjusted subject and the background. The beneficial effect can be achieved: the user shoots according to actual needs When the position area of the main body is limited, the position of the shooting subject is adjusted in real time to achieve the WYSIWYG effect, satisfying the needs of the user in different usage scenarios, and improving the user experience.
图5为图4中提取模块的组成结构示意图;参见图5,所述提取模块20包括:5 is a schematic structural diagram of an extraction module of FIG. 4; referring to FIG. 5, the extraction module 20 includes:
选择单元21,配置为选择运动速度的阈值区间;The selecting unit 21 is configured to select a threshold interval of the moving speed;
识别单元22,配置为根据所述选择单元21选择的阈值区间,识别和提取所述拍摄主体的主体轮廓。The recognition unit 22 is configured to recognize and extract the body contour of the photographing subject according to the threshold interval selected by the selection unit 21.
这里,所述选择单元21通过菜单选择运动速度阈值区间,这个阈值实际决定多大范围内的速度作为检测目标,比如阈值为v,则认定运动速度在[v-a,v+b]阈值区间之内,这个阈值区间的特征点是拍摄主体的关键特征点,在选择运动速度阈值区间时,需要保证拍摄主体移动的速度在设定的阈值区间内,同时,应保证拍摄主体结束位置和初始位置无重合区域,即移动一个拍摄主体在移动方向上的宽度值,这样方可在逐帧检测过程中排除干扰,完成准确识别,运动速度阈值区间选择正确,可以排除背景较小移动时对拍摄主体移动时造成的干扰。所述识别单元22配置为根据所述阈值区间,识别和提取所述拍摄主体的主体轮廓,具体包括:对一个连续运动的拍摄主体的预览帧序列进行处理;针对预览帧序列,利用目标检测方法,检测可能出现的前景目标;如果某一帧出现了前景目标,找到其具有代表性的关键特征点,角点是主体轮廓上曲率的局部极大点,对掌握主体轮廓特征具有决定作用,一旦找到了目标的轮廓特征也就大致掌握了目标的形状,角点特征是影像的重要特征,在各种影像特征中角点具有旋转不变性和不随光照条件改变而改变的优点,在目标识别和目标跟踪中,可以减少参与计算的数据量,同时又不损失图像的重要灰度信息,利用角点特征进行匹配可以大大提高匹配的速度;对之后的任意两个相邻视频帧而言,寻找上一帧中出现的关键特征点在当前帧中的最佳位置,从而得到前景目标 在当前帧中的位置坐标;如此迭代进行,便可实现前景目标的跟踪,将获取的前景和背景进行分离,从而过滤一些物体,筛选出所需的拍摄主体,识别前景中运动的拍摄主体,勾勒出主体轮廓。Here, the selection unit 21 selects a motion speed threshold interval through a menu, and the threshold actually determines the speed within a large range as a detection target. For example, if the threshold is v, the motion speed is determined to be within the [va, v+b] threshold interval. The feature point of the threshold interval is the key feature point of the shooting subject. When selecting the motion speed threshold interval, it is necessary to ensure that the moving speed of the shooting subject is within the set threshold interval, and at the same time, the ending position of the shooting subject and the initial position are not coincident. The area, that is, the width value of one subject in the moving direction, so that the interference can be eliminated in the frame-by-frame detection process, the accurate recognition is completed, and the motion speed threshold interval is correctly selected, and the movement of the subject when the background is small can be excluded. The interference caused. The identifying unit 22 is configured to identify and extract a body contour of the shooting body according to the threshold interval, specifically: processing a preview frame sequence of a continuously moving subject; and using a target detecting method for the preview frame sequence To detect possible foreground targets; if a foreground target appears in a frame, find its representative key feature points, the corner points are the local maximum points of curvature on the body contour, which have a decisive effect on mastering the contour features of the body. The contour feature of the target is found, and the shape of the target is roughly grasped. The corner feature is an important feature of the image. In various image features, the corner point has the invariance of rotation and does not change with the illumination condition, and the target recognition and In the target tracking, the amount of data involved in the calculation can be reduced without losing the important gray information of the image. The matching with the corner feature can greatly improve the matching speed; for any two adjacent video frames after that, look for The key feature points appearing in the previous frame are in the best position in the current frame, thus obtaining King targets Position coordinates in the current frame; thus iteratively, the foreground target can be tracked, the acquired foreground and background are separated, thereby filtering some objects, filtering out the required subject, and identifying the moving subject in the foreground. Outline the outline of the subject.
进一步参见图4,所述拍摄装置还包括:Further referring to FIG. 4, the photographing apparatus further includes:
预览模块10,配置为开启摄像头的取景预览。The preview module 10 is configured to turn on the framing preview of the camera.
这里,所述预览模块10开启摄像头的取景预览,加载预览功能,对当前的画面进行实时跟踪,区分当前的拍摄主体和背景,对移动的拍摄主体的运动轨迹和位置进行适时跟踪。Here, the preview module 10 turns on the framing preview of the camera, loads the preview function, performs real-time tracking on the current picture, distinguishes the current shooting subject and the background, and timely tracks the moving trajectory and position of the moving subject.
进一步参见图4,所述拍摄装置还包括:Further referring to FIG. 4, the photographing apparatus further includes:
存储模块50,配置为对所述合成照片实时保存。The storage module 50 is configured to save the composite photo in real time.
这里,所述存储模块50对生成的拍摄主体和背景的合成照片进行实时保存,以便后续在相片预览中进行欣赏。Here, the storage module 50 saves the generated composite photo of the shooting subject and the background in real time for subsequent appreciation in the photo preview.
在本实施例中,所述拍摄装置在实际应用中,可由数码相机、具有摄像头的设备(如手机、平板电脑、笔记本电脑等)实现,所述拍摄装置中的提取模块20、调整模块30、合成模块40和预览模块10,以及所述提取模块20包含的选择单元21和识别单元22,在实际应用中,均可通过所述拍摄装置中的中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Signal Processor)或可编程门阵列(FPGA,Field-Programmable Gate Array)实现;所述拍摄装置中的存储模块50,在实际应用中可由所述拍摄装置中的存储器实现。In this embodiment, the camera device can be implemented by a digital camera, a device having a camera (such as a mobile phone, a tablet computer, a notebook computer, etc.), and an extraction module 20, an adjustment module 30, The synthesis module 40 and the preview module 10, and the selection unit 21 and the identification unit 22 included in the extraction module 20, in practical applications, can pass through a central processing unit (CPU) in the camera. A signal processor (DSP, Digital Signal Processor) or a Field-Programmable Gate Array (FPGA) is implemented; the memory module 50 in the camera device can be implemented by a memory in the camera device in practical applications.
图6是表示本发明的一个实施例的相机的主要电气结构的框图。摄影镜头101由用于形成被摄体像的多个光学镜头构成,是单焦点镜头或变焦镜头。摄影镜头101能够通过镜头驱动部111在光轴方向上移动,根据来自镜头驱动控制部112的控制信号,控制摄影镜头101的焦点位置,在变焦镜头的情况下,也控制焦点距离。镜头驱动控制电路112按照来自微型 计算机107的控制命令进行镜头驱动部111的驱动控制。Figure 6 is a block diagram showing the main electrical configuration of a camera of one embodiment of the present invention. The photographic lens 101 is composed of a plurality of optical lenses for forming a subject image, and is a single focus lens or a zoom lens. The photographic lens 101 can be moved in the optical axis direction by the lens driving unit 111, and controls the focus position of the taking lens 101 based on the control signal from the lens driving control unit 112, and also controls the focus distance in the case of the zoom lens. The lens drive control circuit 112 follows the micro The control command of the computer 107 performs drive control of the lens driving unit 111.
在摄影镜头101的光轴上、由摄影镜头101形成被摄体像的位置附近配置有摄像元件102。摄像元件102发挥作为对被摄体像摄像并取得摄像图像数据的摄像部的功能。在摄像元件102上二维地呈矩阵状配置有构成各像素的光电二极管。各光电二极管产生与受光量对应的光电转换电流,该光电转换电流由与各光电二极管连接的电容器进行电荷蓄积。各像素的前表面配置有拜耳排列的RGB滤色器。An imaging element 102 is disposed in the vicinity of a position where the subject image is formed by the photographing lens 101 on the optical axis of the photographing lens 101. The imaging element 102 functions as an imaging unit that captures a subject image and acquires captured image data. Photodiodes constituting each pixel are two-dimensionally arranged in a matrix on the imaging element 102. Each photodiode generates a photoelectric conversion current corresponding to the amount of received light, and the photoelectric conversion current is charged by a capacitor connected to each photodiode. The front surface of each pixel is provided with a Bayer array of RGB color filters.
摄像元件102与摄像电路103连接,该摄像电路103在摄像元件102中进行电荷蓄积控制和图像信号读出控制,对该读出的图像信号(模拟图像信号)降低重置噪声后进行波形整形,进而进行增益提高等以成为适当的信号电平。The imaging element 102 is connected to an imaging circuit 103 that performs charge accumulation control and image signal readout control in the imaging element 102, and performs waveform shaping after reducing the reset noise of the read image signal (analog image signal). Further, gain improvement or the like is performed to obtain an appropriate signal level.
摄像电路103与A/D转换部104连接,该A/D转换部104对模拟图像信号进行模数转换,向总线199输出数字图像信号(以下称之为图像数据)。The imaging circuit 103 is connected to the A/D conversion unit 104, which performs analog-to-digital conversion on the analog image signal, and outputs a digital image signal (hereinafter referred to as image data) to the bus 199.
总线199是用于传送在相机的内部读出或生成的各种数据的传送路径。在总线199连接着上述A/D转换部104,此外还连接着图像处理器105、JPEG处理器106、微型计算机107、SDRAM(Synchronous DRAM)108、存储器接口(以下称之为存储器I/F)109、LCD(液晶显示器:Liquid Crystal Display)驱动器110。The bus 199 is a transmission path for transmitting various data read or generated inside the camera. The A/D conversion unit 104 is connected to the bus 199, and an image processor 105, a JPEG processor 106, a microcomputer 107, a SDRAM (Synchronous DRAM) 108, and a memory interface (hereinafter referred to as a memory I/F) are connected. 109. LCD (Liquid Crystal Display) driver 110.
图像处理器105对基于摄像元件102的输出的图像数据进行OB相减处理、白平衡调整、颜色矩阵运算、伽马转换、色差信号处理、噪声去除处理、同时化处理、边缘处理等各种图像处理。The image processor 105 performs various kinds of images such as OB subtraction processing, white balance adjustment, color matrix calculation, gamma conversion, color difference signal processing, noise removal processing, simultaneous processing, edge processing, and the like on the image data based on the output of the imaging element 102. deal with.
JPEG处理器106在将图像数据记录于记录介质115时,按照JPEG压缩方式压缩从SDRAM108读出的图像数据。此外,JPEG处理器106为了进行图像再现显示而进行JPEG图像数据的解压缩。进行解压缩时,读出记录在记录介质115中的文件,在JPEG处理器106中实施了解压缩处理后, 将解压缩的图像数据暂时存储于SDRAM108中并在LCD116上进行显示。另外,在本实施方式中,作为图像压缩解压缩方式采用的是JPEG方式,然而压缩解压缩方式不限于此,当然可以采用MPEG、TIFF、H.264等其他的压缩解压缩方式。When the image data is recorded on the recording medium 115, the JPEG processor 106 compresses the image data read out from the SDRAM 108 in accordance with the JPEG compression method. Further, the JPEG processor 106 performs decompression of JPEG image data for image reproduction display. When the decompression is performed, the file recorded in the recording medium 115 is read out, and after the compression processing is performed in the JPEG processor 106, The decompressed image data is temporarily stored in the SDRAM 108 and displayed on the LCD 116. Further, in the present embodiment, the JPEG method is adopted as the image compression/decompression method. However, the compression/decompression method is not limited thereto, and other compression/decompression methods such as MPEG, TIFF, and H.264 may be used.
微型计算机107发挥作为该相机整体的控制部的功能,统一控制相机的各种处理序列。微型计算机107连接着操作单元113和闪存114。The microcomputer 107 functions as a control unit of the entire camera, and collectively controls various processing sequences of the camera. The microcomputer 107 is connected to the operation unit 113 and the flash memory 114.
操作单元113包括但不限于实体按键或者虚拟按键,该实体或虚拟按键可以为电源按钮、拍照键、编辑按键、动态图像按钮、再现按钮、菜单按钮、十字键、OK按钮、删除按钮、放大按钮等各种输入按钮和各种输入键等操作部材,检测这些操作部材的操作状态。The operation unit 113 includes but is not limited to a physical button or a virtual button, and the entity or virtual button may be a power button, a camera button, an edit button, a dynamic image button, a reproduction button, a menu button, a cross button, an OK button, a delete button, and an enlarge button. The operation members such as various input buttons and various input keys are detected, and the operation states of these operation members are detected.
将检测结果向微型计算机107输出。此外,在作为显示部的LCD116的前表面设有触摸面板,检测用户的触摸位置,将该触摸位置向微型计算机107输出。微型计算机107根据来自操作单元113的操作部材的检测结果,执行与用户的操作对应的各种处理序列。(同样,可以把这个地方改成计算机107根据LCD116前面的触摸面板的检测结果,执行与用户的操作对应的各种处理序列。)The detection result is output to the microcomputer 107. Further, a touch panel is provided on the front surface of the LCD 116 as a display portion, and the touch position of the user is detected, and the touch position is output to the microcomputer 107. The microcomputer 107 executes various processing sequences corresponding to the operation of the user based on the detection result of the operation member from the operation unit 113. (Similarly, this place can be changed to the computer 107 to execute various processing sequences corresponding to the user's operation based on the detection result of the touch panel on the front of the LCD 116.)
闪存114存储用于执行微型计算机107的各种处理序列的程序。微型计算机107根据该程序进行相机整体的控制。此外,闪存114存储相机的各种调整值,微型计算机107读出调整值,按照该调整值进行相机的控制。SDRAM108是用于对图像数据等进行暂时存储的可电改写的易失性存储器。该SDRAM108暂时存储从A/D转换部104输出的图像数据和在图像处理器105、JPEG处理器106等中进行了处理后的图像数据。The flash memory 114 stores programs for executing various processing sequences of the microcomputer 107. The microcomputer 107 performs overall control of the camera in accordance with the program. Further, the flash memory 114 stores various adjustment values of the camera, and the microcomputer 107 reads out the adjustment value, and performs control of the camera in accordance with the adjustment value. The SDRAM 108 is an electrically rewritable volatile memory for temporarily storing image data or the like. The SDRAM 108 temporarily stores image data output from the A/D conversion unit 104 and image data processed in the image processor 105, the JPEG processor 106, and the like.
存储器接口109与记录介质115连接,进行将图像数据和附加在图像数据中的文件头等数据写入记录介质115和从记录介质115中读出的控制。记录介质115例如为能够在相机主体上自由拆装的存储器卡等记录介质, 然而不限于此,也可以是内置在相机主体中的硬盘等。The memory interface 109 is connected to the recording medium 115, and performs control for writing image data and a file header attached to the image data to the recording medium 115 and reading from the recording medium 115. The recording medium 115 is, for example, a recording medium such as a memory card that can be detachably attached to the camera body. However, it is not limited thereto, and may be a hard disk or the like built in the camera body.
LCD驱动器110与LCD116连接,将由图像处理器105处理后的图像数据存储于SDRAM,需要显示时,读取SDRAM存储的图像数据并在LCD116上显示,或者,JPEG处理器106压缩过的图像数据存储于SDRAM,在需要显示时,JPEG处理器106读取SDRAM的压缩过的图像数据,再进行解压缩,将解压缩后的图像数据通过LCD116进行显示。The LCD driver 110 is connected to the LCD 116, and stores image data processed by the image processor 105 in the SDRAM. When display is required, the image data stored in the SDRAM is read and displayed on the LCD 116, or the image data stored in the JPEG processor 106 is compressed. In the SDRAM, when display is required, the JPEG processor 106 reads the compressed image data of the SDRAM, decompresses it, and displays the decompressed image data on the LCD 116.
LCD116配置在相机主体的背面等上,进行图像显示。该LCD116设有检测用户的触摸操作的触摸面板。另外,作为显示部,在本实施方式中配置的是液晶表示面板(LCD116),然而不限于此,也可以采用有机EL等各种显示面板。The LCD 116 is disposed on the back surface of the camera body or the like to perform image display. The LCD 116 is provided with a touch panel that detects a user's touch operation. Further, in the present embodiment, the liquid crystal display panel (LCD 116) is disposed as the display portion. However, the present invention is not limited thereto, and various display panels such as an organic EL may be employed.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。 In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing storage device includes the following steps: the foregoing storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code.
或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product stored in a storage medium, including a plurality of instructions. A computer device (which may be a personal computer, server, or network device, etc.) is caused to perform all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a mobile storage device, a ROM, a RAM, a magnetic disk, or an optical disk.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.
工业实用性Industrial applicability
本发明实施例通过提取前景中移动的拍摄主体;调整所述拍摄主体在背景中的位置;生成调整后的拍摄主体和所述背景的合成照片。如此,采用本发明实施例的技术方案,用户根据实际需要,当拍摄主体的位置区域受到一定的限制时,实时调整拍摄主***置,达到所见即所得的效果,满足用户不同的使用场景下的需求,提升用户体验。 Embodiments of the present invention extract a photographing subject moving in the foreground; adjust a position of the photographing subject in the background; and generate a composite photograph of the adjusted photographing subject and the background. In this way, according to the technical solution of the embodiment of the present invention, when the position area of the shooting subject is limited by the actual needs, the user adjusts the position of the shooting subject in real time to achieve the WYSIWYG effect, and satisfies the different usage scenarios of the user. Demand, enhance the user experience.

Claims (11)

  1. 一种拍摄方法,包括:A method of shooting, including:
    提取前景中移动的拍摄主体;Extracting the moving subject in the foreground;
    调整所述拍摄主体在背景中的位置;Adjusting the position of the subject in the background;
    生成调整后的拍摄主体和所述背景的合成照片。A composite photograph of the adjusted subject and the background is generated.
  2. 如权利要求1所述的拍摄方法,其中,所述提取前景中移动的拍摄主体之前,还包括:The photographing method according to claim 1, wherein the extracting the moving subject in the foreground further comprises:
    开启摄像头的取景预览。Turn on the framing preview of the camera.
  3. 如权利要求1或2所述的拍摄方法,其中,所述提取前景中移动的拍摄主体,包括:The photographing method according to claim 1 or 2, wherein the extracting the photographing subject moving in the foreground comprises:
    选择运动速度的阈值区间;Select a threshold interval for the speed of movement;
    根据所述阈值区间,识别和提取所述拍摄主体的主体轮廓。A body contour of the photographing subject is identified and extracted according to the threshold interval.
  4. 如权利要求1所述的拍摄方法,其中,所述调整所述拍摄主体在背景中的位置,包括:The photographing method according to claim 1, wherein the adjusting the position of the photographing subject in the background comprises:
    根据实际需要调整所述拍摄主体的位置或大小,确定所述拍摄主体在所述背景中的位置。The position or size of the photographing subject is adjusted according to actual needs, and the position of the photographing subject in the background is determined.
  5. 如权利要求1至4任一项所述的拍摄方法,其中,所述生成调整后的拍摄主体和所述背景的合成照片之后,还包括:The photographing method according to any one of claims 1 to 4, wherein after the generating the adjusted photographed subject and the composite photograph of the background, the method further comprises:
    对所述合成照片实时保存。The synthesized photo is saved in real time.
  6. 一种拍摄装置,所述拍摄装置包括:A photographing device, the photographing device comprising:
    提取模块,配置为提取前景中移动的拍摄主体;An extraction module configured to extract a moving subject moving in the foreground;
    调整模块,配置为调整所述提取模块提取出的拍摄主体在背景中的位置;An adjustment module configured to adjust a position of the shooting body extracted by the extraction module in the background;
    合成模块,配置为生成调整后的拍摄主体和所述背景的合成照片。A synthesis module configured to generate a composite photograph of the adjusted subject and the background.
  7. 如权利要求6所述的拍摄装置,其中,所述拍摄装置还包括: The photographing apparatus according to claim 6, wherein the photographing apparatus further comprises:
    预览模块,配置为开启摄像头的取景预览。Preview module, configured to turn on the framing preview of the camera.
  8. 如权利要求6或7所述的拍摄装置,其中,所述提取模块包括:The photographing apparatus according to claim 6 or 7, wherein the extraction module comprises:
    选择单元,配置为选择运动速度的阈值区间;Selecting a unit configured to select a threshold interval of motion speed;
    识别单元,配置为根据所述选择单元选择的阈值区间,识别和提取所述拍摄主体的主体轮廓。The identification unit is configured to identify and extract a body contour of the photographing subject according to the threshold interval selected by the selection unit.
  9. 如权利要求6所述的拍摄装置,其中,所述调整模块,配置为根据实际需要调整所述拍摄主体的位置或大小,确定所述拍摄主体在所述背景中的位置。The photographing apparatus according to claim 6, wherein the adjustment module is configured to adjust a position or a size of the photographing subject according to actual needs, and determine a position of the photographing subject in the background.
  10. 如权利要求6至9任一项所述的拍摄装置,其中,所述拍摄装置还包括:The photographing apparatus according to any one of claims 6 to 9, wherein the photographing apparatus further comprises:
    存储模块,配置为对所述合成照片实时保存。a storage module configured to save the composite photo in real time.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令配置为执行权利要求1至5任一项所述的拍摄方法。 A computer storage medium having computer-executable instructions stored therein, the computer-executable instructions being configured to perform the photographing method of any one of claims 1 to 5.
PCT/CN2015/082124 2014-07-11 2015-06-23 Shooting method, shooting device and computer storage medium WO2016004819A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410332162.5 2014-07-11
CN201410332162.5A CN104135612B (en) 2014-07-11 2014-07-11 A kind of image pickup method and filming apparatus of adjustable shooting body position

Publications (1)

Publication Number Publication Date
WO2016004819A1 true WO2016004819A1 (en) 2016-01-14

Family

ID=51808126

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082124 WO2016004819A1 (en) 2014-07-11 2015-06-23 Shooting method, shooting device and computer storage medium

Country Status (2)

Country Link
CN (1) CN104135612B (en)
WO (1) WO2016004819A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135612B (en) * 2014-07-11 2018-05-01 努比亚技术有限公司 A kind of image pickup method and filming apparatus of adjustable shooting body position
CN106375667A (en) * 2016-09-26 2017-02-01 宇龙计算机通信科技(深圳)有限公司 Picture processing method
CN106506963A (en) * 2016-11-30 2017-03-15 努比亚技术有限公司 A kind of photographic method and terminal based on dual camera
CN107155064B (en) * 2017-06-23 2019-11-05 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN107967693B (en) * 2017-12-01 2021-07-09 北京奇虎科技有限公司 Video key point processing method and device, computing equipment and computer storage medium
CN108989699B (en) * 2018-08-06 2021-03-23 Oppo广东移动通信有限公司 Image synthesis method, image synthesis device, imaging apparatus, electronic apparatus, and computer-readable storage medium
CN112839170B (en) * 2020-12-31 2022-07-05 上海米哈游天命科技有限公司 Shooting method, shooting device, electronic equipment and storage medium
CN114466140B (en) * 2022-02-09 2023-10-24 维沃移动通信有限公司 Image shooting method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790857A (en) * 2011-05-19 2012-11-21 华晶科技股份有限公司 Image processing method
CN103123690A (en) * 2011-11-21 2013-05-29 中兴通讯股份有限公司 Information acquisition device, information acquisition method, identification system and identification method
CN103533249A (en) * 2013-10-25 2014-01-22 惠州Tcl移动通信有限公司 Method and device for adjusting foreground and background
CN103916587A (en) * 2012-12-28 2014-07-09 三星电子株式会社 Photographing device for producing composite image and method using the same
CN104135612A (en) * 2014-07-11 2014-11-05 深圳市中兴移动通信有限公司 A shooting method and a shooting device with an adjustable location of a shot object

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006262328A (en) * 2005-03-18 2006-09-28 Hitachi Software Eng Co Ltd Image printer and image processing method thereof
CN101916449A (en) * 2010-08-21 2010-12-15 上海交通大学 Method for establishing background model based on motion information during image processing
CN103119609B (en) * 2012-09-27 2016-11-23 华为技术有限公司 A kind of method and apparatus determining video foreground main image area

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790857A (en) * 2011-05-19 2012-11-21 华晶科技股份有限公司 Image processing method
CN103123690A (en) * 2011-11-21 2013-05-29 中兴通讯股份有限公司 Information acquisition device, information acquisition method, identification system and identification method
CN103916587A (en) * 2012-12-28 2014-07-09 三星电子株式会社 Photographing device for producing composite image and method using the same
CN103533249A (en) * 2013-10-25 2014-01-22 惠州Tcl移动通信有限公司 Method and device for adjusting foreground and background
CN104135612A (en) * 2014-07-11 2014-11-05 深圳市中兴移动通信有限公司 A shooting method and a shooting device with an adjustable location of a shot object

Also Published As

Publication number Publication date
CN104135612B (en) 2018-05-01
CN104135612A (en) 2014-11-05

Similar Documents

Publication Publication Date Title
WO2016004819A1 (en) Shooting method, shooting device and computer storage medium
US11743571B2 (en) Electronic device and operating method thereof
KR20230013243A (en) Maintain a fixed size for the target object in the frame
KR101679290B1 (en) Image processing method and apparatus
US10419661B2 (en) Shooting method and shooting device
CN101465972B (en) Apparatus and method for blurring image background in digital image processing device
EP2768214A2 (en) Method of tracking object using camera and camera system for object tracking
US20110242395A1 (en) Electronic device and image sensing device
KR101822661B1 (en) Vision recognition apparatus and method
WO2016008359A1 (en) Object movement track image synthesizing method, device and computer storage medium
WO2016029746A1 (en) Shooting method, shooting device and computer storage medium
US20110128401A1 (en) Digital photographing apparatus and method of controlling the same
JP7223079B2 (en) IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND IMAGING APPARATUS
CN103299227A (en) Image capturing device and image capturing method
WO2017080348A2 (en) Scene-based photographing device and method, and computer storage medium
JP6011569B2 (en) Imaging apparatus, subject tracking method, and program
KR102209070B1 (en) Apparatus and method for providing thumbnail image of moving picture
WO2017128914A1 (en) Photographing method and device
JP2011223294A (en) Imaging apparatus
JP5519376B2 (en) Electronics
US20090190835A1 (en) Method for capturing image to add enlarged image of specific area to captured image, and imaging apparatus applying the same
JP6450107B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP6099973B2 (en) Subject area tracking device, control method thereof, and program
JP5539565B2 (en) Imaging apparatus and subject tracking method
JP2011193066A (en) Image sensing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15819673

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.06.2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15819673

Country of ref document: EP

Kind code of ref document: A1