CN110703973A - Image cropping method and device - Google Patents

Image cropping method and device Download PDF

Info

Publication number
CN110703973A
CN110703973A CN201910942445.4A CN201910942445A CN110703973A CN 110703973 A CN110703973 A CN 110703973A CN 201910942445 A CN201910942445 A CN 201910942445A CN 110703973 A CN110703973 A CN 110703973A
Authority
CN
China
Prior art keywords
area
image
preset
cutting
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910942445.4A
Other languages
Chinese (zh)
Other versions
CN110703973B (en
Inventor
谷保震
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201910942445.4A priority Critical patent/CN110703973B/en
Publication of CN110703973A publication Critical patent/CN110703973A/en
Application granted granted Critical
Publication of CN110703973B publication Critical patent/CN110703973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04803Split screen, i.e. subdividing the display area or the window area into separate subareas
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04804Transparency, e.g. transparent or translucent windows

Abstract

The application discloses an image cropping method and device, wherein the method comprises the following steps: acquiring an image cutting request, wherein the cutting request comprises a first image to be processed; displaying a first image in a first area of a preset canvas, wherein the preset canvas comprises the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, and the display priority of the second area is higher than that of the first area; when an image cutting instruction is obtained, adjusting the distribution mode of the first area and the second area in a preset canvas according to a cutting area in the cutting instruction; when the image generation instruction is acquired, a second image is generated according to a picture in a target area, wherein the target area is a partial area which is not covered by the second area in the first area. Therefore, the image editing mode with low learning cost and high efficiency is realized, and the local editing requirement on the image is flexibly met by cutting the image.

Description

Image cropping method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an image cropping method and apparatus.
Background
Images are widely used in daily production and life of users as information recording media, and along with the wide use of videos, the demand for editing based on images is also becoming more diversified.
In the related art, the image is edited by accessing the open source database of the third party, however, the method of editing the image by introducing the open source database of the third party requires the user to learn the open source database of the third party to master the editing method, which results in higher learning cost. In addition, in the prior art, when the image is edited, the original image is edited on the basis of the whole image, so that the flexibility is low.
Disclosure of Invention
The application provides an image clipping method and device, and aims to solve the problems that in the prior art, the cost for editing an image is high, and the editing flexibility is low due to the fact that the image is edited in a whole page.
The embodiment of the application provides an image clipping method, which comprises the following steps: acquiring an image cutting request, wherein the cutting request comprises a first image to be processed; displaying the first image in a first area of a preset canvas, wherein the preset canvas comprises the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, and the display priority of the second area is higher than that of the first area; when an image cutting instruction is obtained, according to a cutting area in the cutting instruction, adjusting the distribution mode of the first area and the second area in the preset canvas; when an image generation instruction is acquired, a second image is generated according to a picture in a target area, wherein the target area is a partial area which is not covered by the second area in the first area.
In addition, the image cropping method of the embodiment of the application further comprises the following additional technical features:
in a possible implementation manner of the present application, after the obtaining of the image cropping instruction, the method further includes: and adjusting the transparency of the second area to be within a preset range so as to enable the second area to be a semitransparent area. In a possible implementation manner of the present application, the cropping request includes a plurality of consecutive first image sequences; after the image generation instruction is obtained, the method further comprises the following steps: sequentially intercepting the pictures displayed in the target area according to a first preset time interval; and sequentially synthesizing the pictures according to the intercepting sequence of the pictures to generate a second image sequence after the pictures are cut, wherein the playing time of each image in the second image sequence is the first preset time.
In a possible implementation manner of the present application, before sequentially capturing the pictures displayed in the target area according to a first preset time interval, the method further includes: controlling the first image sequence to be played at a preset speed, wherein the preset speed is less than the original playing speed of the first image sequence; the intercepting the picture displayed in the target area comprises the following steps: and intercepting the picture displayed in the target area according to a second preset time interval, wherein the second preset time interval is longer than the first preset time interval.
In a possible implementation manner of the present application, after the obtaining of the image generation instruction, the method further includes:
judging whether the generating instruction contains cutting starting time or not; and if not, controlling the first image sequence to be displayed in the first area from the starting image frame.
In a possible implementation manner of the present application, the second region is an annular region, and the first region is located in an annulus of the second region; or, the second region includes two sub-regions located at both sides of the first region.
Another embodiment of the present application provides an image cropping device, including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an image cutting request, and the cutting request comprises a first image to be processed; the display module is used for displaying the first image in a first area of a preset canvas, wherein the preset canvas comprises the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, and the display priority of the second area is higher than that of the first area; the adjusting module is used for adjusting the distribution mode of the first area and the second area in the preset canvas according to the cutting area in the cutting instruction when the image cutting instruction is obtained; and the generating module is used for generating a second image according to a picture in a target area when an image generating instruction is acquired, wherein the target area is a partial area which is not covered by the second area in the first area.
In addition, the image cropping device of the embodiment of the application further comprises the following additional technical features:
in a possible implementation manner of the present application, the adjusting module is further configured to: after the image cutting instruction is obtained, the transparency of the second area is adjusted to be within a preset range, so that the second area is a semi-transparent area.
In a possible implementation manner of the present application, the cropping request includes a plurality of consecutive first image sequences; the generation module is specifically configured to: sequentially intercepting the pictures displayed in the target area according to a first preset time interval; and sequentially synthesizing the pictures according to the intercepting sequence of the pictures to generate a second image sequence after the pictures are cut, wherein the playing time of each image in the second image sequence is the first preset time.
In one possible implementation manner of the present application, the method further includes: the playing module is used for controlling the first image sequence to be played at a preset speed before sequentially intercepting the pictures displayed in the target area according to a first preset time interval, wherein the preset speed is smaller than the original playing speed of the first image sequence; the generation module is specifically configured to: and intercepting the picture displayed in the target area according to a second preset time interval, wherein the second preset time interval is longer than the first preset time interval.
In a possible implementation manner of the present application, the display module is further configured to: after the image generation instruction is obtained, judging whether the generation instruction contains a cutting starting time, and controlling the first image sequence to be displayed in the first area from a starting image frame when the cutting starting time is not contained.
In another embodiment of the present application, an electronic device is provided, which includes a memory and a processor, where the memory stores computer-readable instructions, and the instructions, when executed by the processor, cause the processor to execute the image cropping method according to the above embodiment of the present application.
Yet another embodiment of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the image cropping method according to the above embodiment of the present application.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
the method comprises the steps of obtaining an image cutting request, displaying a first image in a first area of a preset canvas, wherein the preset canvas comprises the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, the display priority of the second area is higher than that of the first area, when an image cutting instruction is obtained, the distribution mode of the first area and the second area in the preset canvas is adjusted according to the cutting area in the cutting instruction, and finally, when an image generating instruction is obtained, a second image is generated according to a picture in a target area, wherein the target area is a partial area which is not covered by the second area in the first area. Therefore, the image editing mode with low learning cost and high efficiency is realized, and the local editing requirement on the image is flexibly met by cutting the image.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of an image cropping method according to one embodiment of the present application;
FIG. 2 is a schematic diagram of a scene where an image cropping request is sent according to an embodiment of the present application; (ii) a
FIG. 3 is a schematic view of a first region and a second region distribution according to one embodiment of the present application;
FIG. 4 is a schematic view of a first region and a second region distribution according to another embodiment of the present application;
FIG. 5 is a schematic diagram of an application scenario of image cropping according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an image cropping device according to one embodiment of the present application;
FIG. 7 is a schematic diagram of an image cropping device according to another embodiment of the present application; and
FIG. 8 is a schematic structural diagram of an electronic device according to one embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
An image cropping method and apparatus of an embodiment of the present application are described below with reference to the drawings.
The execution main body of the image cropping method in the embodiment of the application can be a device with an image processor, such as a mobile phone, a tablet computer, a personal digital assistant and a wearable device, and the wearable device can be an intelligent bracelet, an intelligent watch and intelligent glasses.
Fig. 1 is a flowchart of an image cropping method according to an embodiment of the present application, as shown in fig. 1, the method comprising:
step 101, obtaining an image cutting request, wherein the cutting request includes a first image to be processed.
The first image to be processed may be an independent image in a single album or multiple albums, etc., or may be a certain frame or multiple frames of images in a video, and when multiple frames of images in the video are processed, the video may be generated according to the processed images, so as to meet the related requirements in the scene. Such as video-based dynamic wallpaper settings, etc.
It should be noted that, in different application scenarios, the manner of obtaining the video character adding request is different, and the following example is illustrated:
the first example:
in this example, the user sends the image cropping request in a voice manner.
Specifically, after the user selects the first image, the sound pickup device collects the voice data of the user, and when a keyword such as "image cropping" is recognized in the collected voice data of the user, an image cropping request for the selected first image is acquired.
The second example is:
in this example, the user sends the image cropping request in the form of an action.
Specifically, after a first image is selected by a user, a gesture action or a facial expression action of the user is acquired through a camera, a touch screen or the like, the acquired action is matched with a preset action, and if the matching is successful, an image cutting request of the user for the first image is acquired.
Of course, in this example, the manner in which the user selects the first image may also be determined according to the motion, and is not described here again.
In this example, as shown in fig. 2, a selection control, a cropping menu, and the like are provided on the image interface, and the user may trigger the selection control of the first image to select the first image, and further, the sending of the image cropping request is realized by triggering the cropping menu.
Step 102, displaying a first image in a first area of a preset canvas, wherein the preset canvas comprises the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, and the display priority of the second area is higher than that of the first area.
In particular, considering that in some application scenarios, when a user edits a first image, there is a need to crop the image, for example, the user only wants to keep a part of the character image in the image, etc., in order to meet the personalized needs of the user, in one embodiment of the present application, a region is divided in a preset canvas to clip a picture by distribution of regions, and particularly, in the present embodiment, the preset canvas includes a first region and a second region, wherein, the number of the first area and the second area can be set arbitrarily, the first area is a transparent area, the second area is a non-transparent area, and the display priority of the second area is higher than that of the first area, that is, and after the image is moved from the first area to the second area, displaying a non-transparent picture of the second area instead of displaying a corresponding picture, and displaying the first image in the first area of the preset canvas.
Step 103, when the image clipping instruction is obtained, adjusting the distribution mode of the first area and the second area in the preset canvas according to the clipping area in the clipping instruction.
And 104, when the image generation instruction is acquired, generating a second image according to a picture in a target area, wherein the target area is a partial area which is not covered by the second area in the first area.
Specifically, when the acquisition instruction is acquired, the distribution mode of the first area and the second area in the preset canvas is adjusted according to the cutting area in the cutting instruction, that is, the area outside the cutting area in the first area is covered by the second area, and the picture in the second area is not displayed any more, so that the cutting operation of the related picture is realized.
Of course, in this embodiment, in order to more intuitively show the cut-out area to the user, the transparency of the second area may be adjusted to be within the preset range, so that the second area is a semi-transparent area, as shown in fig. 3, in the second area, the user may see a specific cut-out image, which is convenient for the user to further adjust the cut-out area.
The triggering mode of the cutting instruction can be implemented through a touch screen action track or through a selection operation of transferring a cutting area selection tool. The cutting area may be an annular area, the first area is located in the ring of the second area, or the second area includes two sub-areas located on two sides of the first area, and the like.
In addition, in different application scenarios, the distribution modes of the first area and the second area in the preset canvas are adjusted to be different according to the clipping area in the clipping instruction, as a possible implementation mode, when the number and the distribution modes of the second area and the first area are as shown in fig. 3, the moving operation of the user on the image in the first area can be received, when the user moves the image in the first area left and right, the image can be clipped, and all the images shielded by the second area are equivalent to being clipped.
As another possible implementation manner, when the number and the distribution manner of the second areas and the first areas are as shown in fig. 4, the second areas can be covered in the images of the corresponding first areas through a drag operation on the second areas, and all the images blocked by the second areas are equivalent to being cropped.
As a further possible implementation manner, a cropping control and a cropping effect of the corresponding cropping control are displayed in a preset canvas, as shown in FIG. 5, an original image is displayed in a current canvas, the corresponding cropping control-375.0/667.0 and 375.0/812.0 three image sizes are displayed below the original image (with the size of 500.0/812.0), and when the original image is selected by a user to 375.0/812.0, the current image is covered by calling a white second area according to 375.0/812.0, so that the current image is displayed to 375.0/812.0 size, with continued reference to FIG. 5.
Further, after the image generation instruction is obtained, a second image may be generated from a screen in a target area, where the target area is a partial area of the first area that is not covered by the second area, and the target area further satisfies an image portion that a user wants to cut, where a trigger mode of the target area may be selected by the user based on a touch trajectory, or may be selected by invoking a selection tool, for example, the user inputs a touch trajectory along an outline of a person in the first area, and may select an area where the person is located as the target area. In addition, the image generation instruction may be triggered by voice, or may be triggered by clicking a corresponding image generation control, which is not described herein again.
As mentioned in the above embodiments, the image editing method in the present application can be used in video, and of course, can also be used in multiple images, thereby realizing personalized cropping of the image stream.
In an embodiment of the application, the cropping request includes a plurality of continuous first image sequences, the first image sequences may be derived from a plurality of images, or may be derived from continuous reading frames in a video, and the frames displayed in the target region are sequentially captured according to a first preset time interval, where the first preset time interval may be calibrated according to experimental data, and in order to ensure the integrity of captured frames, when the first image sequences are derived from the video, the first preset time interval may also be consistent with an original playing rate of the video.
However, when the screenshot is derived, the speed of storing the screenshot is usually slower than the screenshot speed, and if the screenshot speed is not slowed down, the cached screenshot pictures may be more and more, and finally, the memory may overflow.
Therefore, in an embodiment of the present application, the first image sequence may be further controlled to be played at a preset rate, where the preset rate is smaller than the original playing rate of the first image sequence, that is, when the edited picture is exported, the first image sequence is synchronously slowed down, for example, the preset rate is changed to one third of the original playing rate, thereby facilitating the screenshot operation of the displayed picture. And further, pictures displayed in the target area are intercepted according to a second preset time interval, wherein the second preset time interval is longer than the first preset time interval, the second preset time interval can be determined according to the storage speed, and every frame of picture is deleted in the cache, so that the memory overflow is avoided.
Further, specifically, according to the capturing order of each screen, the screens are sequentially subjected to synthesis processing, such as stitching processing, and a second image sequence after clipping is generated, where the playing time of each image in the second image sequence is a first preset time.
Of course, in order to further meet the personalized clipping requirement of the user, it may be further determined whether the generation instruction includes a clipping start time, if the clipping start time is included, the first image sequence is played from the start time, and is directly positioned to the image that the user wants to clip, and if the clipping start time is not included, the first image sequence is controlled to be displayed in the first area from the start image frame.
Therefore, the above embodiment implements clipping and editing of the images according to the visualization operation in the preset canvas, the synthesized second image sequence can be used for recording life fragments, dynamically publishing in social software, applying dynamic wallpaper, and the like, and the clipping operation does not depend on the learning and integration of codes any more.
To sum up, the image cropping method according to the embodiment of the application obtains an image cropping request, displays a first image in a first area of a preset canvas, where the preset canvas includes the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, and a display priority of the second area is higher than a display priority of the first area, adjusts a distribution manner of the first area and the second area in the preset canvas according to the cropping area in the cropping instruction when the image cropping instruction is obtained, and finally generates a second image according to a picture in a target area when the image generating instruction is obtained, where the target area is a partial area in the first area that is not covered by the second area. Therefore, the image editing mode with low learning cost and high efficiency is realized, and the local editing requirement on the image is flexibly met by cutting the image.
In order to implement the above embodiments, the present application further provides an image cropping device.
Fig. 6 is a schematic structural diagram of an image cropping device according to an embodiment of the present application, as shown in fig. 6, the device comprising: an acquisition module 100, a display module 200, an adjustment module 300, and a generation module 400, wherein,
the obtaining module 100 is configured to obtain an image cropping request, where the cropping request includes a first image to be processed.
The display module 200 is configured to display a first image in a first area of a preset canvas, where the preset canvas includes the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, and a display priority of the second area is higher than a display priority of the first area.
The adjusting module 300 is configured to, when the image clipping instruction is obtained, adjust a distribution manner of the first area and the second area in the preset canvas according to a clipping area in the clipping instruction.
The generating module 400 is configured to generate a second image according to a picture in a target area when an image generation instruction is acquired, where the target area is a partial area of the first area that is not covered by the second area.
In an embodiment of the present application, the adjusting module 300 is further configured to:
after the image cutting instruction is acquired, the transparency of the second area is adjusted to be within a preset range, so that the second area is a semi-transparent area.
In one embodiment of the present application, the cropping request includes a plurality of consecutive first image sequences; the generating module 400 is specifically configured to:
sequentially intercepting the pictures displayed in the target area according to a first preset time interval;
and sequentially synthesizing the pictures according to the intercepting sequence of the pictures to generate a second image sequence after the pictures are cut, wherein the playing time of each image in the second image sequence is a first preset time.
In this embodiment, as shown in fig. 7, on the basis of fig. 6, the apparatus further includes: the playing module 500, where the playing module 500 is configured to control the first image sequence to be played at a preset rate before sequentially capturing the pictures displayed in the target area according to a first preset time interval, where the preset rate is smaller than an original playing rate of the first image sequence.
In this embodiment, the generating module 400 is configured to intercept the picture displayed in the target area according to a second preset time interval, where the second preset time interval is longer than the first preset time interval.
In one embodiment of the present application, the display module 200 is further configured to: after the image generation instruction is acquired, whether the generation instruction contains the cutting starting time or not is judged, and the first image sequence is controlled to be displayed in the first area from the starting image frame when the cutting starting time is not contained.
It should be noted that the foregoing explanation of the embodiment of the image cropping method is also applicable to the view image cropping device of the embodiment, and is not repeated herein.
To sum up, the image cropping device according to the embodiment of the application obtains an image cropping request, displays a first image in a first region of a preset canvas, where the preset canvas includes the first region and a second region, the first region is a transparent region, the second region is a non-transparent region, and a display priority of the second region is higher than a display priority of the first region, adjusts a distribution manner of the first region and the second region in the preset canvas according to the cropping region in the cropping instruction when the image cropping instruction is obtained, and finally generates a second image according to a picture in a target region when the image generating instruction is obtained, where the target region is a partial region in the first region that is not covered by the second region. Therefore, the image editing mode with low learning cost and high efficiency is realized, and the local editing requirement on the image is flexibly met by cutting the image.
In order to implement the foregoing embodiments, an electronic device is further provided in an embodiment of the present application, including a processor and a memory;
wherein the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, for implementing the image cropping method as described in the above embodiments.
FIG. 8 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present application. The electronic device 12 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in FIG. 8, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
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. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only memory (CD-ROM), a Digital versatile disk Read Only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by 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 that are configured to carry out the functions of embodiments of the application.
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 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet) via the Network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, 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 systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing, for example, implementing the methods mentioned in the foregoing embodiments, by executing programs stored in the system memory 28.
In order to implement the above embodiments, the present application also proposes a non-transitory computer-readable storage medium on which a computer program is stored, which when executed by a processor implements the image cropping method as described in the above embodiments.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. An image cropping method, comprising:
acquiring an image cutting request, wherein the cutting request comprises a first image to be processed;
displaying the first image in a first area of a preset canvas, wherein the preset canvas comprises the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, and the display priority of the second area is higher than that of the first area;
when an image cutting instruction is obtained, according to a cutting area in the cutting instruction, adjusting the distribution mode of the first area and the second area in the preset canvas;
when an image generation instruction is acquired, a second image is generated according to a picture in a target area, wherein the target area is a partial area which is not covered by the second area in the first area.
2. The method of claim 1, wherein after said obtaining image cropping instructions, further comprising:
and adjusting the transparency of the second area to be within a preset range so as to enable the second area to be a semitransparent area.
3. The method of claim 1, wherein the cropping request includes a plurality of consecutive first image sequences;
after the image generation instruction is obtained, the method further comprises the following steps:
sequentially intercepting the pictures displayed in the target area according to a first preset time interval;
and sequentially synthesizing the pictures according to the intercepting sequence of the pictures to generate a second image sequence after the pictures are cut, wherein the playing time of each image in the second image sequence is the first preset time.
4. The method as claimed in claim 3, wherein before sequentially intercepting the frames displayed in the target area at a first preset time interval, further comprising:
controlling the first image sequence to be played at a preset speed, wherein the preset speed is less than the original playing speed of the first image sequence;
the intercepting the picture displayed in the target area comprises the following steps:
and intercepting the picture displayed in the target area according to a second preset time interval, wherein the second preset time interval is longer than the first preset time interval.
5. The method of claim 3, wherein after the obtaining the image generation instruction, further comprising:
judging whether the generating instruction contains cutting starting time or not;
and if not, controlling the first image sequence to be displayed in the first area from the starting image frame.
6. The method of any one of claims 1 to 5,
the second area is an annular area, and the first area is positioned in the ring shape of the second area;
alternatively, the first and second electrodes may be,
the second region includes two sub-regions located on both sides of the first region.
7. An image cropping device, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring an image cutting request, and the cutting request comprises a first image to be processed;
the display module is used for displaying the first image in a first area of a preset canvas, wherein the preset canvas comprises the first area and a second area, the first area is a transparent area, the second area is a non-transparent area, and the display priority of the second area is higher than that of the first area;
the adjusting module is used for adjusting the distribution mode of the first area and the second area in the preset canvas according to the cutting area in the cutting instruction when the image cutting instruction is obtained;
and the generating module is used for generating a second image according to a picture in a target area when an image generating instruction is acquired, wherein the target area is a partial area which is not covered by the second area in the first area.
8. The apparatus of claim 7, wherein the adjustment module is further configured to:
after the image cutting instruction is obtained, the transparency of the second area is adjusted to be within a preset range, so that the second area is a semi-transparent area.
9. The apparatus of claim 7, wherein the cropping request includes a plurality of consecutive first sequences of images;
the generation module is specifically configured to:
sequentially intercepting the pictures displayed in the target area according to a first preset time interval;
and sequentially synthesizing the pictures according to the intercepting sequence of the pictures to generate a second image sequence after the pictures are cut, wherein the playing time of each image in the second image sequence is the first preset time.
10. The apparatus of claim 9, further comprising:
the playing module is used for controlling the first image sequence to be played at a preset speed before sequentially intercepting the pictures displayed in the target area according to a first preset time interval, wherein the preset speed is smaller than the original playing speed of the first image sequence;
the generation module is specifically configured to:
and intercepting the picture displayed in the target area according to a second preset time interval, wherein the second preset time interval is longer than the first preset time interval.
CN201910942445.4A 2019-09-30 2019-09-30 Image cropping method and device Active CN110703973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910942445.4A CN110703973B (en) 2019-09-30 2019-09-30 Image cropping method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910942445.4A CN110703973B (en) 2019-09-30 2019-09-30 Image cropping method and device

Publications (2)

Publication Number Publication Date
CN110703973A true CN110703973A (en) 2020-01-17
CN110703973B CN110703973B (en) 2021-04-23

Family

ID=69196474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910942445.4A Active CN110703973B (en) 2019-09-30 2019-09-30 Image cropping method and device

Country Status (1)

Country Link
CN (1) CN110703973B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114463358A (en) * 2022-01-30 2022-05-10 深圳创维-Rgb电子有限公司 Screen projection display method and device, electronic equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484855A (en) * 2014-12-24 2015-04-01 北京奇虎科技有限公司 Method and device for cropping pictures
CN104574256A (en) * 2013-10-23 2015-04-29 腾讯科技(深圳)有限公司 Method and device for locally selecting and processing image
CN105094599A (en) * 2015-06-29 2015-11-25 北京金山安全软件有限公司 Picture clipping method and device and terminal
CN105225197A (en) * 2015-09-14 2016-01-06 北京金山安全软件有限公司 Picture clipping method and device
CN106651757A (en) * 2016-12-02 2017-05-10 天脉聚源(北京)传媒科技有限公司 Method and device for cutting picture
US20180025533A1 (en) * 2016-07-22 2018-01-25 Canon Kabushiki Kaisha Image processing apparatus for determining image clip position, method thereof, and storage medium
WO2018053033A1 (en) * 2016-09-15 2018-03-22 Picadipity, Inc. Automatic image display systems and methods with looped autoscrolling and static viewing modes

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574256A (en) * 2013-10-23 2015-04-29 腾讯科技(深圳)有限公司 Method and device for locally selecting and processing image
CN104484855A (en) * 2014-12-24 2015-04-01 北京奇虎科技有限公司 Method and device for cropping pictures
CN105094599A (en) * 2015-06-29 2015-11-25 北京金山安全软件有限公司 Picture clipping method and device and terminal
CN105225197A (en) * 2015-09-14 2016-01-06 北京金山安全软件有限公司 Picture clipping method and device
US20180025533A1 (en) * 2016-07-22 2018-01-25 Canon Kabushiki Kaisha Image processing apparatus for determining image clip position, method thereof, and storage medium
WO2018053033A1 (en) * 2016-09-15 2018-03-22 Picadipity, Inc. Automatic image display systems and methods with looped autoscrolling and static viewing modes
CN106651757A (en) * 2016-12-02 2017-05-10 天脉聚源(北京)传媒科技有限公司 Method and device for cutting picture

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114463358A (en) * 2022-01-30 2022-05-10 深圳创维-Rgb电子有限公司 Screen projection display method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN110703973B (en) 2021-04-23

Similar Documents

Publication Publication Date Title
DK180679B1 (en) USER INTERFACES FOR RECEIVING AND HANDLING VISUAL MEDIA
CN110636365B (en) Video character adding method and device, electronic equipment and storage medium
US20230319394A1 (en) User interfaces for capturing and managing visual media
CN110868631B (en) Video editing method, device, terminal and storage medium
KR102192091B1 (en) User interfaces for capturing and managing visual media
CN110572717A (en) Video editing method and device
KR20210020987A (en) User interfaces for capturing and managing visual media
CN112954199B (en) Video recording method and device
WO2023151611A1 (en) Video recording method and apparatus, and electronic device
CN106101526A (en) Screen recording method and device
US20230326110A1 (en) Method, apparatus, device and media for publishing video
CN112035195A (en) Application interface display method and device, electronic equipment and storage medium
CN110377220B (en) Instruction response method and device, storage medium and electronic equipment
CN110703973B (en) Image cropping method and device
CN111679772B (en) Screen recording method and system, multi-screen device and readable storage medium
WO2024041514A1 (en) Video playing method and apparatus, and electronic device
CN113301356A (en) Method and device for controlling video display
KR20150096175A (en) Time line adjustment method for video edition and video editing apparatus
CN115460448A (en) Media resource editing method and device, electronic equipment and storage medium
CN114025237A (en) Video generation method and device and electronic equipment
CN110662104B (en) Video dragging bar generation method and device, electronic equipment and storage medium
CN113923392A (en) Video recording method, video recording device and electronic equipment
CN114302009A (en) Video processing method, video processing device, electronic equipment and medium
CN111190523A (en) Interface processing method, terminal and computer readable storage medium
KR20150083475A (en) Media editing method and device using the touch input

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant