CN115049544A - Picture processing method and device and computer readable storage medium - Google Patents

Picture processing method and device and computer readable storage medium Download PDF

Info

Publication number
CN115049544A
CN115049544A CN202110255194.XA CN202110255194A CN115049544A CN 115049544 A CN115049544 A CN 115049544A CN 202110255194 A CN202110255194 A CN 202110255194A CN 115049544 A CN115049544 A CN 115049544A
Authority
CN
China
Prior art keywords
processing
picture
target picture
target
critical path
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.)
Pending
Application number
CN202110255194.XA
Other languages
Chinese (zh)
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.)
Shanghai Qwik Smart Technology Co Ltd
Original Assignee
Shanghai Qwik Smart Technology 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 Shanghai Qwik Smart Technology Co Ltd filed Critical Shanghai Qwik Smart Technology Co Ltd
Priority to CN202110255194.XA priority Critical patent/CN115049544A/en
Publication of CN115049544A publication Critical patent/CN115049544A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Circuits (AREA)

Abstract

本发明提供一种图片的处理方法,方法包括如下步骤:获取目标图片对应的处理信息,处理信息包括缩略图和预设系数;响应于对缩略图的操作指令,根据预设系数缩放与操作指令对应的第一关键路径,生成与目标图片对应的第二关键路径;根据第二关键路径对目标图片进行处理,以获得处理后的目标图片。本发明还公开了一种视频数据的处理设备和计算机可读存储介质。该图片的处理方法、设备及计算机可读存储介质能够利用对缩略图进行图片处理实现对目标图片进行图片处理,从而使得终端在图片处理过程中所占用的堆内存较少,进而节省了对堆内存的使用,提高了交互响应的速度,有效防止在图片处理过程中出现OOM异常。

Figure 202110255194

The present invention provides a method for processing pictures. The method includes the following steps: acquiring processing information corresponding to a target picture, where the processing information includes a thumbnail image and a preset coefficient; in response to an operation instruction on the thumbnail image, scaling and operating instructions according to the preset coefficient A second critical path corresponding to the target image is generated corresponding to the first critical path; the target image is processed according to the second critical path to obtain a processed target image. The invention also discloses a video data processing device and a computer-readable storage medium. The picture processing method, device and computer-readable storage medium can realize picture processing of target pictures by performing picture processing on thumbnails, so that the terminal occupies less heap memory during the picture processing process, thereby saving heap memory usage. The use of memory improves the speed of interactive response and effectively prevents OOM exceptions during image processing.

Figure 202110255194

Description

一种图片的处理方法、设备及计算机可读存储介质A picture processing method, device and computer-readable storage medium

技术领域technical field

本发明涉及图片处理技术领域,特别是涉及一种图片的处理方法、设备及计算机可读存储介质。The present invention relates to the technical field of picture processing, and in particular, to a picture processing method, device and computer-readable storage medium.

背景技术Background technique

随着科技发展的不断进步,图片像素越来越高,从而图片大小也是日益增大,而图片的大小在对图片进行处理中是一个不可忽略的因素。With the continuous advancement of science and technology, the pixels of pictures are getting higher and higher, so the size of pictures is also increasing, and the size of pictures is a factor that cannot be ignored in the processing of pictures.

目前,终端在遇到各种需要图片处理的场景时,通常会借用一些成熟的底层技术比如ffmpeg来处理图像的裁剪、旋转、合成等。但是,在这些终端进行图片处理时,需要读入整张原图数据或需要合成的所有图片数据,使得堆内存的使用过多,且在加载图片过程中消耗了极大的时间,影响交互响应的速度。At present, when the terminal encounters various scenes that require image processing, it usually borrows some mature underlying technologies such as ffmpeg to process image cropping, rotation, and synthesis. However, when these terminals perform image processing, it is necessary to read in the entire original image data or all image data that needs to be synthesized, which makes the use of heap memory too much, and consumes a lot of time in the process of loading images, which affects the interactive response. speed.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种图片的处理方法、设备及计算机可读存储介质,利用对缩略图进行图片处理实现对目标图片进行图片处理,解决了图片处理过程中堆内存占用过多的问题。The purpose of the present invention is to provide a picture processing method, device and computer-readable storage medium, which can realize picture processing of target pictures by performing picture processing on thumbnails, and solve the problem of excessive heap memory occupation during picture processing.

具体地,本发明提供一种图片的处理方法,所述方法包括如下步骤:获取目标图片对应的处理信息,所述处理信息包括缩略图和预设系数;响应于对所述缩略图的操作指令,根据所述预设系数缩放与所述第一操作指令对应的第一关键路径,生成与所述目标图片对应的第二关键路径;根据所述第二关键路径对所述目标图片进行处理,以获得处理后的目标图片。Specifically, the present invention provides a picture processing method, the method includes the following steps: acquiring processing information corresponding to a target picture, the processing information including a thumbnail image and preset coefficients; responding to an operation instruction on the thumbnail image , scaling the first critical path corresponding to the first operation instruction according to the preset coefficient to generate a second critical path corresponding to the target picture; processing the target picture according to the second critical path, to obtain the processed target image.

具体地,本发明提供一种图片的处理方法,所述方法包括如下步骤:第一终端将目标图片对应的处理信息发送到第二终端,所述处理信息包括缩略图和预设系数;所述第二终端响应于对所述缩略图的操作指令,根据所述预设系数缩放与所述第一操作指令对应的第一关键路径,生成与所述目标图片对应的第二关键路径;所述第二终端根据所述第二关键路径对所述目标图片进行处理,以获得处理后的目标图片。Specifically, the present invention provides a method for processing pictures. The method includes the following steps: a first terminal sends processing information corresponding to a target picture to a second terminal, where the processing information includes thumbnail images and preset coefficients; the In response to the operation instruction on the thumbnail, the second terminal scales the first critical path corresponding to the first operation instruction according to the preset coefficient, and generates a second critical path corresponding to the target picture; the The second terminal processes the target picture according to the second critical path to obtain a processed target picture.

具体地,本发明提供一种视频数据的处理设备,所述设备包括:存储器及处理器;所述存储器用于存储计算机程序;所述处理器用于执行所述计算机程序以实现如上述的图片的处理方法的步骤。Specifically, the present invention provides a video data processing device, the device includes: a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to realize the above picture. The steps of the processing method.

具体地,本发明提供一种计算机可读存储介质,所述计算机存储介质上存储有计算机程序指令;所述计算机程序指令被处理器执行时实现如上述的图片的处理方法。Specifically, the present invention provides a computer-readable storage medium on which computer program instructions are stored; when the computer program instructions are executed by a processor, the above-mentioned image processing method is implemented.

本发明提供的一种图片的处理方法、设备及计算机可读存储介质能够通过获取目标图片对应的处理信息,处理信息包括缩略图和预设系数后,响应于对缩略图的操作指令,根据预设系数缩放操作指令,生成与目标图片对应的第二关键路径,且根据第二关键路径对目标图片进行处理,以获得处理后的目标图片,从而使得终端在图片处理过程中所占用的堆内存较少,进而节省了对堆内存的使用,提高了交互响应的速度,有效防止在图片处理过程中出现OOM异常。A picture processing method, device and computer-readable storage medium provided by the present invention can obtain processing information corresponding to a target picture, after the processing information includes a thumbnail image and preset coefficients, in response to an operation instruction on the thumbnail image, according to the preset Set a coefficient scaling operation instruction, generate a second critical path corresponding to the target image, and process the target image according to the second critical path to obtain the processed target image, thereby making the heap memory occupied by the terminal during the image processing process It saves the use of heap memory, improves the speed of interactive response, and effectively prevents OOM exceptions during image processing.

附图说明Description of drawings

图1为本发明一实施例提供的图片的处理方法的流程图;1 is a flowchart of a method for processing a picture provided by an embodiment of the present invention;

图2为本发明一实施例提供的图片的处理方法的部分流程图;2 is a partial flowchart of a method for processing a picture provided by an embodiment of the present invention;

图3为本发明一实施例提供的图片的处理方法中目标图片缩放为缩略图的示意图;3 is a schematic diagram of scaling a target picture into a thumbnail in a method for processing a picture provided by an embodiment of the present invention;

图4为本发明一实施例提供的图片的处理方法的部分流程图;4 is a partial flowchart of a method for processing a picture provided by an embodiment of the present invention;

图5为本发明一实施例提供的图片的处理方法中操作指令缩放为第二关键路径的示意图;5 is a schematic diagram of scaling an operation instruction to a second critical path in a method for processing a picture provided by an embodiment of the present invention;

图6为本发明一实施例提供的图片的处理方法的应用场景示意图;6 is a schematic diagram of an application scenario of a picture processing method provided by an embodiment of the present invention;

图7示出一种终端的结构框图;Fig. 7 shows a structural block diagram of a terminal;

图8为本发明一实施例提供的图片的处理方法的流程图;8 is a flowchart of a method for processing a picture provided by an embodiment of the present invention;

图9为本发明一实施例提供的图片的处理设备的结构示意图。FIG. 9 is a schematic structural diagram of a picture processing device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments.

基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

实施例一Example 1

本发明实施例提供一种图片的处理方法,图1为本发明一实施例所提供的图片的处理方法流程图。如图1所示,该方法包括如下步骤:An embodiment of the present invention provides a method for processing a picture, and FIG. 1 is a flowchart of a method for processing a picture provided by an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:

步骤110:获取目标图片对应的处理信息,处理信息包括缩略图和预设系数。Step 110: Obtain processing information corresponding to the target picture, where the processing information includes thumbnail images and preset coefficients.

具体地,处理信息可以但不限于是终端自身存储的信息,也可以是其他终端发送过来的信息。目标图片可以但不限于是需要进行图像处理的、大小正常、尺寸正常的图片。缩略图可以但不限于是基于正常图片,根据预设系数生成的图片。Specifically, the processing information may be, but is not limited to, information stored by the terminal itself, or may be information sent by other terminals. The target picture can be, but is not limited to, a picture of normal size and size that needs to be processed. Thumbnails can be, but are not limited to, pictures generated based on normal pictures and according to preset coefficients.

在一实施方式中,如图2所示,获取目标图片对应的处理信息,处理信息包括缩略图和预设系数的步骤之前包括:In one embodiment, as shown in FIG. 2 , the processing information corresponding to the target picture is obtained, and the processing information includes thumbnail images and preset coefficients before the steps include:

步骤210:获取目标图片;Step 210: obtain the target image;

步骤220:保持目标图片的高宽比例不变,根据预设系数生成与目标图片对应的缩略图。Step 220: Keep the aspect ratio of the target picture unchanged, and generate a thumbnail corresponding to the target picture according to a preset coefficient.

具体地,获取目标图片可以但不限于是向终端自身进行获取,也可以是向其他终端进行获取。在保持目标图片的高宽比不变的情况下,根据预设系数生成与该目标图片对应的缩略图。其中,预设系数可以但不限于是用户自己设定,也可以根据终端内存大小自动生成。预设系数是用于生成与目标图片对应的缩略图的参考值,该缩略图显示在操作区域相比于目标图片所占堆内存较低。缩略图的高宽尺寸等于与缩略图对应的目标图片的高宽尺寸/该预设系数。例如,如图3所示,正常图片31的高宽分别为H1、W1,根据预设系数S缩放以后,缩略图32的高宽分别为H2、W2。Specifically, the acquisition target picture may be acquired from but not limited to the terminal itself, and may also be acquired from other terminals. Under the condition that the aspect ratio of the target picture is kept unchanged, a thumbnail image corresponding to the target picture is generated according to the preset coefficient. The preset coefficient may be, but not limited to, be set by the user, and may also be automatically generated according to the size of the terminal memory. The preset coefficient is a reference value for generating a thumbnail image corresponding to the target image, and the thumbnail image displayed in the operation area occupies a lower heap memory than the target image. The height and width of the thumbnail is equal to the height and width of the target image corresponding to the thumbnail/the preset coefficient. For example, as shown in FIG. 3 , the height and width of the normal picture 31 are H1 and W1 respectively, and after scaling according to the preset coefficient S, the height and width of the thumbnail 32 are H2 and W2 respectively.

在一实施方式中,如图4所示,获取目标图片对应的处理信息,处理信息包括缩略图和预设系数的步骤之前包括:In one embodiment, as shown in FIG. 4 , the processing information corresponding to the target picture is obtained, and the processing information includes thumbnail images and preset coefficients before the steps include:

步骤410:检测自身的堆内存占用是否大于预定值;Step 410: Detect whether its own heap memory usage is greater than a predetermined value;

步骤420:若堆内存占用大于预定值,则执行获取目标图片对应的处理信息,处理信息包括缩略图和预设系数的步骤。Step 420: If the heap memory occupation is greater than the predetermined value, execute the step of acquiring processing information corresponding to the target picture, where the processing information includes thumbnail images and preset coefficients.

具体地,预定值可以但不限于是零,即只要检测到自身的堆内存有被占用,则执行获取目标图片对应的处理信息,处理信息包括缩略图和预设系数的步骤。预定值可以根据终端情况进行设定。Specifically, the predetermined value may be, but is not limited to, zero, that is, as long as it is detected that its own heap memory is occupied, the step of obtaining processing information corresponding to the target picture, where the processing information includes thumbnail images and preset coefficients, is performed. The predetermined value can be set according to terminal conditions.

步骤120:响应于对缩略图的操作指令,根据预设系数缩放与操作指令对应的第一关键路径,生成与目标图片对应的第二关键路径。Step 120: In response to the operation instruction on the thumbnail, scale the first critical path corresponding to the operation instruction according to a preset coefficient, and generate a second critical path corresponding to the target image.

具体地,在缩略图显示在操作区域的过程中,用户针对该缩略图进行的图片处理操作。操作指令可以但不限于是对缩略图进行裁剪、合成及旋转等。在一实施方式中,操作指令包括:对缩略图进行裁剪操作;和/或对缩略图进行合成操作;和/或对缩略图进行旋转操作。具体地,将与操作指令对应的第一关键路径按照预设系数进行计算,生成在目标图片上进行图片处理的第二关键路径。例如,如图5所示,若第一关键路径针对缩略图确定的裁剪或合成区域51的高宽分别为H3、W3,旋转角度A,相对于缩略图左上角顶点的相对坐标为(DX,DY),则根据预设系数生成的第二关键路径对确定的裁剪或合成区域52相对于目标图片的左上角顶点坐标为(DX*S,DY*S),高宽分别为H4=H3*S、W4=W3*S,并记录旋转角度A。旋转角度A可以但不限于等于零。Specifically, in the process of displaying the thumbnail in the operation area, the user performs a picture processing operation on the thumbnail. The operation instruction may be, but not limited to, cropping, compositing, and rotating the thumbnails. In one embodiment, the operation instruction includes: performing a cropping operation on the thumbnails; and/or performing a synthesizing operation on the thumbnails; and/or performing a rotation operation on the thumbnails. Specifically, the first critical path corresponding to the operation instruction is calculated according to the preset coefficients to generate the second critical path for image processing on the target image. For example, as shown in FIG. 5 , if the height and width of the cropping or compositing area 51 determined by the first critical path for the thumbnail are H3 and W3, respectively, and the rotation angle A, the relative coordinates with respect to the vertex of the upper left corner of the thumbnail are (DX, DY), then according to the second critical path generated by the preset coefficients, the coordinates of the upper left corner vertex of the determined cropping or synthesizing region 52 relative to the target picture are (DX*S, DY*S), and the height and width are respectively H4=H3* S, W4=W3*S, and the rotation angle A is recorded. The rotation angle A may be, but is not limited to, equal to zero.

步骤130:根据第二关键路径对目标图片进行处理,以获得处理后的目标图片。Step 130: Process the target picture according to the second critical path to obtain the processed target picture.

具体地,在生成上述第二关键路径后,则调用位图或ffmpeg对应的api进行处理,生成经过图像处理后的目标图片。若是裁剪操作,则执行确定了在目标图片上的裁剪区域后生成图片处理后的目标图片,则将该目标图片旋转角度A;若是合成操作,则将需要合入的图缩放到确定合成区域大小并旋转角度A,记录此步骤生成的位图为bm2,调用draw函数,先画原图bm1,再画bm2,将函数参数传入回放后的左上角坐标。在一实施方式中,根据第二关键路径对目标图片进行处理,以获得处理后的目标图片的步骤包括:通过底层库对目标图片进行处理,以使得堆内存得到节省。Specifically, after the above-mentioned second critical path is generated, the API corresponding to the bitmap or ffmpeg is called for processing, and the target image after image processing is generated. If it is a cropping operation, the target image after image processing is generated after the cropping area on the target image is determined, and the target image is rotated by the angle A; if it is a composite operation, the image that needs to be combined is scaled to determine the size of the composite area. And rotate the angle A, record the bitmap generated in this step as bm2, call the draw function, first draw the original image bm1, then draw bm2, and pass the function parameters into the coordinates of the upper left corner after playback. In one embodiment, the step of processing the target picture according to the second critical path to obtain the processed target picture includes: processing the target picture through an underlying library, so that heap memory is saved.

本申请实施例提供的一种图片的处理方法,通过获取目标图片对应的处理信息,处理信息包括缩略图和预设系数后,响应于对缩略图的操作指令,根据预设系数缩放与所述操作指令对应的第一关键路径,生成与目标图片对应的第二关键路径,且根据第二关键路径对目标图片进行处理,以获得处理后的目标图片,从而使得终端在图片处理过程中所占用的堆内存较少,进而节省了对堆内存的使用,提高了交互响应的速度,有效防止在图片处理过程中出现OOM异常。In a picture processing method provided by an embodiment of the present application, by acquiring processing information corresponding to a target picture, the processing information includes a thumbnail image and a preset coefficient, and in response to an operation instruction on the thumbnail image, scaling the image with the preset coefficient according to the preset coefficient The first critical path corresponding to the operation instruction, the second critical path corresponding to the target picture is generated, and the target picture is processed according to the second critical path to obtain the processed target picture, so that the terminal occupies the There is less heap memory, which saves the use of heap memory, improves the speed of interactive response, and effectively prevents OOM exceptions during image processing.

实施例二Embodiment 2

如图6所示,其提供了本发明一实施例提供的一种图片的处理方法的应用场景示意图,该应用场景包括第一终端61和第二终端62,第一终端61用于将目标图片对应的处理信息发送到第二终端62,处理信息包括缩略图和预设系数。第二终端62用于响应于对缩略图的操作指令,根据预设系数缩放与操作指令对应的第一关键路径,生成与目标图片对应的第二关键路径,并根据第二关键路径对目标图片进行处理,以获得处理后的目标图片。其中,根据第二关键路径对目标图片进行处理时,可以使用ffmpeg等基于C++实现的底层库来处理,从而使得终端在图片处理过程中所占用的堆内存较少,进而节省了对堆内存的使用,提高了交互响应的速度,有效防止在图片处理过程中出现OOM异常。As shown in FIG. 6, which provides a schematic diagram of an application scenario of a picture processing method provided by an embodiment of the present invention, the application scenario includes a first terminal 61 and a second terminal 62, and the first terminal 61 is used to convert the target image Corresponding processing information is sent to the second terminal 62, and the processing information includes thumbnail images and preset coefficients. The second terminal 62 is configured to, in response to an operation instruction on the thumbnail, scale the first critical path corresponding to the operation instruction according to a preset coefficient, generate a second critical path corresponding to the target picture, and perform an operation on the target image according to the second critical path. Processing is performed to obtain the processed target image. Among them, when the target image is processed according to the second key path, the underlying library based on C++ such as ffmpeg can be used for processing, so that the terminal occupies less heap memory during the image processing process, thereby saving the heap memory. Use, improve the speed of interactive response, effectively prevent OOM exceptions in the process of image processing.

在一实施例中,第一终端61可以为智能手机、平板电脑等,用于将目标图片对应的处理信息发送到第二终端62,处理信息包括缩略图和预设系数。In an embodiment, the first terminal 61 may be a smart phone, a tablet computer, etc., for sending processing information corresponding to the target picture to the second terminal 62, where the processing information includes thumbnail images and preset coefficients.

在一实施例中,第二终端62可以为智能手机、PC机(Personal Computer,个人计算机)、一体机、膝上型便携计算机等,用于响应于对缩略图的操作指令,根据预设系数缩放与操作指令对应的第一关键路径,生成与目标图片对应的第二关键路径,并根据第二关键路径对目标图片进行处理,以获得处理后的目标图片。In one embodiment, the second terminal 62 may be a smart phone, a PC (Personal Computer, personal computer), an all-in-one computer, a laptop computer, etc., for responding to an operation instruction on the thumbnail, according to a preset coefficient The first critical path corresponding to the operation instruction is scaled, a second critical path corresponding to the target image is generated, and the target image is processed according to the second critical path to obtain a processed target image.

图7示出了一种终端的结构框图。图7所示的结构可适用于第一终端61和第二终端62。如图7所示,终端10包括存储器102、存储控制器104,一个或多个(图中仅示出一个)处理器106、外设接口108、射频模块110、定位模块112、摄像模块114、音频模块116、屏幕118以及按键模块120。这些组件通过一条或多条通讯总线/信号线122相互通讯。FIG. 7 shows a structural block diagram of a terminal. The structure shown in FIG. 7 is applicable to the first terminal 61 and the second terminal 62 . As shown in FIG. 7 , the terminal 10 includes a memory 102, a storage controller 104, one or more (only one is shown in the figure) processor 106, a peripheral interface 108, a radio frequency module 110, a positioning module 112, a camera module 114, Audio module 116 , screen 118 and key module 120 . These components communicate with each other via one or more communication bus/signal lines 122 .

可以理解,图7所示的结构仅为示意,终端10还可包括比图7中所示更多或者更少的组件,或者具有与图7所示不同的配置。图7中所示的各组件可以采用硬件、软件或其组合实现。It can be understood that the structure shown in FIG. 7 is only for illustration, and the terminal 10 may further include more or less components than those shown in FIG. 7 , or have different configurations from those shown in FIG. 7 . Each component shown in FIG. 7 may be implemented in hardware, software, or a combination thereof.

存储器102可用于存储软件程序以及模块,如本发明实施例中的投屏的的连接方法对应的程序指令/模块,处理器106通过运行存储在存储控制器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的图片的处理方法。The memory 102 can be used to store software programs and modules, such as program instructions/modules corresponding to the connection method for screen projection in the embodiment of the present invention, and the processor 106 executes the software programs and modules stored in the storage controller 104 by running the software programs and modules. Various functional applications and data processing, that is, to realize the above-mentioned image processing method.

存储器102可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器102可进一步包括相对于处理器106远程设置的存储器,这些远程存储器可以通过网络连接至终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。处理器106以及其他可能的组件对存储器102的访问可在存储控制器104的控制下进行。The memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, memory 102 may further include memory located remotely from processor 106, which may be connected to terminal 10 through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. Access to memory 102 by processor 106 and possibly other components may be under the control of memory controller 104 .

外设接口108将各种输入/输入装置耦合至CPU以及存储器102。处理器106运行存储器102内的各种软件、指令以执行终端10的各种功能以及进行数据处理。A peripheral interface 108 couples various input/input devices to the CPU and memory 102 . The processor 106 executes various software and instructions within the memory 102 to perform various functions of the terminal 10 and perform data processing.

在一些实施例中,外设接口108,处理器106以及存储控制器104可以在单个芯片中实现。在其他一些实例中,他们可以分别由独立的芯片实现。In some embodiments, peripheral interface 108, processor 106, and memory controller 104 may be implemented in a single chip. In other instances, they may be implemented by separate chips.

射频模块110用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯。射频模块110可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。射频模块110可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。上述的无线网络可以使用各种通信标准、协议及技术,包括但并不限于全球移动通信系统(Global System for Mobile Communication,GSM)、增强型移动通信技术(Enhanced Data GSM Environment,EDGE),宽带码分多址技术(wideband code divisionmultiple access,W-CDMA),码分多址技术(Code division access,CDMA)、时分多址技术(time division multiple access,TDMA),蓝牙,无线保真技术(Wireless,Fidelity,WiFi)(如美国电气和电子工程师协会标准IEEE 802.11a,IEEE 802.11b,IEEE802.11g和/或IEEE802.11n)、网络电话(Voice over internet protocal,VoIP)、全球微波互联接入(Worldwide Interoperability for Microwave Access,Wi-Max)、其他用于邮件、即时通讯及短消息的协议,以及任何其他合适的通讯协议,甚至可包括那些当前仍未被开发出来的协议。The radio frequency module 110 is used for receiving and sending electromagnetic waves, realizing mutual conversion between electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The radio frequency module 110 may include various existing circuit elements for performing these functions, eg, antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, subscriber identity module (SIM) cards, memory, and the like. The radio frequency module 110 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices through a wireless network. The aforementioned wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. The above-mentioned wireless network can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Broadband Code Wideband code division multiple access (W-CDMA), code division multiple access (CDMA), time division multiple access (TDMA), Bluetooth, wireless fidelity technology (Wireless, Fidelity, WiFi) (such as American Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and/or IEEE802.11n), Internet telephony (Voice over internet protocal, VoIP), Worldwide Interoperability for Microwave Access (Worldwide Interoperability for Microwave Access, Wi-Max), other protocols for mail, instant messaging, and short messaging, and any other suitable communication protocols, even those that are not currently developed.

定位模块112用于获取终端10的当前位置。定位模块112的实例包括但不限于全球卫星定位系统(GPS)、基于无线局域网或者移动通信网的定位技术。The positioning module 112 is used to obtain the current position of the terminal 10 . Examples of the positioning module 112 include, but are not limited to, Global Positioning System (GPS), wireless local area network or mobile communication network based positioning technology.

摄像模块114用于拍摄照片或者视频。拍摄的照片或者视频可以存储至存储器102内,并可通过射频模块110发送。The camera module 114 is used for taking photos or videos. The photographed photos or videos can be stored in the memory 102 and can be sent through the radio frequency module 110 .

音频模块116向用户提供音频接口,其可包括一个或多个麦克风、一个或者多个扬声器以及音频电路。音频电路从外设接口108处接收声音数据,将声音数据转换为电信息,将电信息传输至扬声器。扬声器将电信息转换为人耳能听到的声波。音频电路还从麦克风处接收电信息,将电信号转换为声音数据,并将声音数据传输至外设接口108中以进行进一步的处理。音频数据可以从存储器102处或者通过射频模块110获取。此外,音频数据也可以存储至存储器102中或者通过射频模块110进行发送。在一些实例中,音频模块116还可包括一个耳机播孔,用于向耳机或者其他设备提供音频接口。Audio module 116 provides an audio interface to the user, which may include one or more microphones, one or more speakers, and audio circuitry. The audio circuit receives sound data from the peripheral interface 108, converts the sound data into electrical information, and transmits the electrical information to the speaker. Speakers convert electrical information into sound waves that the human ear can hear. The audio circuit also receives electrical information from the microphone, converts the electrical signal into sound data, and transmits the sound data to the peripheral interface 108 for further processing. Audio data may be obtained from memory 102 or through radio frequency module 110 . In addition, the audio data can also be stored in the memory 102 or transmitted through the radio frequency module 110 . In some instances, the audio module 116 may also include a headphone jack for providing an audio interface to headphones or other devices.

屏幕118在终端10与用户之间提供一个输出界面。具体地,屏幕118向用户显示视频输出,这些视频输出的内容可包括文字、图形、视频、及其任意组合。一些输出结果是对应于一些用户界面对象。可以理解的,屏幕118还可以包括触控屏幕。触控屏幕在终端10与用户之间同时提供一个输出及输入界面。除了向用户显示视频输出,触控屏幕还接收用户的输入,例如用户的点击、滑动等手势操作,以便用户界面对象对这些用户的输入做出响应。检测用户输入的技术可以是基于电阻式、电容式或者其他任意可能的触控检测技术。触控屏幕显示单元的具体实例包括但并不限于液晶显示器或发光聚合物显示器。Screen 118 provides an output interface between terminal 10 and the user. Specifically, the screen 118 displays video output to the user, the content of which may include text, graphics, video, and any combination thereof. Some output results correspond to some user interface objects. It can be understood that the screen 118 may also include a touch screen. The touch screen simultaneously provides an output and input interface between the terminal 10 and the user. In addition to displaying video output to the user, the touch screen also receives user input, such as the user's taps, swipes, and other gesture operations, so that user interface objects respond to these user inputs. The technology for detecting user input may be based on resistive, capacitive or any other possible touch detection technology. Specific examples of touch screen display units include, but are not limited to, liquid crystal displays or light emitting polymer displays.

按键模块120同样提供用户向终端10进行输入的接口,用户可以通过按下不同的按键以使终端10执行不同的功能。The key module 120 also provides an interface for the user to input to the terminal 10, and the user can press different keys to make the terminal 10 perform different functions.

本发明实施例提供一种图片的处理方法,图8为本发明一实施例所提供的图片的处理方法流程图。如图8所示,该方法包括如下步骤:An embodiment of the present invention provides a method for processing a picture, and FIG. 8 is a flowchart of the method for processing a picture provided by an embodiment of the present invention. As shown in Figure 8, the method includes the following steps:

步骤810:第一终端将目标图片对应的处理信息发送到第二终端,处理信息包括缩略图和预设系数。Step 810: The first terminal sends processing information corresponding to the target picture to the second terminal, where the processing information includes thumbnail images and preset coefficients.

具体地,处理信息可以但不限于是终端自身存储的信息,也可以是其他终端发送过来的信息。目标图片可以但不限于是需要进行图像处理的、大小正常、尺寸正常的图片。缩略图可以但不限于是基于正常图片,根据预设系数生成的图片。Specifically, the processing information may be, but is not limited to, information stored by the terminal itself, or may be information sent by other terminals. The target picture can be, but is not limited to, a picture of normal size and size that needs to be processed. Thumbnails can be, but are not limited to, pictures generated based on normal pictures and according to preset coefficients.

在一实施方式中,第一终端将目标图片对应的处理信息发送到第二终端,处理信息包括缩略图和预设系数的步骤之前包括:第一终端获取目标图片,并保持目标图片的高宽比例不变,根据预设系数生成与目标图片对应的缩略图。In one embodiment, the first terminal sends processing information corresponding to the target picture to the second terminal, and before the step of processing the information including the thumbnail image and the preset coefficients includes: the first terminal obtains the target picture, and maintains the height and width of the target picture. The ratio is unchanged, and the thumbnail corresponding to the target image is generated according to the preset coefficient.

具体地,获取目标图片可以但不限于是向终端自身进行获取,也可以是向其他终端进行获取。在保持目标图片的高宽比不变的情况下,根据预设系数生成与该目标图片对应的缩略图。其中,预设系数可以但不限于是用户自己设定,也可以根据终端内存大小自动生成。预设系数是用于生成与目标图片对应的缩略图的参考值,该缩略图显示在操作区域相比于目标图片所占堆内存较低。缩略图的高宽尺寸等于与缩略图对应的目标图片的高宽尺寸/该预设系数。例如,如图3所示,正常图片31的高宽分别为H1、W1,根据预设系数S缩放以后,缩略图32的高宽分别为H2、W2。Specifically, the acquisition target picture may be acquired from but not limited to the terminal itself, and may also be acquired from other terminals. Under the condition that the aspect ratio of the target picture is kept unchanged, a thumbnail image corresponding to the target picture is generated according to the preset coefficient. The preset coefficient may be, but not limited to, be set by the user, and may also be automatically generated according to the size of the terminal memory. The preset coefficient is a reference value for generating a thumbnail image corresponding to the target image, and the thumbnail image displayed in the operation area occupies a lower heap memory than the target image. The height and width of the thumbnail is equal to the height and width of the target image corresponding to the thumbnail/the preset coefficient. For example, as shown in FIG. 3 , the height and width of the normal picture 31 are H1 and W1 respectively, and after scaling according to the preset coefficient S, the height and width of the thumbnail 32 are H2 and W2 respectively.

步骤820:第二终端响应于对缩略图的操作指令,根据预设系数缩放与操作指令对应的第一关键路径,生成与目标图片对应的第二关键路径。Step 820: In response to the operation instruction on the thumbnail, the second terminal scales the first critical path corresponding to the operation instruction according to a preset coefficient, and generates a second critical path corresponding to the target picture.

具体地,在缩略图显示在操作区域的过程中,用户针对该缩略图进行的图片处理操作。操作指令可以但不限于是对缩略图进行裁剪、合成及旋转等。在一实施方式中,操作指令包括:对缩略图进行裁剪操作;和/或对缩略图进行合成操作;和/或对缩略图进行旋转操作。Specifically, in the process of displaying the thumbnail in the operation area, the user performs a picture processing operation on the thumbnail. The operation instruction may be, but not limited to, cropping, compositing, and rotating the thumbnails. In one embodiment, the operation instruction includes: performing a cropping operation on the thumbnails; and/or performing a synthesizing operation on the thumbnails; and/or performing a rotation operation on the thumbnails.

具体地,将与操作指令操作指令对应的第一关键路径按照预设系数进行计算,生成在目标图片上进行图片处理的第二关键路径。例如,如图5所示,若第一关键路径针对缩略图确定的裁剪或合成区域51的高宽分别为H3、W3,旋转角度A,相对于缩略图左上角顶点的相对坐标为(DX,DY),则根据预设系数生成的第二关键路径对确定的裁剪或合成区域52相对于目标图片的左上角顶点坐标为(DX*S,DY*S),高宽分别为H4、W4,并记录旋转角度A。旋转角度A可以但不限于等于零。Specifically, the first critical path corresponding to the operation instruction of the operation instruction is calculated according to the preset coefficient, and the second critical path for image processing on the target image is generated. For example, as shown in FIG. 5 , if the height and width of the cropping or compositing area 51 determined by the first critical path for the thumbnail are H3 and W3, respectively, and the rotation angle A, the relative coordinates with respect to the vertex of the upper left corner of the thumbnail are (DX, DY), then according to the second key path generated by the preset coefficient, the determined cropping or synthesizing region 52 is relative to the upper left corner vertex coordinates of the target picture (DX*S, DY*S), and the height and width are respectively H4, W4, And record the rotation angle A. The rotation angle A may be, but is not limited to, equal to zero.

步骤830:第二终端根据第二关键路径对目标图片进行处理,以获得处理后的目标图片。Step 830: The second terminal processes the target picture according to the second critical path to obtain the processed target picture.

具体地,在生成上述第二关键路径后,则调用位图或ffmpeg对应的api进行处理,生成经过图像处理后的目标图片。若是裁剪操作,则执行确定了在目标图片上的裁剪区域后生成图片处理后的目标图片,则将该目标图片旋转角度A;若是合成操作,则将需要合入的图缩放到确定合成区域大小并旋转角度A,记录此步骤生成的位图为bm2,调用draw函数,先画原图bm1,再画bm2,将函数参数传入回放后的左上角坐标。在一实施方式中,第二终端根据第二关键路径对目标图片进行处理,以获得处理后的目标图片的步骤具体包括:第二终端通过底层库对目标图片进行处理,以使得堆内存得到节省。Specifically, after the above-mentioned second critical path is generated, the API corresponding to the bitmap or ffmpeg is called for processing, and the target image after image processing is generated. If it is a cropping operation, the target image after image processing is generated after the cropping area on the target image is determined, and the target image is rotated by the angle A; if it is a composite operation, the image that needs to be combined is scaled to determine the size of the composite area. And rotate the angle A, record the bitmap generated in this step as bm2, call the draw function, first draw the original image bm1, then draw bm2, and pass the function parameters into the coordinates of the upper left corner after playback. In one embodiment, the step of the second terminal processing the target picture according to the second critical path to obtain the processed target picture specifically includes: the second terminal processing the target picture through the underlying library, so that the heap memory is saved. .

本申请实施例提供的一种图片的处理方法,通过获取目标图片对应的处理信息,处理信息包括缩略图和预设系数后,响应于对缩略图的操作指令,根据预设系数缩放与所述操作指令对应的第一关键路径,生成与目标图片对应的第二关键路径,且根据第二关键路径对目标图片进行处理,以获得处理后的目标图片,从而使得终端在图片处理过程中所占用的堆内存较少,进而节省了对堆内存的使用,提高了交互响应的速度,有效防止在图片处理过程中出现OOM异常。In a picture processing method provided by an embodiment of the present application, by acquiring processing information corresponding to a target picture, the processing information includes a thumbnail image and a preset coefficient, and in response to an operation instruction on the thumbnail image, scaling the image with the preset coefficient according to the preset coefficient The first critical path corresponding to the operation instruction, the second critical path corresponding to the target picture is generated, and the target picture is processed according to the second critical path to obtain the processed target picture, so that the terminal occupies the There is less heap memory, which saves the use of heap memory, improves the speed of interactive response, and effectively prevents OOM exceptions during image processing.

上文中对于一种图片的处理方法的实施例进行了详细描述,基于上述实施例描述的图片的处理方法,本法发明实施例还提供了一种与该方法对应的设备。An embodiment of a picture processing method is described in detail above. Based on the picture processing method described in the foregoing embodiment, an embodiment of the present invention further provides a device corresponding to the method.

图9为本发明实施例所提供的一种视频数据的处理设备组成示意图,如图9所示,该设备包括存储器91和处理器92。FIG. 9 is a schematic diagram of the composition of a device for processing video data according to an embodiment of the present invention. As shown in FIG. 9 , the device includes a memory 91 and a processor 92 .

存储器91用于存储计算机程序;The memory 91 is used to store computer programs;

处理器92用于执行计算机程序以实现上述任意一个实施例提供的图片的处理方法的步骤。由于设备部分的实施例与方法部分的实施例相互对应,因此设备部分的实施例请参考方法部分的实施例描述,这里不再赘述。The processor 92 is configured to execute a computer program to implement the steps of the image processing method provided by any one of the foregoing embodiments. Since the embodiments of the device part correspond to the embodiments of the method part, the embodiments of the device part refer to the description of the embodiments of the method part, and details are not repeated here.

本申请实施例提供的一种视频数据的处理设备,能够利用对缩略图进行图片处理实现对目标图片进行图片处理,从而使得终端在图片处理过程中所占用的堆内存较少,进而节省了对堆内存的使用,提高了交互响应的速度,有效防止在图片处理过程中出现OOM异常。The video data processing device provided by the embodiment of the present application can perform image processing on a target image by performing image processing on thumbnails, so that the terminal occupies less heap memory during the image processing process, thereby saving the need for The use of heap memory improves the speed of interactive response and effectively prevents OOM exceptions during image processing.

上文中对于一种图片的处理方法的实施例进行了详细描述,基于上述实施例描述的图片的处理方法,本法发明实施例还提供了一种与该方法对应的计算机可读存储介质。An embodiment of a method for processing a picture is described in detail above. Based on the method for processing a picture described in the above embodiment, an embodiment of the present invention further provides a computer-readable storage medium corresponding to the method.

一种计算机可读存储介质,其上存储有计算机程序,计算机存储介质上存储有计算机程序指令,计算机程序指令被处理器执行时实现上述任意一个实施例提供的图片的处理方法。由于计算机可读存储介质部分的实施例与方法部分的实施例相互对应,因此计算机可读存储介质部分的实施例请参考方法部分的实施例描述,这里不再赘述。A computer-readable storage medium stores a computer program thereon, and stores computer program instructions on the computer storage medium. When the computer program instructions are executed by a processor, the image processing method provided by any one of the foregoing embodiments is implemented. Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the method part, the embodiments of the computer-readable storage medium part refer to the description of the embodiments of the method part, which will not be repeated here.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium can be read-only memory, magnetic disk or optical disk, etc.

以上,仅是本发明的较佳实施例而已,并非对本发明作任何形式上的限制,虽然本发明已以较佳实施例揭露如上,然而并非用以限定本发明,任何熟悉本专业的技术人员,在不脱离本发明技术方案范围内,当可利用上述揭示的技术内容做出些许更动或修饰为等同变化的等效实施例,但凡是未脱离本发明技术方案内容,依据本发明的技术实质对以上实施例所作的任何简单修改、等同变化与修饰,均仍属于本发明技术方案的范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the present invention in any form. Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. , without departing from the scope of the technical solution of the present invention, when the technical content disclosed above can be used to make some changes or modifications to equivalent embodiments of equivalent changes, as long as it does not depart from the technical solution content of the present invention, according to the technical solution of the present invention Substantially any simple modifications, equivalent changes and modifications made to the above embodiments still fall within the scope of the technical solutions of the present invention.

Claims (10)

1.一种图片的处理方法,其特征在于,所述方法包括如下步骤:1. a processing method of picture, is characterized in that, described method comprises the steps: 获取目标图片对应的处理信息,所述处理信息包括缩略图和预设系数;Obtain processing information corresponding to the target picture, where the processing information includes thumbnail images and preset coefficients; 响应于对所述缩略图的操作指令,根据所述预设系数缩放与所述操作指令对应的第一关键路径,生成与所述目标图片对应的第二关键路径;In response to the operation instruction on the thumbnail, scaling the first critical path corresponding to the operation instruction according to the preset coefficient, and generating a second critical path corresponding to the target picture; 根据所述第二关键路径对所述目标图片进行处理,以获得处理后的目标图片。The target picture is processed according to the second critical path to obtain a processed target picture. 2.根据权利要求1所述的图片的处理方法,所述获取目标图片对应的处理信息,所述处理信息包括缩略图和预设系数的步骤之前包括:2. The method for processing a picture according to claim 1, wherein the processing information corresponding to the acquisition target picture, the processing information comprising a thumbnail image and a preset coefficient before the step comprising: 获取所述目标图片;obtain the target image; 保持所述目标图片的高宽比例不变,根据所述预设系数生成与所述目标图片对应的缩略图。The aspect ratio of the target picture is kept unchanged, and a thumbnail corresponding to the target picture is generated according to the preset coefficient. 3.根据权利要求1所述的图片的处理方法,所述根据所述第二关键路径对所述目标图片进行处理,以获得处理后的目标图片的步骤包括:3. The method for processing a picture according to claim 1, wherein the step of processing the target picture according to the second critical path to obtain the processed target picture comprises: 通过底层库对所述目标图片进行处理,以使得堆内存得到节省。The target image is processed by the underlying library, so that the heap memory can be saved. 4.根据权利要求1所述的图片的处理方法,所述获取目标图片对应的处理信息,所述处理信息包括缩略图和预设系数的步骤之前包括:4. The processing method of a picture according to claim 1, wherein the processing information corresponding to the acquisition target picture, the processing information comprising a thumbnail image and a preset coefficient before the step comprises: 检测自身的堆内存占用是否大于预定值;Detect whether its own heap memory usage is greater than a predetermined value; 若所述堆内存占用大于预定值,则执行所述获取目标图片对应的处理信息,所述处理信息包括缩略图和预设系数的步骤。If the heap memory occupancy is greater than a predetermined value, execute the step of obtaining the processing information corresponding to the target picture, where the processing information includes thumbnail images and preset coefficients. 5.根据权利要求1-4任意一项所述的图片的处理方法,所述操作指令包括:5. The processing method of a picture according to any one of claims 1-4, wherein the operation instruction comprises: 对所述缩略图进行裁剪操作;和/或perform a cropping operation on the thumbnail; and/or 对所述缩略图进行合成操作;和/或compositing the thumbnails; and/or 对所述缩略图进行旋转操作。Rotate the thumbnail image. 6.一种图片的处理方法,其特征在于,所述方法包括如下步骤:6. A method for processing a picture, wherein the method comprises the steps: 第一终端将目标图片对应的处理信息发送到第二终端,所述处理信息包括缩略图和预设系数;The first terminal sends processing information corresponding to the target picture to the second terminal, where the processing information includes thumbnail images and preset coefficients; 所述第二终端响应于对所述缩略图的操作指令,根据所述预设系数缩放与所述操作指令对应的第一关键路径,生成与所述目标图片对应的第二关键路径;The second terminal, in response to an operation instruction on the thumbnail, scales the first critical path corresponding to the operation instruction according to the preset coefficient, and generates a second critical path corresponding to the target picture; 所述第二终端根据所述第二关键路径对所述目标图片进行处理,以获得处理后的目标图片。The second terminal processes the target picture according to the second critical path to obtain a processed target picture. 7.根据权利要求6所述的图片的处理方法,所述第一终端将目标图片对应的处理信息发送到第二终端,所述处理信息包括缩略图和预设系数的步骤之前包括:7. The method for processing pictures according to claim 6, wherein the first terminal sends processing information corresponding to the target picture to the second terminal, the processing information comprising thumbnail images and preset coefficients before the step comprising: 所述第一终端获取所述目标图片,并保持所述目标图片的高宽比例不变,根据所述预设系数生成与所述目标图片对应的缩略图。The first terminal acquires the target picture, keeps the aspect ratio of the target picture unchanged, and generates a thumbnail image corresponding to the target picture according to the preset coefficient. 8.根据权利要求6所述的图片的处理方法,所述第二终端根据所述第二关键路径对所述目标图片进行处理,以获得处理后的目标图片的步骤具体包括:8. The method for processing a picture according to claim 6, wherein the second terminal processes the target picture according to the second critical path, and the step of obtaining the processed target picture specifically comprises: 所述第二终端通过底层库对所述目标图片进行处理,以使得堆内存得到节省。The second terminal processes the target image through the underlying library, so that heap memory is saved. 9.一种图片的处理设备,其特征在于,所述设备包括:存储器及处理器;9. A picture processing device, wherein the device comprises: a memory and a processor; 所述存储器用于存储计算机程序;the memory is used to store computer programs; 所述处理器用于执行所述计算机程序以实现如权利要求1-8任意一项所述的图片的处理方法的步骤。The processor is configured to execute the computer program to implement the steps of the picture processing method according to any one of claims 1-8. 10.一种计算机可读存储介质,所述计算机存储介质上存储有计算机程序指令;所述计算机程序指令被处理器执行时实现如权利要求1-8中任意一项所述的图片的处理方法。10. A computer-readable storage medium on which computer program instructions are stored; when the computer program instructions are executed by a processor, a method for processing a picture according to any one of claims 1-8 is realized .
CN202110255194.XA 2021-03-09 2021-03-09 Picture processing method and device and computer readable storage medium Pending CN115049544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110255194.XA CN115049544A (en) 2021-03-09 2021-03-09 Picture processing method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110255194.XA CN115049544A (en) 2021-03-09 2021-03-09 Picture processing method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115049544A true CN115049544A (en) 2022-09-13

Family

ID=83156393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110255194.XA Pending CN115049544A (en) 2021-03-09 2021-03-09 Picture processing method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115049544A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005275454A (en) * 2004-03-22 2005-10-06 Fuji Photo Film Co Ltd Image processing method, image processing system, image processing device and image processing program
WO2014178233A1 (en) * 2013-04-30 2014-11-06 ソニー株式会社 Image processing device, image processing method and program
CN106327429A (en) * 2016-10-24 2017-01-11 腾讯科技(深圳)有限公司 Picture synthesis method and device and terminal equipment
CN111666157A (en) * 2020-04-03 2020-09-15 中国科学院电子学研究所苏州研究院 Rapid processing method and system for geographic space image data
CN112291627A (en) * 2020-10-12 2021-01-29 广州市百果园网络科技有限公司 Video editing method and device, mobile terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005275454A (en) * 2004-03-22 2005-10-06 Fuji Photo Film Co Ltd Image processing method, image processing system, image processing device and image processing program
WO2014178233A1 (en) * 2013-04-30 2014-11-06 ソニー株式会社 Image processing device, image processing method and program
CN106327429A (en) * 2016-10-24 2017-01-11 腾讯科技(深圳)有限公司 Picture synthesis method and device and terminal equipment
CN111666157A (en) * 2020-04-03 2020-09-15 中国科学院电子学研究所苏州研究院 Rapid processing method and system for geographic space image data
CN112291627A (en) * 2020-10-12 2021-01-29 广州市百果园网络科技有限公司 Video editing method and device, mobile terminal and storage medium

Similar Documents

Publication Publication Date Title
JP7549109B2 (en) Adaptive transfer functions for video encoding and decoding.
US20220408020A1 (en) Image Processing Method, Electronic Device, and Cloud Server
US9692959B2 (en) Image processing apparatus and method
CN110100251B (en) Apparatus, method, and computer-readable storage medium for processing document
US12003850B2 (en) Method for selecting image based on burst shooting and electronic device
US20210158577A1 (en) Method for Adding Special Effect to Video, Electronic Device and Storage Medium
CN110933334A (en) Video noise reduction method, device, terminal and storage medium
CN116055857A (en) Photographing method and electronic equipment
CN105653195B (en) Screen capturing method and mobile terminal
WO2022262259A1 (en) Image processing method and apparatus, and device, medium and chip
CN116088832B (en) Interface processing method and device
CN115049544A (en) Picture processing method and device and computer readable storage medium
CN108200333B (en) Photographing composition method and terminal
CN110706163A (en) Image processing method, terminal and computer storage medium
CN115767285A (en) Image shading correction method, device, storage medium and electronic equipment
CN114968430A (en) Interface control method and device and electronic equipment
CN114979729A (en) Video data processing method and device and vehicle

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20220913

WD01 Invention patent application deemed withdrawn after publication