Base map determination method and device based on video, equipment and medium
By extracting images with high similarity as base maps in high-resolution videos, the problem that low-resolution videos cannot generate high-quality base maps is solved, achieving clearer display effects and resource savings.
Patent Information
- Application Number
- CN202410905489.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-19
AI Technical Summary
The prior art cannot generate high-quality base maps when analyzing low-resolution videos, resulting in limited display effects.
By acquiring images in high-resolution videos corresponding to low-resolution videos, and extracting images with high similarity as base maps based on the target time point, achieving high-resolution conversion of low-resolution images.
Use selected low-resolution images to extract images with high-resolution videos to generate clearer and higher-quality basemaps, improving presentation effects and saving resources.
Smart Images

Figure CN118984415A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of video processing technology, and in particular to a method, device, equipment and medium for determining a background map based on a video. Background Art
[0002] With the continuous development of video processing technology, video analysis can be used to generate cover images, poster images, etc. by intercepting video frames. Since video image analysis of ultra-high-definition resolution (such as 4K resolution) videos requires a huge amount of resources, in order to save resources, related technologies usually analyze low-resolution (such as 1080P resolution) videos and select images as the base images of cover images and poster images. As a result, the resolution of the base image is limited by the low resolution of the video, and a clearer and higher-quality base image cannot be generated, which affects the display effect. Summary of the invention
[0003] In order to solve the above technical problems, the present disclosure provides a video-based background map determination method, device, equipment and medium.
[0004] The present disclosure provides a method for determining a base map based on a video, the method comprising:
[0005] Acquire a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video;
[0006] Determining a first target time point of the first image in the first video;
[0007] extracting a second image from the second video based on the first target time point, and determining a target image based on the second image;
[0008] The target image is determined as a base image for generating a preset image of the first video and / or the second video.
[0009] The present disclosure also provides a video-based base map determination device, the device comprising:
[0010] An acquisition module, used to acquire a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video;
[0011] A time module, used to determine a first target time point of the first image in the first video;
[0012] an extraction module, configured to extract a second image from the second video based on the first target time point, and determine a target image based on the second image;
[0013] A determination module is used to determine the target image as a base image for generating a preset image of the first video and / or the second video.
[0014] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the video-based background map determination method provided in the embodiment of the present disclosure.
[0015] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the video-based base map determination method provided in the embodiment of the present disclosure.
[0016] Compared with the prior art, the technical solution provided by the embodiment of the present disclosure has the following advantages: the video-based base map determination solution provided by the embodiment of the present disclosure obtains a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video; determines a first target time point of the first image in the first video; extracts a second image in the second video based on the first target time point, and determines a target image based on the second image; and determines the target image as a base map for generating a preset image of the first video and / or the second video. By adopting the above technical solution, for the first image, based on its time point in the first video with a lower resolution, a second image can be extracted in a second video with a higher resolution, and a target image can be determined based on the second image, and the target image can be determined as a base map for the preset image, thereby realizing the use of a selected low-resolution image to output a high-resolution image through similarity conversion, generating a base map of a clearer and higher-quality desired image with very little resource usage, and improving the display effect of the preset image generated based on the base map. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0018] Figure 1 A schematic diagram of a flow chart of a method for determining a base map based on a video provided in an embodiment of the present disclosure;
[0019] Figure 2 A schematic flow chart of another method for determining a base map based on video provided in an embodiment of the present disclosure;
[0020] Figure 3 A schematic diagram of a video processing process provided by an embodiment of the present disclosure;
[0021] Figure 4 A schematic diagram of the structure of a video-based background map determination device provided in an embodiment of the present disclosure;
[0022] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0025] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0026] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0027] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0029] In order to solve the technical problem that low-resolution video analysis cannot output a high-quality base map, the embodiments of the present disclosure provide a base map determination method based on video, which is introduced below in conjunction with specific embodiments.
[0030] Figure 1 The present invention provides a flowchart of a method for determining a background image based on a video, which can be performed by a device for determining a background image based on a video, wherein the device can be implemented by software and / or hardware, and can generally be integrated in an electronic device. Figure 1 As shown, the method includes:
[0031] Step 101: Acquire a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video.
[0032] Among them, the first image can be an image selected from a low-resolution video. For example, the first image can be a cover image or a poster image output by cutting out frames of a low-resolution video. The number of first images can be one or more, which is determined according to the actual image selection requirements. The video-based base map determination method of the disclosed embodiment needs to output a high-resolution image corresponding to the first image. The first video can be a low-resolution video where the first image is located. For example, the first video can be a video with a 1080P resolution. The second video can be a video with an ultra-high-definition resolution corresponding to the first image. For example, the second video can be a video with a 4K resolution. The first video and the second video can be two videos with different resolutions corresponding to the same video content. The resolution of the second video is greater than that of the first video, and the difference in resolution between the second video and the first video is large.
[0033] In some embodiments, obtaining the first image may include: extracting frames from the first video based on a preset algorithm to obtain the first image. The preset algorithm may be determined according to actual needs, such as an object recognition algorithm. The video-based background map determination device may obtain the first video and input it into a preset algorithm to filter one or more video frames and output them as one or more first images, and may download a second video corresponding to the first image for subsequent use.
[0034] Step 102: Determine a first target time point of a first image in a first video.
[0035] The first target time point may be a time point corresponding to the first image as a video frame in the first video. After acquiring the first image, the video-based background map determination device may determine the time point of the first video according to the image name or image identifier of the first image, where the image name is a name for the first image and the image identifier may be an identifier that uniquely represents the first image.
[0036] Step 103: extract a second image from the second video based on the first target time point, and determine a target image based on the second image.
[0037] The second image may be an image extracted from the second video according to the first target time point, and the number of the second images may be one or more, and the specific number may be determined according to actual conditions. The target image may be an image with a high resolution corresponding to the first image in the second video, or may be an image with the highest similarity to the first image, and the number of the target images is the same as the number of the first images.
[0038] For example, Figure 2 A flowchart of another video processing method provided by an embodiment of the present disclosure is provided. In a feasible implementation, extracting a second image from a second video based on a first target time point, and determining a target image based on the second image may include the following steps:
[0039] Step 201: Determine a second target time point in a second video that corresponds to the first target time point.
[0040] The second target time point can be the specific time point corresponding to the first target time point in the second video. When the second video and the first video only differ in resolution but have the same frame rate, the time point in the second video that is the same as the first target time point can be directly determined as the second target time point. When the second video and the first video have different resolutions and frame rates, the time point in the second video corresponding to the first target time point can be determined as the second target time point based on the frame rate change relationship between the first video and the second video.
[0041] Step 202: extract a plurality of second images in a preset time range around a second target time point in the second video.
[0042] The preset time range can be a time period for extracting the second image from the second video. The preset time range may include a frame extraction start time point and a frame extraction end time point. The frame extraction start time point may be a time point that shifts the target time point forward by a preset offset time. The frame extraction end time point may be a time point that shifts the target time point backward by a preset offset time. The time period between the frame extraction start time point and the frame extraction end time point is the time period for specifically performing the frame extraction operation, that is, the above-mentioned preset time range.
[0043] In some embodiments, extracting multiple second images in a second video within a preset time range around a second target time point may include: determining a frame extraction start time point and a frame extraction end time point in the preset time range based on the second target time point and a preset offset time; extracting frames of the second video at a preset frame extraction frequency from the frame extraction start time point until the frame extraction end time point is stopped, and determining the extracted multiple video frames as multiple second images.
[0044] The preset offset time may be a specific time for shifting forward and backward from the target time point when extracting frames from the second video. The preset offset time may be set according to actual conditions, for example, the preset offset time may be 100ms. The preset frame extraction frequency may be the number of video frames extracted from the second video per second. In the embodiment of the present disclosure, the operation of extracting video frames from a video is referred to as frame extraction. The preset frame extraction frequency may be set according to actual conditions, for example, the preset frame extraction frequency may be set to extract 8 frames per second.
[0045] The video-based base map determination device offsets the second target time point of the second video forward by a preset offset time to obtain a frame extraction start time point, and offsets the second target time point of the second video backward by a preset offset time to obtain a frame extraction end time point; for the second video, a frame extraction operation can be performed starting from the frame extraction start time point, specifically according to a preset frame extraction frequency, until frame extraction is stopped at the frame extraction end time point, to obtain a plurality of extracted video frames, and a plurality of second images are determined by the extracted plurality of video frames.
[0046] In the above scheme, the number of video frames extracted from the second video around the second target time point can be controlled according to the preset time offset and the preset frame extraction frequency, and the preset time offset and the preset frame extraction frequency can be dynamically changed according to actual conditions to improve the flexibility of frame extraction.
[0047] Step 203: Determine a target image among the plurality of second images based on the similarity comparison results between the first image and each second image.
[0048] The similarity comparison result may include a sum of multiple similarities between the first image and the multiple second images.
[0049] In some embodiments, based on the similarity comparison results between the first image and each second image, determining the target image among the plurality of second images may include: compressing the size of each second image to a target size, wherein the target size is the size of the first image; using a similarity algorithm to determine the similarity between the first image and each compressed second image, and extracting the second image whose similarity is greater than a similarity threshold as the target image. Optionally, extracting the second image whose similarity is greater than the similarity threshold as the target image includes: extracting the second image whose similarity is greater than the similarity threshold and has the greatest similarity as the target image.
[0050] The similarity algorithm can be set according to actual conditions. For example, the similarity algorithm can be a structural similarity index (SSIM) algorithm, which can be an indicator for measuring the similarity between two images, especially for comparing two different versions of an image, such as the similarity between an original image and an image that has been compressed or otherwise processed. The similarity threshold can be a minimum threshold of similarity pre-set for the first image and the second image of this solution.
[0051] When determining a target image from a plurality of second images, a video-based background map determination device may first compress the size of each second image to a target size to achieve the same size as the first image, and then use a similarity algorithm to calculate the similarity between the first image and each compressed second image; extract any uncompressed second image whose similarity is greater than a similarity threshold as the target image, or, if multiple second images whose similarity is greater than a similarity threshold are extracted, determine the uncompressed second image with the greatest similarity as the target image.
[0052] Optionally, when the maximum similarities between the first image and each compressed second image are not greater than the similarity threshold, it means that the second video may be wrong, and the higher-resolution image corresponding to the first image cannot be obtained in the second video. The preset offset time can be adjusted to return to execute step 202 or re-acquire a new second video to execute step 103.
[0053] In another feasible implementation, extracting a second image from a second video based on a first target time point, and determining a target image based on the second image may include: determining a second target time point in the second video corresponding to the first target time point; determining a video frame corresponding to the second target time point in the second video as the second image, and determining the second image as the target image. The second target time point may be a specific time point in the second video corresponding to the first target time point, and the determination method is as described in the above embodiment. When determining a target image, a video-based base map determination device may directly determine a video frame corresponding to the second target time point as the second image after determining the second target time point in the second video corresponding to the first target time point, and then determine the second image as the target image.
[0054] Step 104: determine the target image as a base image for generating a preset image of the first video and / or the second video.
[0055] The preset image may be an image corresponding to the specific business requirements of the first video and / or the second video, for example, the preset image may include a cover image and / or a poster image of the first video and / or the second video. The base image may be a basic image for generating the preset image, and other required elements may be superimposed on the base image to generate the preset image after providing background information.
[0056] After determining the target image, the video-based background image determination device can determine the target image as the background image, and generate a preset image of the first video and / or the second video based on the background image, and the specific generation method is not limited. Since the target image is a high-resolution image, the resolution of the preset image generated when the target image is used as the background image is improved.
[0057] The video-based base map determination scheme provided by the disclosed embodiment obtains a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video; determines a first target time point of the first image in the first video; extracts a second image in the second video based on the first target time point, and determines a target image based on the second image; and determines the target image as a base map for generating a preset image of the first video and / or the second video. By adopting the above technical scheme, for the first image, based on its time point in the first video with a lower resolution, a second image can be extracted in a second video with a higher resolution, and a target image can be determined based on the second image, and the target image can be determined as a base map for the preset image, thereby realizing the use of a selected low-resolution image to output a high-resolution image through similarity conversion, generating a base map of a clearer and higher-quality desired image with minimal resource usage, and improving the display effect of the preset image generated based on the base map.
[0058] In some embodiments, the video-based base map determination method may further include: determining whether the aspect ratio of the target image is the same as that of the first image; if so, mapping the original target position information of the first image to the target image to obtain the first target position information, and outputting the target image and the first target position information; otherwise, performing target recognition on the target image to determine the second target position information, and outputting the target image and the second target position information. Optionally, target recognition includes at least one of face recognition, target object recognition, and text recognition.
[0059] Among them, the aspect ratio can be the ratio between the width and height of an image. Target recognition can be the recognition of a target object in an image. In the embodiment of the present disclosure, target recognition can include at least one of face recognition, target object recognition and text recognition. The target object can include at least one of face, target object and text. The original target position information can be the position information of the target object obtained by performing target recognition on the first image. The first target position information can be the position information of the target object in the target image obtained by mapping the size change relationship between the original target position information, the first image and the target image. The second target position information can be the position information of the target object obtained by performing target recognition on the target image.
[0060] After determining the target image, the video-based background map determination device can determine whether the aspect ratio of the target image is the same as that of the first image. If they are the same, there is no need to perform target recognition on the target image, and the original target position information of the first image is mapped with the target image to obtain the first target position information, and the target image and the first target position information are output; if they are different, target recognition is performed on the target image to obtain the second target position information, and the target image and the second target position information are output.
[0061] Optionally, when the coordinates of the target image are different from those of the first image, the coordinates of the target image can be transformed to be the same as those of the first image. For example, when the coordinates of the first image are per thousand coordinates and the coordinates of the target image are absolute value coordinates, each coordinate value of the target image can be divided by the width and height of the first image to obtain the per thousand coordinates. This is only an example.
[0062] In the above scheme, after determining a target image with a higher resolution, when the aspect ratio changes, target recognition can be performed again to obtain target position information of the target image, which is beneficial for subsequent further processing based on the target image.
[0063] In some embodiments, the video-based base map determination method may further include: packaging the target image so that the image format and image name of the packaged target image are the same as those of the first image. The video-based base map determination device may package the target image, including converting its image format into a preset format, determining its name as a preset name, the preset format being the image format of the first image, and the preset name being the image name of the first image, which is beneficial to subsequent image applications.
[0064] Next, the video-based base map determination method of the embodiment of the present disclosure is further described by a specific example. Figure 3 A schematic diagram of a video processing process provided by an embodiment of the present disclosure is shown in FIG. Figure 3As shown, taking the second video as a 4K resolution video as an example, the first image output based on the 1080P resolution video can be converted to output a 4K resolution target image. The specific process may include: downloading the second video; extracting frames from the second video, obtaining the first target time point of the first image in the first video according to the image name of the first image, and determining the second target time point corresponding to the first target time point in the second video, determining the frame extraction start time point and the frame extraction end time point according to the second target time point, starting frame extraction from the frame extraction start time point of the second video and stopping at the frame extraction end time point, and extracting multiple second images; determining the target image according to the similarity, and determining the second image in sequence. The similarity between each extracted second image and the first image is calculated, and the second image with the greatest similarity and a similarity greater than the similarity threshold is extracted as the target image. Here, before calculating the similarity, each second image can be compressed to the same size as the first image. When there are multiple first images, the above steps are executed repeatedly to determine the corresponding target image; determine whether the aspect ratio of the target image is the same as that of the first image. If so, perform packaging processing on the target image; otherwise, perform target recognition on the target image and then perform packaging processing; the image format and image name of the target image after packaging processing are the same as those of the first image, and it is disguised as the output image.
[0065] The frame extraction start time point and the frame extraction end time point are determined according to the second target time point and the preset time offset, and the number of the plurality of second images extracted can be controlled by the preset frame extraction frequency during frame extraction; and the similarity threshold can be determined according to actual needs. In the case where there are already selected image results for 1080P resolution videos, by adding an image conversion module, data can be reused to improve the quality of the selected images, thereby avoiding the waste of computing resources and saving production time.
[0066] This solution adds an image conversion module after selecting an image from the video. The image conversion module uses a similarity algorithm to find the image most similar to the output image in the high-resolution video, and identifies and disguises it as the result of the original algorithm output and sends it to the subsequent process. With very little development and resource usage, the quality of the selected output image can be improved to generate a high-definition base map, and then high-quality preset images, such as cover images or poster images, can be generated based on the base map.
[0067] Figure 4 A schematic structural diagram of a video-based background map determination device provided in an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated into an electronic device.
[0068] like Figure 4 As shown, the device comprises:
[0069] An acquisition module 401 is used to acquire a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video;
[0070] A time module 402 is used to determine a first target time point of the first image in the first video;
[0071] An extraction module 403, configured to extract a second image from the second video based on the first target time point, and determine a target image based on the second image;
[0072] The determination module 404 is used to determine the target image as a base image for generating a preset image of the first video and / or the second video.
[0073] Optionally, the extraction module 403 includes:
[0074] A first unit is used to determine a second target time point in the second video corresponding to the first target time point;
[0075] A second unit is used to extract a plurality of second images in a preset time range around the second target time point in the second video;
[0076] The third unit is used to determine a target image among the plurality of second images based on a similarity comparison result between the first image and each of the second images.
[0077] Optionally, the preset time range includes a frame extraction start time point and a frame extraction end time point, and the second unit is used to:
[0078] Determine the frame extraction start time point and the frame extraction end time point in the preset time range based on the second target time point and the preset offset time;
[0079] The second video is subjected to frame extraction at a preset frame extraction frequency from the frame extraction start time point until the frame extraction end time point, and the extracted multiple video frames are determined as multiple second images.
[0080] Optionally, the extraction module 403 is used to:
[0081] Determining a second target time point in the second video corresponding to the first target time point;
[0082] The video frame corresponding to the second target time point in the second video is determined as the second image, and the second image is determined as the target image.
[0083] Optionally, the third unit is used for:
[0084] compressing the size of each of the second images to a target size, wherein the target size is the size of the first image;
[0085] The similarity between the first image and each compressed second image is determined by using a similarity algorithm, and the second image with a similarity greater than a similarity threshold is extracted as a target image.
[0086] Optionally, the third unit is specifically used for:
[0087] A second image with a similarity greater than a similarity threshold and the greatest similarity is extracted as a target image.
[0088] Optionally, the device further includes a judgment module, configured to:
[0089] Determine whether the aspect ratio of the target image is the same as that of the first image, and if so, map the original target position information of the first image to the target image to obtain first target position information, and output the target image and the first target position information;
[0090] Otherwise, target recognition is performed on the target image to determine second target position information, and the target image and the second target position information are output.
[0091] Optionally, the target recognition includes at least one of face recognition, target object recognition and text recognition.
[0092] The video-based background map determination device provided in the embodiments of the present disclosure can execute the video-based background map determination method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0093] The embodiments of the present disclosure also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the video-based background map determination method provided by any embodiment of the present disclosure.
[0094] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure. The electronic device 500 in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0095] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0096] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0097] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the video-based base map determination method of the embodiment of the present disclosure are executed.
[0098] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0099] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0100] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0101] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video; determines a first target time point of the first image in the first video; extracts a second image in the second video based on the first target time point, and determines a target image based on the second image; and determines the target image as a base map for generating a preset image for the first video and / or the second video.
[0102] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate 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 a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0103] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0104] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0105] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0106] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0107] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0108] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.
[0109] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0110] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for determining a base map based on video, characterized in that: include: Acquire a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video; Determining a first target time point of the first image in the first video; extracting a second image from the second video based on the first target time point, and determining a target image based on the second image; The target image is determined as a base image for generating a preset image of the first video and / or the second video.
2. The method according to claim 1, characterized in that Extracting a second image from the second video based on the first target time point, and determining a target image based on the second image, including: Determining a second target time point in the second video corresponding to the first target time point; Extracting a plurality of second images in a preset time range around the second target time point in the second video; Based on the similarity comparison results between the first image and each of the second images, a target image among the plurality of second images is determined.
3. The method according to claim 2, characterized in that The preset time range includes a frame extraction start time point and a frame extraction end time point, and extracting a plurality of second images in the second video within a preset time range around the second target time point includes: Determine the frame extraction start time point and the frame extraction end time point in the preset time range based on the second target time point and the preset offset time; The second video is subjected to frame extraction at a preset frame extraction frequency from the frame extraction start time point until the frame extraction end time point, and the extracted multiple video frames are determined as multiple second images.
4. The method according to claim 1, characterized in that: Extracting a second image from the second video based on the first target time point, and determining a target image based on the second image, including: Determining a second target time point in the second video corresponding to the first target time point; The video frame corresponding to the second target time point in the second video is determined as the second image, and the second image is determined as the target image.
5. The method according to claim 2, characterized in that: Determining a target image among the plurality of second images based on similarity comparison results between the first image and each of the second images, comprises: compressing the size of each of the second images to a target size, wherein the target size is the size of the first image; The similarity between the first image and each compressed second image is determined by using a similarity algorithm, and the second image with a similarity greater than a similarity threshold is extracted as a target image.
6. The method according to claim 5, characterized in that The step of extracting a second image having a similarity greater than a similarity threshold as a target image comprises: A second image with a similarity greater than a similarity threshold and the greatest similarity is extracted as a target image.
7. The method according to claim 1, characterized in that The method further comprises: Determine whether the aspect ratio of the target image is the same as that of the first image, and if so, map the original target position information of the first image to the target image to obtain first target position information, and output the target image and the first target position information; Otherwise, target recognition is performed on the target image to determine second target position information, and the target image and the second target position information are output.
8. The method according to claim 7, characterized in that The target recognition includes at least one of face recognition, target object recognition and text recognition.
9. A video-based base map determination device, characterized in that: include: An acquisition module, used to acquire a first image and a first video and a second video corresponding to the first image, wherein the resolution of the second video is greater than that of the first video; A time module, used to determine a first target time point of the first image in the first video; an extraction module, configured to extract a second image from the second video based on the first target time point, and determine a target image based on the second image; A determination module is used to determine the target image as a base image for generating a preset image of the first video and / or the second video.
10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the video-based base map determination method described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the video-based base map determination method described in any one of claims 1-8.
