Image acquisition method and apparatus, electronic device, and medium
By acquiring images on a turntable and utilizing the combination of the turntable and the image acquisition device, the problems of complexity and high cost of multi-view image acquisition equipment are solved, and simple and low-cost multi-view image acquisition is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Z2D VISION TECH (NANJING) CO LTD
- Filing Date
- 2022-04-13
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, multi-view image acquisition requires multiple stereo cameras to capture images simultaneously, which is complex, costly, and cumbersome to operate.
By placing the object to be photographed on a turntable, and using the image acquisition device and the turntable in conjunction, the acquisition angle difference is determined according to the preset acquisition angle and the number of images. The rotation speed of the turntable and the interval time of the image acquisition device are controlled to enable a single device to continuously acquire multi-view images.
The equipment structure was simplified, the cost was reduced, and the operation process was streamlined, enabling efficient acquisition of multi-view images.
Smart Images

Figure CN115769592B_ABST
Abstract
Description
[0001] This application claims priority to Chinese Patent Application No. 202110482214.7, filed with the Chinese Patent Office on April 30, 2021, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of machine vision technology, such as an image acquisition method, device, electronic device, and medium. Background Technology
[0003] Image acquisition is a method of acquiring real-time image information using modern technology, and it occupies an important position in modern multimedia technology. It has wide applications in daily life, biomedicine, aerospace and other fields.
[0004] In image acquisition applications, it is often necessary to acquire multi-view images of an object to obtain information about the object from multiple perspectives. However, capturing multi-view images... Figure 1 Generally, multiple stereo cameras are needed for simultaneous shooting. The camera setup is complex and requires precise calibration. Not only is the shooting equipment complex and costly, but each shooting session also requires careful calibration of multiple cameras, making the operation cumbersome. Summary of the Invention
[0005] This application provides an image acquisition method, apparatus, electronic device, and medium.
[0006] In a first aspect, embodiments of this application provide an image acquisition method, wherein an object to be photographed is placed on a turntable, an image acquisition device is located on one side of the turntable, and the image acquisition device is used to acquire images of the object to be photographed on the turntable. The method includes:
[0007] Based on the preset acquisition angle and the preset number of images, determine the acquisition angle difference for acquiring two adjacent images;
[0008] Based on the acquisition angle difference, the acquisition interval time of the image acquisition device and the target rotation speed of the turntable are determined so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference.
[0009] Based on the target rotation speed, the turntable is controlled to rotate, and the image acquisition device is controlled to continuously acquire images of the object to be photographed according to the acquisition interval time, so as to obtain the preset number of acquired images.
[0010] Secondly, embodiments of this application provide an image acquisition device, including:
[0011] The angle difference determination module is configured to determine the angle difference between two adjacent images based on a preset acquisition angle and a preset number of images.
[0012] The determining module is configured to determine the acquisition interval time of the image acquisition device and the target rotation speed of the turntable based on the acquisition angle difference, so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference.
[0013] The image acquisition module is configured to control the turntable to rotate based on the target rotation speed, and to control the image acquisition device to continuously acquire images of the object to be photographed according to the acquisition interval time, so as to obtain the preset number of acquired images.
[0014] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor. When the processor executes the computer program, it implements the image acquisition method as described in the embodiments of this application.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the image acquisition method described in embodiments of this application. Attached Figure Description
[0016] Figure 1 This is a flowchart of the image acquisition method provided in Embodiment 1 of this application;
[0017] Figure 2 This is a schematic diagram of the shooting system provided in Embodiment 1 of this application;
[0018] Figure 3 This is a schematic diagram of simulating human eye observation of a rotating object provided in Embodiment 1 of this application;
[0019] Figure 4 This is a flowchart of the image acquisition method provided in Embodiment 2 of this application;
[0020] Figure 5 This is a schematic diagram of multi-view image stitching provided in Embodiment 2 of this application;
[0021] Figure 6 This is a schematic diagram of the multi-view image stitching effect provided in Embodiment 2 of this application;
[0022] Figure 7 This is a schematic diagram of the image acquisition device provided in Embodiment 3 of this application;
[0023] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of this application. Detailed Implementation
[0024] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present application, not the entire structure.
[0025] Before discussing exemplary embodiments, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. The process may correspond to a method, function, procedure, subroutine, subroutine, etc.
[0026] Example 1
[0027] Figure 1 This is a flowchart of the image acquisition method provided in Embodiment 1 of this application. This embodiment can occur in scenarios where the user wants the image of the object to be presented to conform to the individual's eye imaging habits. This method can be executed by the image acquisition device provided in this embodiment of the application. The device can be implemented by software and / or hardware and can be integrated into an electronic device, such as a computer, tablet computer, or other intelligent device.
[0028] like Figure 1 As shown, the image acquisition method includes:
[0029] S110, based on the preset acquisition angle and the preset number of images, determine the acquisition angle difference between two adjacent images.
[0030] The preset acquisition angle refers to the angle at which the object to be photographed is captured. The preset acquisition angle can be set according to the user's needs.
[0031] For example, such as Figure 2 As shown, Figure 2This is a schematic diagram of the imaging system. The object to be photographed is placed on a turntable, and an image acquisition unit is located on one side of the turntable to acquire images of the object. The object is placed on the central turntable, which rotates at a certain speed. The image acquisition unit is fixed at a certain distance from the object and uses a shutter to photograph the rotating object on the turntable. The interval between the electronic device controlling the image acquisition unit to trigger the shutter is the acquisition interval, which can be 1 second, 2 seconds, or other times; this embodiment does not impose any restrictions on this. The electronic device controls the image acquisition unit's shooting and the turntable's rotation speed. For example, the preset acquisition angle can be 360 degrees, 270 degrees, etc., and this angle can be set according to the user's needs. If the preset acquisition angle is set to 360 degrees, the turntable rotates one revolution, and during this revolution, the image acquisition unit triggers the shutter at certain time intervals to photograph the rotating object. This embodiment does not restrict the positional relationship between the image acquisition unit, the turntable, and the electronic device.
[0032] The preset number of images refers to the actual number of images captured after the object to be photographed on the turntable rotates to the preset acquisition angle.
[0033] For example, if the preset acquisition angle is set to 360 degrees, the number of images captured by the image acquisition device after the object to be photographed rotates one full turn is the preset number of images.
[0034] In this embodiment, for example, the preset number of images can be determined based on the distance between the image acquisition device and the object to be photographed, the interpupillary distance, and the preset acquisition angle.
[0035] For example, such as Figure 3 As shown, Figure 3 This diagram simulates the human eye observing a rotating object. The left or right eye represents the image acquisition device, the distance between the left and right eyes is d, and point B is the midpoint of the line connecting the left and right eyes. Point A represents the object to be photographed, and the circle represents the turntable on which the object is placed. The distance between point A and the image acquisition device is S. The angle between the two lines connecting the left eye and point A, and the right eye and point A, is the left / right eye parallax angle, θ representing half of the left / right eye parallax angle, called the half-left / right eye parallax angle. First, the half-left / right eye parallax angle θ is calculated based on the eye distance and the distance S between point A and the image acquisition device, resulting in a left / right eye parallax angle of 2θ. When the angle of rotation of the object to be photographed equals the left / right eye parallax angle, the image acquisition device presses the shutter once to obtain one image. When the object to be photographed completes its rotation to the preset acquisition angle, the theoretical number of images can be obtained, and the angle difference between any two adjacent shutter speeds is equal to the left / right eye parallax angle. The preset number of images can be determined based on the theoretical number of images, and the preset number of images can be greater than or equal to the theoretical number of images.
[0036] The acquisition angle difference is the angle of rotation of the object to be photographed between two consecutive shutter presses of the image acquisition device. Since the preset number of images is greater than or equal to the theoretical number of images (meaning the preset number of images may differ from the theoretical number of images), the acquisition angle difference needs to be calculated based on the preset acquisition angle and the preset number of images.
[0037] S120, based on the acquisition angle difference, determine the acquisition interval time of the image acquisition device and the target rotation speed of the turntable, so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference.
[0038] For example, a data acquisition interval can be preset, and the target rotational speed of the turntable can be determined based on the acquisition angle difference and the acquisition interval, so that the angle through which the turntable rotates at the target rotational speed within the acquisition interval is consistent with the acquisition angle difference. For example, the target rotational speed r of the turntable is calculated based on the acquisition angle difference α and the acquisition interval T, so that the angle through which the turntable rotates within time T is α.
[0039] Alternatively, a target rotation speed can be preset, and the acquisition interval time can be determined based on the acquisition angle difference and the target rotation speed of the turntable, so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference; for example, the acquisition interval time T is calculated based on the acquisition angle difference α and the target rotation speed r of the turntable, so that the turntable rotates through an angle α within time T.
[0040] An image acquisition device is a device that uses modern technology to acquire image information. In this embodiment, for example, the image acquisition device can be a camera, a scanner, or other devices with a photo-taking function, such as a mobile phone or a tablet computer. This embodiment does not limit the scope of the image acquisition device.
[0041] The acquisition interval of the image acquisition device is the time interval between acquiring two adjacent images. The acquisition interval of the image acquisition device should correspond to the difference in acquisition angle.
[0042] For example, if the angle difference is α, the time for acquiring the first image is t, and the time for acquiring the second image is t+T, then the time interval between the two acquisitions is T. In this time interval T, the angle of rotation of the object to be photographed on the turntable is equal to the angle difference α.
[0043] The target rotational speed of the turntable is the number of revolutions it makes per unit time.
[0044] S130, based on the target rotation speed, control the turntable to rotate, and control the image acquisition device to continuously acquire images of the object to be photographed according to the acquisition interval time, so as to obtain the preset number of acquired images.
[0045] For example, the technician inputs the user's eye distance *d* and the distance *S* between the object to be photographed and the image acquisition device into the electronic device to calculate the half-left-right eye parallax angle *θ*. Then, the preset acquisition angle is input into the electronic device, which calculates the acquisition angle difference *α* for acquiring two adjacent images based on the preset acquisition angle and the half-left-right eye parallax angle *θ*. Next, the acquisition interval *T* of the image acquisition device is input into the electronic device, which calculates the target rotation speed of the turntable based on the acquisition interval *T* and the acquisition angle difference *α*. The electronic device controls the turntable to rotate at the target rotation speed based on the calculation result, while simultaneously controlling the image acquisition device to acquire images of the object rotating on the turntable, ultimately obtaining the preset number of acquired images. In this embodiment, for example, the electronic device can be a device that calculates the target rotation speed of the turntable and controls its rotation, such as a computer.
[0046] The technical solution provided in this application determines the difference in acquisition angle between two adjacent images based on a preset acquisition angle and a preset number of images; determines the acquisition interval time of the image acquisition device and the target rotation speed of the turntable based on the acquisition angle difference; controls the turntable to rotate based on the target rotation speed, and controls the image acquisition device to continuously acquire images of the object to be photographed according to the acquisition interval time, thus completing the acquisition of multiple angles of the object to be photographed by a single image acquisition device. This overcomes the limitations of related technologies that require the use of multiple image acquisition devices to obtain multi-angle images, achieving the effect of simple measurement method and low cost.
[0047] Example 2
[0048] Figure 4 This is a flowchart of the image acquisition method in Embodiment 2 of this application. This embodiment is an optimization based on the above embodiment. For details not described in detail in the embodiments of this application, please refer to the above embodiment.
[0049] like Figure 4 As shown, the method in this embodiment includes the following steps:
[0050] S210 determines the left and right eye parallax angles based on the distance between the image acquisition device and the object to be photographed, as well as the interpupillary distance between the two eyes.
[0051] For example, if the interpupillary distance is d and the distance between the object to be photographed and the image acquisition device is S, then the half-left and right eye parallax angles can be calculated using the following formula:
[0052]
[0053] The disparity angle between the left and right eyes is 2θ.
[0054] S220, determine the preset number of images based on the ratio of the preset acquisition angle to the left and right eye parallax angles.
[0055] For example, if the preset acquisition angle is 360° and the preset number of images is N, then N can be determined according to the following formula:
[0056] in, This is the theoretical number of images.
[0057] S230, based on the preset acquisition angle and the preset number of images, determines the acquisition angle difference between two adjacent images.
[0058] For example, if the difference in the acquisition angle between two adjacent images is α, then α can be calculated using the following formula:
[0059]
[0060] At this point, α≤2θ, meaning the image acquisition frequency is higher, the overlap between two adjacent acquired images is greater, and the number of acquired images is greater, making it easier to select and stitch together subsequent target images.
[0061] S240, based on the acquisition angle difference, determine the acquisition interval time of the image acquisition device and the target rotation speed of the turntable, so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference.
[0062] In one embodiment, a preset acquisition interval time can be established. The target rotational speed of the turntable is determined based on the acquisition angle difference and the acquisition interval time, so that the angle traversed by the turntable at the target rotational speed within the acquisition interval time matches the acquisition angle difference. The acquisition time required to reach the preset acquisition angle can be determined using the following formula:
[0063]
[0064] Where T′ is the acquisition time required to reach the preset acquisition angle, θ′ is the preset acquisition angle, α is the acquisition angle difference, and T is the acquisition interval time.
[0065] Then, based on the preset acquisition angle and the 360° angle, determine the rotation time required for the turntable to complete one revolution. Let T″ be the time required for the turntable to complete one revolution, then T″ can be calculated using the following formula:
[0066]
[0067] Finally, the target rotation speed of the turntable is determined based on the rotation time required for the turntable to complete one revolution.
[0068] The target rotational speed of the turntable is the number of revolutions it can make within one unit of time t.
[0069] Let the target rotational speed of the turntable be r, then r can be calculated using the following formula:
[0070]
[0071] In one embodiment, the acquisition interval time can also be determined based on the acquisition angle difference and the target rotation speed of the turntable, so that the angle rotated by the turntable at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference. For example, if the acquisition angle difference and the target rotation speed of the turntable are known, the rotation time T″ required for the turntable to rotate one revolution is first calculated. T″ can be calculated according to the following formula:
[0072]
[0073] Where r is the target rotational speed of the turntable.
[0074] Next, calculate the acquisition time T′ required for the turntable to reach the preset acquisition angle based on the rotation time required for the turntable to rotate one revolution. T′ can be calculated using the following formula:
[0075]
[0076] Where θ′ is the preset acquisition angle.
[0077] Finally, based on the acquisition time required for the turntable to reach the preset acquisition angle, and the acquisition angle difference, the acquisition interval time T of the image acquisition device is calculated. T can be calculated using the following formula:
[0078]
[0079] Where α is the difference in the acquisition angle.
[0080] S250, based on the target rotation speed, control the turntable to rotate, and control the image acquisition device to continuously acquire images of the object to be photographed according to the acquisition interval time, so as to obtain a preset number of acquired images.
[0081] S260, in response to the fact that the difference in the acquisition angle of any two acquisition images in the multiple acquisition images corresponding to the viewing angle range of the preset viewpoint satisfies the left and right eye parallax angle, the two acquisition images are taken as target images.
[0082] The preset viewpoint is the perspective from which the object to be photographed is viewed from a certain angle and distance. The preset viewpoint can be set according to user needs. The field of view is the spatial range that can be seen when looking at the object from the preset viewpoint. The field of view varies depending on the distance from the object at a certain angle.
[0083] For example, after acquiring a preset number of images, the preset viewpoint is set to due north, 1 meter away from the object. Then, images within the due north viewing angle range are selected from the acquired images. If the difference in acquisition angle between acquired image A and acquired image B equals the left and right eye parallax angles, then acquired image A and acquired image B are selected as target images and stitched together to obtain a viewing image from the due north perspective. When stitching target images to obtain the viewing image, attention must be paid to the stitching order to satisfy the visual effect of the human eye. For example, if the turntable appears to rotate clockwise from a top-down angle, and the turntable rotates from right to left relative to the image acquisition device, acquiring target image a first, followed by target image b, then target image a is used as the viewing image from the left eye perspective, and target image b is used as the viewing image from the right eye perspective; that is, target image a is placed to the left of target image b for stitching. If the turntable rotates counterclockwise when viewed from above, and the turntable rotates from left to right relative to the image acquisition unit, acquiring target image a first and then target image b, then target image a is used as the viewing image from the right eye perspective, and target image b is used as the viewing image from the left eye perspective. That is, target image b is placed to the left of target image a for stitching.
[0084] This embodiment can obtain an image that conforms to the user's eye imaging habits based on the user's viewing angle difference.
[0085] In one embodiment, two acquired images existing in the multiple acquired images corresponding to the viewing angle range of the preset viewpoint can be selected adjacently or at intervals, depending on actual needs; however, in order to reduce the number of acquisitions, generally, the difference in the acquisition angle of two acquired images points to two adjacent images.
[0086] S270, construct a multi-view image based on the target image.
[0087] After acquiring a preset number of images, a set of target images is obtained from different preset viewpoints at fixed distances. Based on the target images obtained from each preset viewpoint, they are stitched together to obtain the viewpoint images corresponding to each viewpoint. Then, based on the viewpoint images of each viewpoint, a multi-view image is constructed.
[0088] For example, such as Figure 5 As shown, Figure 5This is a schematic diagram of multi-view image stitching. Nine target images are obtained from nine preset viewpoints. These nine images are then reduced to one-third of their original size both horizontally and vertically, and finally stitched together to form a nine-grid image. The stitching effect is shown in the image below. Figure 6 As shown. Figure 6 The parallax relationship of 9 views can be simulated based on the rotation angle of the turntable. In the embodiments of this application, the target image can also be output in frame order.
[0089] The technical solution provided in this application determines the left and right eye parallax angles based on the distance between the image acquisition device and the object to be photographed, as well as the interpupillary distance. It then determines the preset number of images based on the ratio of the preset acquisition angle to the left and right eye parallax angles. Based on the preset acquisition angle and the preset number of images, it determines the acquisition angle difference between two adjacent images. The acquisition time required to reach the preset acquisition angle is determined based on the preset acquisition angle, the acquisition angle difference, and the acquisition interval. The rotation time required for the turntable to rotate one full circle is determined based on the preset acquisition angle and a 360° angle. The target rotation speed of the turntable is determined based on the rotation time required for one full circle. Based on the target rotation speed, the turntable is controlled to rotate, and the image acquisition device is controlled to continuously acquire images of the object to be photographed according to the acquisition interval, resulting in the preset number of acquired images. From the multiple acquired images corresponding to the viewing angle range of the preset viewpoint, any two images whose acquisition angle difference satisfies the left and right eye parallax angles are selected as the target images. Based on the target images, multi-view images are obtained. This solution, through the above methods, can present images that conform to the individual eye imaging habits according to the different interpupillary distances and viewing angle differences of different users, achieving a diverse image presentation effect.
[0090] Example 3
[0091] Figure 7 This is a structural block diagram of an image acquisition device provided in Embodiment 3 of this application. This device can execute the image acquisition method provided in any embodiment of this application, and possesses the corresponding functional modules and beneficial effects for executing the method. For example... Figure 7 As shown, the device may include:
[0092] The angle difference determination module 310 is configured to determine the acquisition angle difference between two adjacent images based on a preset acquisition angle and a preset number of images.
[0093] The determining module 320 is configured to determine the acquisition interval time of the image acquisition device and the target rotation speed of the turntable based on the acquisition angle difference, so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference.
[0094] The image acquisition module 330 is configured to control the turntable to rotate based on the target rotation speed, and to control the image acquisition device to continuously acquire images of the object to be photographed according to the acquisition interval time, so as to obtain the preset number of acquired images.
[0095] In one embodiment, the angle difference determination module 310 includes:
[0096] The preset image quantity determination unit is configured to determine the preset image quantity based on the distance between the image acquisition device and the object to be photographed, the interpupillary distance between the two eyes, and the preset acquisition angle.
[0097] In one embodiment, the determining module 320 includes:
[0098] The first acquisition time determination unit is configured to determine the acquisition time required for the acquisition angle to reach the preset acquisition angle based on the acquisition angle difference and the acquisition interval of the image acquisition device.
[0099] The first rotation time determination unit is set to determine the rotation time required for the turntable to rotate one revolution based on the preset acquisition angle and the 360° angle.
[0100] The target rotation speed determination unit is set to determine the target rotation speed of the turntable based on the rotation time required for the turntable to rotate one revolution.
[0101] Alternatively, module 320 may include:
[0102] The second rotation time determination unit is configured to determine the rotation time required for the turntable to rotate one revolution based on the target rotation speed of the turntable.
[0103] The second acquisition time determination unit is configured to determine the acquisition time required for the turntable to reach a preset acquisition angle based on the rotation time required for the turntable to rotate one revolution.
[0104] The acquisition interval time determination unit is configured to determine the acquisition interval time of the image acquisition device based on the acquisition time required for the acquisition angle of the turntable to reach the preset acquisition angle and the acquisition angle difference.
[0105] In one embodiment, it further includes:
[0106] The preset image quantity determination unit is configured to determine the left and right eye parallax angles based on the distance between the image acquisition device and the object to be photographed, and the interpupillary distance; and to determine the preset image quantity based on the ratio of the preset acquisition angle to the left and right eye parallax angles.
[0107] In one embodiment, it further includes:
[0108] The data acquisition time determination unit is configured to determine the acquisition time required for the acquisition angle to reach the preset acquisition angle based on the following formula:
[0109]
[0110] Where T′ is the acquisition time required to reach the preset acquisition angle, θ′ is the preset acquisition angle, α is the acquisition angle difference, and T is the acquisition interval time.
[0111] In one embodiment, the device further includes:
[0112] The target image selection module is configured to select a target image from the acquired images based on the difference in acquisition angles and a preset viewpoint.
[0113] The multi-view image construction module is configured to construct a multi-view image based on the target image.
[0114] In one embodiment, the target image selection module is further configured to select the two acquired images as target images in response to the difference in the acquisition angle of any two acquired images among the multiple acquired images corresponding to the viewing angle range of the preset viewpoint satisfying the left and right eye parallax angle.
[0115] The above-mentioned products can perform the methods provided in the embodiments of this application, and have the corresponding functional modules and beneficial effects of performing the methods.
[0116] Example 4
[0117] Figure 8 This is a schematic diagram of the structure of an electronic device according to Embodiment 4 of this application. Figure 8 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present application is shown. Figure 8 The electronic device 12 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0118] like Figure 8 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, system memory (or RAM) 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0119] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MCA) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0120] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0121] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 8 Not shown; usually referred to as a "hard drive"). Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a CD-ROM (Compact Disc Read-Only Memory), DVD-ROM (Digital Versatile Disc Read-Only Memory), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.
[0122] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this application.
[0123] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, in this embodiment, electronic device 12 and display 24 are not separate entities, but are embedded in a mirror, so that when the display surface of display 24 is not displayed, the display surface of display 24 and the mirror surface visually blend together. Moreover, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. Figure 8 As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems.
[0124] Processing unit 16 executes various functional applications and data processing by running programs stored in system memory 28, such as implementing the image acquisition method provided in the embodiments of this application:
[0125] Based on the preset acquisition angle and the preset number of images, determine the acquisition angle difference for acquiring two adjacent images;
[0126] Based on the acquisition angle difference, the acquisition interval time of the image acquisition device and the target rotation speed of the turntable are determined so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference.
[0127] Based on the target rotation speed, the turntable is controlled to rotate, and the image acquisition device is controlled to continuously acquire images of the object to be photographed according to the acquisition interval time, so as to obtain the preset number of acquired images.
[0128] Example 5
[0129] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the image acquisition method provided in all embodiments of this application.
[0130] Based on the preset acquisition angle and the preset number of images, determine the acquisition angle difference for acquiring two adjacent images;
[0131] Based on the acquisition angle difference, the acquisition interval time of the image acquisition device and the target rotation speed of the turntable are determined so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference.
[0132] Based on the target rotation speed, the turntable is controlled to rotate, and the image acquisition device is controlled to continuously acquire images of the object to be photographed according to the acquisition interval time, so as to obtain the preset number of acquired images.
[0133] The storage medium can be a non-transitory storage medium.
[0134] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0135] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0136] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF (Radio Frequency), etc., or any suitable combination thereof.
[0137] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0138] This application provides an image acquisition method, device, electronic device, and medium, which can use the image acquisition device to acquire multi-view images of objects, thereby providing image materials for the production of 3D (3-dimensional) content at a lower cost.
[0139] The above are merely some embodiments and technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the appended claims.
Claims
1. An image acquisition method, wherein an object to be photographed is placed on a turntable, an image acquisition device is located on one side of the turntable, the image acquisition device is used to acquire images of the object to be photographed on the turntable, the method comprising: Based on the preset acquisition angle and the preset number of images, determine the acquisition angle difference for acquiring two adjacent images; Based on the acquisition angle difference and the acquisition interval of the image acquisition device, the target rotation speed of the turntable is determined so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval is consistent with the acquisition angle difference. Alternatively, the acquisition interval of the image acquisition device can be determined based on the acquisition angle difference and the target rotation speed of the turntable, so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval is consistent with the acquisition angle difference. Based on the target rotation speed, the turntable is controlled to rotate, and the image acquisition device is controlled to continuously acquire images of the object to be photographed according to the acquisition interval time, obtaining the preset number of acquired images; wherein, the preset number of images is determined based on the distance between the image acquisition device and the object to be photographed, the interpupillary distance, and the preset acquisition angle, including: determining the left and right eye parallax angles based on the distance between the image acquisition device and the object to be photographed and the interpupillary distance; when the angle of rotation of the object to be photographed is equal to the left and right eye parallax angles, the image acquisition device presses the shutter once to obtain one image, and when the object to be photographed completes the rotation of the preset acquisition angle, the theoretical number of images is obtained, and the angle difference between two adjacent shutter times is equal to the left and right eye parallax angles; the preset number of images is greater than or equal to the theoretical number of images. After obtaining the preset number of acquired images, a target image is selected from the acquired images based on the difference in acquisition angles and a preset viewpoint; including: in response to the difference in acquisition angles between two acquired images existing in the multiple acquired images corresponding to the viewing angle range of the preset viewpoint satisfying the left and right eye parallax angles, the two acquired images are taken as target images. Constructing a multi-view image based on the target image includes: stitching together the target image obtained from each preset viewpoint to obtain a viewpoint image corresponding to the preset viewpoint, and then constructing a multi-view image based on the viewpoint images of each preset viewpoint. The step of stitching together the target images obtained from each preset viewpoint to obtain the corresponding preset viewpoint perspective image includes: when the turntable rotates clockwise from a top-down angle (i.e., the turntable rotates from right to left relative to the image acquisition device), the target image acquired first at the corresponding preset viewpoint is used as the left-eye image and the target image acquired later is used as the right-eye image, and they are stitched together in left-right order; when the turntable rotates counterclockwise from a top-down angle (i.e., the turntable rotates from left to right relative to the image acquisition device), the target image acquired first at the corresponding preset viewpoint is used as the right-eye image and the target image acquired later is used as the left-eye image, and they are stitched together in left-right order.
2. The method according to claim 1, wherein, Determining the target rotational speed of the turntable based on the acquisition angle difference and the acquisition interval of the image acquisition device includes: determining the acquisition time required to reach a preset acquisition angle based on the acquisition angle difference and the acquisition interval of the image acquisition device; determining the rotation time required for the turntable to rotate one revolution based on the preset acquisition angle and a 360° angle; and determining the target rotational speed of the turntable based on the rotation time required for the turntable to rotate one revolution; or... The acquisition interval of the image acquisition device is determined based on the acquisition angle difference and the target rotation speed of the turntable, including: determining the rotation time required for the turntable to rotate one revolution based on the target rotation speed of the turntable; determining the acquisition time required for the turntable to reach a preset acquisition angle based on the rotation time required for the turntable to rotate one revolution; and determining the acquisition interval of the image acquisition device based on the acquisition time required for the turntable to reach the preset acquisition angle and the acquisition angle difference.
3. The method according to claim 2, wherein, Based on the difference in acquisition angles and the acquisition interval of the image acquisition device, determine the acquisition time required to reach the preset acquisition angle, including: The acquisition time required to reach the preset acquisition angle is determined using the following formula: in, The time required for the acquisition angle to reach the preset acquisition angle. To preset the acquisition angle, The difference in the angle is denoted as , and T is the sampling interval.
4. An image acquisition device, comprising: The angle difference determination module is configured to determine the angle difference between two adjacent images based on a preset acquisition angle and a preset number of images. The determining module is configured to determine the target rotation speed of the turntable based on the acquisition angle difference and the acquisition interval time of the image acquisition device, so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval time is consistent with the acquisition angle difference. Alternatively, the acquisition interval of the image acquisition device can be determined based on the acquisition angle difference and the target rotation speed of the turntable, so that the angle through which the turntable rotates at the target rotation speed within the acquisition interval is consistent with the acquisition angle difference. The image acquisition module is configured to control the turntable to rotate based on the target rotation speed, and to control the image acquisition device to continuously acquire images of the object to be photographed according to the acquisition interval time, thereby obtaining the preset number of acquired images; wherein, the object to be photographed is placed on the turntable, the image acquisition device is located on one side of the turntable, and the image acquisition device is used to acquire images of the object to be photographed on the turntable. The angle difference determination module includes: a preset image quantity determination unit, configured to determine the preset image quantity based on the distance between the image acquisition device and the object to be photographed, the interpupillary distance, and the preset acquisition angle; including: determining the left and right eye parallax angles based on the distance between the image acquisition device and the object to be photographed, and the interpupillary distance; when the angle of rotation of the object to be photographed is equal to the left and right eye parallax angles, the image acquisition device presses the shutter once to obtain one image; when the object to be photographed completes the rotation of the preset acquisition angle, the theoretical number of images is obtained, and the angle difference between two adjacent shutter speeds is equal to the left and right eye parallax angles; the preset image quantity is greater than or equal to the theoretical image quantity; The target image selection module is configured to select a target image from the acquired images based on the difference in acquisition angles and a preset viewpoint; including: in response to the fact that the difference in acquisition angles of any two acquired images in the multiple acquired images corresponding to the viewing angle range of the preset viewpoint satisfies the left and right eye parallax angles, the two acquired images are selected as target images. The multi-view image construction module is configured to construct a multi-view image based on the target image; including: stitching together the target image obtained from each preset viewpoint to obtain a viewpoint image corresponding to the preset viewpoint, and then constructing a multi-view image based on the viewpoint image of each preset viewpoint. The step of stitching together the target images obtained from each preset viewpoint to obtain the corresponding preset viewpoint perspective image includes: when the turntable rotates clockwise from a top-down angle (i.e., the turntable rotates from right to left relative to the image acquisition device), the target image acquired first at the corresponding preset viewpoint is used as the left-eye image and the target image acquired later is used as the right-eye image, and they are stitched together in left-right order; when the turntable rotates counterclockwise from a top-down angle (i.e., the turntable rotates from left to right relative to the image acquisition device), the target image acquired first at the corresponding preset viewpoint is used as the right-eye image and the target image acquired later is used as the left-eye image, and they are stitched together in left-right order.
5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the image acquisition method as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the image acquisition method as described in any one of claims 1-3.