CN111145104A - Method and terminal for restoring picture brightness and contrast - Google Patents

Method and terminal for restoring picture brightness and contrast Download PDF

Info

Publication number
CN111145104A
CN111145104A CN201911214027.XA CN201911214027A CN111145104A CN 111145104 A CN111145104 A CN 111145104A CN 201911214027 A CN201911214027 A CN 201911214027A CN 111145104 A CN111145104 A CN 111145104A
Authority
CN
China
Prior art keywords
picture
contrast
brightness
resource
restoring
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
CN201911214027.XA
Other languages
Chinese (zh)
Other versions
CN111145104B (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.)
Fujian Tianquan Educational Technology Ltd
Original Assignee
Fujian Tianquan Educational Technology 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 Fujian Tianquan Educational Technology Ltd filed Critical Fujian Tianquan Educational Technology Ltd
Priority to CN201911214027.XA priority Critical patent/CN111145104B/en
Publication of CN111145104A publication Critical patent/CN111145104A/en
Application granted granted Critical
Publication of CN111145104B publication Critical patent/CN111145104B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5838Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Abstract

The invention discloses a method and a terminal for restoring picture brightness and contrast, which read an XML file under a PPTX file; traversing the XML file, and determining the picture processed by the album; acquiring the brightness, contrast and picture resources of the processed picture according to the picture processed by the photo album; and performing brightness and contrast reduction on the picture resources by using an image processing algorithm corresponding to the brightness and the contrast, and analyzing the brightness and contrast data of the picture in the PPTX file to ensure that the picture resources can also simulate PowerPoint without being processed by a PowerPoint album, so as to realize accurate reduction of the setting effects of the brightness and the contrast of the picture.

Description

Method and terminal for restoring picture brightness and contrast
Technical Field
The invention relates to the field of image processing, in particular to a method and a terminal for restoring picture brightness and contrast.
Background
Now, in order to achieve the effect of copying brightness and contrast of an original picture to PowerPoint, the original picture in a PPTX file is extracted, the PPTX file is opened in compressed software, a folder named "PPT" appears on a software interface, the folder contains a file named "media", all unprocessed original pictures in PPT are stored under the file, the original pictures are imported into PowerPoint, and corresponding brightness and contrast are selected for processing, however, the method only achieves the operation of picture extraction and repeated processing, and since the accurate values of brightness and contrast adjustment of the pictures in the PPT file cannot be analyzed, the effect reproduction can only be performed by depending on the processing mode preset in PowerPoint, when different effects of brightness and contrast which are set in the pictures in PPT and the application scene of the PowerPoint program is required to be restored, due to the fact that the method cannot analyze the effect processing data of the picture, even if the original picture in the PPTX file is obtained, the effect restoration of brightness and contrast cannot be carried out by other image processing software.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method and the terminal for restoring the brightness and the contrast of the picture can effectively analyze the brightness and the contrast of the picture in the PPTX file and restore the setting effect of the brightness and the contrast of the original picture.
In order to solve the technical problems, the invention adopts the technical scheme that:
a method for restoring brightness and contrast of a picture comprises the following steps:
s1, reading an XML file under the PPTX file;
s2, traversing the XML file, and determining the picture processed by the album;
s3, acquiring the brightness, contrast and picture resource of the processed picture according to the picture processed by the album;
and S4, restoring the brightness and the contrast of the picture resource by using an image processing algorithm corresponding to the brightness and the contrast.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a terminal for restoring brightness and contrast of a picture, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
s1, reading an XML file under the PPTX file;
s2, traversing the XML file, and determining the picture processed by the album;
s3, acquiring the brightness, contrast and picture resource of the processed picture according to the picture processed by the album;
and S4, restoring the brightness and the contrast of the picture resource by using an image processing algorithm corresponding to the brightness and the contrast.
The invention has the beneficial effects that: traversing an XML file read under the PPTX file, determining a picture processed by an album, obtaining the brightness, contrast and picture resource of the picture processed, and processing the picture resource by using a corresponding image processing algorithm to finish the effect restoration of the picture resource. Reading an XML file in a PPTX file, realizing accurate acquisition of each element attribute in PPT, traversing the XML file, determining a picture processed by an album, effectively analyzing corresponding brightness and contrast data according to the picture, acquiring picture resources, and processing the picture resources according to the brightness and contrast obtained by analysis by using a corresponding picture processing algorithm, so that the picture resources are not processed by the album of PowerPoint and can also simulate PowerPoint by analyzing the picture effect, thereby achieving the purpose of accurately restoring the setting effect of the brightness and contrast of the picture.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for restoring brightness and contrast of a picture according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a terminal for restoring picture brightness and contrast according to an embodiment of the present invention;
description of reference numerals:
1. a terminal for restoring the brightness and contrast of a picture; 2. a memory; 3. a processor.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, a method for restoring brightness and contrast of a picture includes the steps of:
s1, reading an XML file under the PPTX file;
s2, traversing the XML file, and determining the picture processed by the album;
s3, acquiring the brightness, contrast and picture resource of the processed picture according to the picture processed by the album;
and S4, restoring the brightness and the contrast of the picture resource by using an image processing algorithm corresponding to the brightness and the contrast.
As can be seen from the above description, the beneficial effects of the present invention are: traversing an XML file read under the PPTX file, determining a picture processed by an album, obtaining the brightness, contrast and picture resource of the picture processed, and processing the picture resource by using a corresponding image processing algorithm to finish the effect restoration of the picture resource. Reading an XML file in a PPTX file, realizing accurate acquisition of each element attribute in PPT, traversing the XML file, determining a picture processed by an album, effectively analyzing corresponding brightness and contrast data according to the picture, acquiring picture resources, and processing the picture resources according to the brightness and contrast obtained by analysis by using a corresponding picture processing algorithm, so that the picture resources are not processed by the album of PowerPoint and can also simulate PowerPoint by analyzing the picture effect, thereby achieving the purpose of accurately restoring the setting effect of the brightness and contrast of the picture.
Further, the step S2 includes:
acquiring all PPT page numbers in the XML file, traversing picture nodes in the PPT page numbers, judging whether a node related to album processing exists under the picture nodes, if so, executing step S3, and if not, not processing.
According to the description, the setting of the brightness and the contrast of the picture is a photo album processing mode in PowerPoint, whether the picture is processed by the photo album is judged firstly, the efficiency of effective information retrieval of the picture can be improved, and time consumption and resource waste caused by analyzing the picture which is not processed by the photo album are avoided.
Further, the step S3 includes:
s31, traversing child nodes under the picture nodes, and storing attribute values representing the brightness and the contrast of the picture and the unique identifier of the picture in an array in a JSON data format in a one-to-one correspondence manner;
s32, traversing all the unique identifiers stored in the array, and executing the following steps for each unique identifier respectively:
s321, matching a relative path of the corresponding picture resource in the page resource association file according to the unique identifier, and acquiring the picture resource by using the relative path;
and S322, binding the acquired picture resources and the corresponding picture brightness and contrast attribute values thereof, and storing the picture resources in a project directory in a file form.
According to the description, the JSON array is used for storing the attribute values of the brightness and the contrast of the picture and the unique identification of the picture, data transmission is facilitated, redundant characters are reduced, the data structure is subjected to corresponding relation display through the unique key value of the JSON, the relative path of the picture resource is obtained according to the unique identification of the picture, the unique identification of the picture is the unique ID for identifying the picture, the reliability of the result can be ensured through the picture resource obtained based on the unique identification, the picture resource and the brightness and the contrast of the picture corresponding to the picture resource are bound, the brightness and the contrast can be directly obtained according to the binding relation when the picture resource is processed subsequently, and the efficiency of picture effect reduction is improved.
Further, the step S4 includes:
traversing all the picture resources stored in the project directory, and respectively executing the following steps on each picture resource:
reading picture brightness and contrast numerical values corresponding to the transmitted picture resources according to the data format parameters of the picture resources, and restoring the picture brightness and contrast of the picture resources by using an image processing algorithm corresponding to the picture brightness and contrast numerical values.
As can be seen from the above description, due to the binding relationship between the picture resource and the corresponding picture brightness and contrast, when the data format parameter of the picture resource is read, the acquisition of the brightness and contrast can be directly realized, and the picture resource is processed by using the image processing algorithm corresponding to the brightness and contrast, so that the picture resource is not processed by the PowerPoint album, and the effect restoration of the picture brightness and contrast can also be realized.
Further, the performing, in step S4, picture brightness and contrast restoration on the picture resource by using an image processing algorithm corresponding to the picture brightness and contrast values includes:
traversing all pixels of the picture resource, and respectively executing for each pixel:
and obtaining the color value of the pixel, and reassigning the color value of the pixel according to the color value of the pixel and the picture brightness and contrast numerical value corresponding to the picture resource.
As can be seen from the above description, the pixels are basic units that form the picture, and all the pixels of the picture resource are traversed, and the color values of the pixels are reassigned one by one according to the brightness and contrast values corresponding to the picture resource, which is helpful for performing more accurate effect restoration on the picture.
Referring to fig. 2, a terminal for restoring brightness and contrast of a picture includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
s1, reading an XML file under the PPTX file;
s2, traversing the XML file, and determining the picture processed by the album;
s3, acquiring the brightness, contrast and picture resource of the processed picture according to the picture processed by the album;
and S4, restoring the brightness and the contrast of the picture resource by using an image processing algorithm corresponding to the brightness and the contrast.
As can be seen from the above description, the beneficial effects of the present invention are: traversing an XML file read under the PPTX file, determining a picture processed by an album, obtaining the brightness, contrast and picture resource of the picture processed, and processing the picture resource by using a corresponding image processing algorithm to finish the effect restoration of the picture resource. Reading an XML file in a PPTX file, realizing accurate acquisition of each element attribute in PPT, traversing the XML file, determining a picture processed by an album, effectively analyzing corresponding brightness and contrast data according to the picture, acquiring picture resources, and processing the picture resources according to the brightness and contrast obtained by analysis by using a corresponding picture processing algorithm, so that the picture resources are not processed by the album of PowerPoint and can also simulate PowerPoint by analyzing the picture effect, thereby achieving the purpose of accurately restoring the setting effect of the brightness and contrast of the picture.
Further, the step S2 includes:
acquiring all PPT page numbers in the XML file, traversing picture nodes in the PPT page numbers, judging whether a node related to album processing exists under the picture nodes, if so, executing step S3, and if not, not processing.
According to the description, the setting of the brightness and the contrast of the picture is a photo album processing mode in PowerPoint, whether the picture is processed by the photo album is judged firstly, the efficiency of effective information retrieval of the picture can be improved, and time consumption and resource waste caused by analyzing the picture which is not processed by the photo album are avoided.
Further, the step S3 includes:
s31, traversing child nodes under the picture nodes, and storing attribute values representing the brightness and the contrast of the picture and the unique identifier of the picture in an array in a JSON data format in a one-to-one correspondence manner;
s32, traversing all the unique identifiers stored in the array, and executing the following steps for each unique identifier respectively:
s321, matching a relative path of the corresponding picture resource in the page resource association file according to the unique identifier, and acquiring the picture resource by using the relative path;
and S322, binding the acquired picture resources and the corresponding picture brightness and contrast attribute values thereof, and storing the picture resources in a project directory in a file form.
According to the description, the JSON array is used for storing the attribute values of the brightness and the contrast of the picture and the unique identification of the picture, data transmission is facilitated, redundant characters are reduced, the data structure is subjected to corresponding relation display through the unique key value of the JSON, the relative path of the picture resource is obtained according to the unique identification of the picture, the unique identification of the picture is the unique ID for identifying the picture, the reliability of the result can be ensured through the picture resource obtained based on the unique identification, the picture resource and the brightness and the contrast of the picture corresponding to the picture resource are bound, the brightness and the contrast can be directly obtained according to the binding relation when the picture resource is processed subsequently, and the efficiency of picture effect reduction is improved.
Further, the step S4 includes:
traversing all the picture resources stored in the project directory, and respectively executing the following steps on each picture resource:
reading picture brightness and contrast numerical values corresponding to the transmitted picture resources according to the data format parameters of the picture resources, and restoring the picture brightness and contrast of the picture resources by using an image processing algorithm corresponding to the picture brightness and contrast numerical values.
As can be seen from the above description, due to the binding relationship between the picture resource and the corresponding picture brightness and contrast, when the data format parameter of the picture resource is read, the acquisition of the brightness and contrast can be directly realized, and the picture resource is processed by using the image processing algorithm corresponding to the brightness and contrast, so that the picture resource is not processed by the PowerPoint album, and the effect restoration of the picture brightness and contrast can also be realized.
Further, the performing, in step S4, picture brightness and contrast restoration on the picture resource by using an image processing algorithm corresponding to the picture brightness and contrast values includes:
traversing all pixels of the picture resource, and respectively executing for each pixel:
and obtaining the color value of the pixel, and reassigning the color value of the pixel according to the color value of the pixel and the picture brightness and contrast numerical value corresponding to the picture resource.
As can be seen from the above description, the pixels are basic units that form the picture, and all the pixels of the picture resource are traversed, and the color values of the pixels are reassigned one by one according to the brightness and contrast values corresponding to the picture resource, which is helpful for performing more accurate effect restoration on the picture.
Example one
Referring to fig. 1, a method for restoring brightness and contrast of a picture includes the following steps:
s1, reading an XML file under the PPTX file;
decompressing the designated file content in the PPTX compression format file by using a zlib function library, and reading an XML file in the designated file content by using an RAPIDxml analysis library;
s2, traversing the XML file, and determining the picture processed by the album;
specifically, the step S2 includes:
acquiring all PPT page numbers in the XML file, traversing picture nodes in the PPT page numbers, judging whether a node related to album processing exists under the picture nodes, if so, executing step S3, and if not, not processing.
Acquiring all contents in a slides directory under a PPT directory in a PPTX file decompression directory, wherein the contents are XML files representing all page contents of PPT, slide #. XML is the specific contents of PPT pages, slide #. XML is a page resource associated file of PPT pages, picture nodes p: pic under all slide #. XML files are traversed, and when the attribute value of isophoto in p: nvPicPr under the node is 1, the picture corresponding to the picture node is processed by an album;
s3, acquiring the brightness, contrast and picture resource of the processed picture according to the picture processed by the album;
specifically, the step S3 includes:
s31, traversing child nodes under the picture nodes, and storing attribute values representing the brightness and the contrast of the picture and the unique identifier of the picture in an array in a JSON data format in a one-to-one correspondence manner;
traversing a p: blipFill node under the picture node, wherein an a: lum node is certainly existed in an a: blip sub-node under the node, a bright attribute value in the a: lum node represents the brightness value of the picture, a contrast attribute value represents the contrast value of the picture, wherein the contrast value and the brightness value are converted into a thousandth ratio by dividing by 1000, an r: embed value in the a: blip node is obtained, and the r: embed value represents the unique identifier of the picture, and the contrast value, the brightness value and the corresponding unique identifier obtained by analysis are correspondingly stored in an array in a JSON data format one by one;
s32, traversing all the unique identifiers stored in the array, and executing the following steps for each unique identifier respectively:
s321, matching a relative path of the corresponding picture resource in the page resource association file according to the unique identifier, and acquiring the picture resource by using the relative path;
matching a Target attribute representing a picture resource relative path under a Relationship node corresponding to the embed value in a page resource associated file slide #. xml.rels corresponding to the page number of the embed value according to the r, and acquiring the picture resource by using the relative path;
and S322, binding the acquired picture resources and the corresponding picture brightness and contrast attribute values thereof, and storing the picture resources in a project directory in a file form.
The method comprises the steps that the corresponding relation between the picture resource and the corresponding brightness and contrast is obtained according to the corresponding relation between the unique identification of the picture and the corresponding brightness and contrast of the picture and the corresponding relation between the unique identification of the picture and the picture resource, the picture resource and the corresponding brightness and contrast are bound according to the corresponding relation, and the obtained picture resource is stored in a project directory in a file form;
and S4, restoring the brightness and the contrast of the picture resource by using an image processing algorithm corresponding to the brightness and the contrast.
Specifically, the step S4 includes:
traversing all the picture resources stored in the project directory, and respectively executing the following steps on each picture resource:
reading picture brightness and contrast numerical values corresponding to the transmitted picture resources according to the data format parameters of the picture resources, and restoring the picture brightness and contrast of the picture resources by using an image processing algorithm corresponding to the picture brightness and contrast numerical values.
Specifically, traversing the picture resource, reading the data format parameter of the transmitted picture resource, obtaining the brightness and contrast values according to the binding relationship between the picture resource and the brightness and contrast thereof, and performing effect restoration on the picture resource by using an image processing algorithm corresponding to the brightness and contrast values;
traversing all pixels of the picture resource, and respectively executing for each pixel:
and obtaining the color value of the pixel, and reassigning the color value of the pixel according to the color value of the pixel and the picture brightness and contrast numerical value corresponding to the picture resource.
Specifically, traversing all pixels of the picture resource, obtaining a color value of each pixel, assigning the read contrast value and the read brightness value corresponding to the picture resource to a contrast and a luminance respectively, and processing the color value of the pixel according to the size of the contrast under the following three conditions:
when contract is 1, if value >127.5, value is 255, otherwise value is 0;
when the contract > is 1, alpha is 1-contract, alpha is 1/alpha-1, value + value (value-127.5f + luminance 127.5f) alpha + luminance 255, wherein alpha is a transparency value of the pixel, obtained together with a color value of the pixel, and f denotes a floating point number;
when constast <1, value + value (value-127.5f + luminance 127.5f) × constast + luminance 255, f denotes a floating point number;
the value obtained by the solving is the color value of the pixel after being restored, wherein the value needs to be limited within the range of [0,255 ].
Example two
Referring to fig. 2, a terminal 1 for restoring picture brightness and contrast includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, where the processor 3 implements the steps in the first embodiment when executing the computer program.
In summary, the present invention provides a method and a terminal for restoring brightness and contrast of a picture, wherein a pplx file is decompressed and read by zlib and RAPIDxml tools, and readability of an XML file is utilized to enable a user to visually acquire attributes and characteristics of each element in the PPTX file, traverse all picture nodes under the XML file representing contents of a PPT page, determine whether the picture is processed by an album, and then acquire brightness and contrast corresponding to the picture and a unique identifier of the picture, thereby improving efficiency of retrieving effective information of the picture, avoiding time consumption and resource waste caused by analyzing the picture which is not processed by the album, storing the acquired unique identifier of the picture and brightness and contrast corresponding to the picture in a data format of JSON, facilitating data transmission, and displaying a corresponding relationship between data more visually by a structural form of key value pair, the method comprises the steps of utilizing the unique identification of the picture to match the corresponding picture resource, ensuring the reliability of the result, binding the picture resource with the corresponding picture brightness and contrast, being beneficial to directly obtaining the brightness and contrast according to the binding relation when the brightness and contrast effect of the picture resource is restored, improving the efficiency of restoring the picture effect, traversing the picture resource, and processing the picture resource by using a corresponding image processing algorithm according to the brightness and contrast value corresponding to the picture resource, so that the picture in the PPTX file can be accurately restored by effectively analyzing the brightness and contrast after the picture is processed under the condition of not being processed by a PowerPoint album.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for restoring brightness and contrast of a picture, comprising the steps of:
s1, reading an XML file under the PPTX file;
s2, traversing the XML file, and determining the picture processed by the album;
s3, acquiring the brightness, contrast and picture resource of the processed picture according to the picture processed by the album;
and S4, restoring the brightness and the contrast of the picture resource by using an image processing algorithm corresponding to the brightness and the contrast.
2. The method for restoring brightness and contrast of a picture according to claim 1, wherein said step S2 comprises:
acquiring all PPT page numbers in the XML file, traversing picture nodes in the PPT page numbers, judging whether a node related to album processing exists under the picture nodes, if so, executing step S3, and if not, not processing.
3. The method for restoring brightness and contrast of a picture according to claim 2, wherein said step S3 comprises:
s31, traversing child nodes under the picture nodes, and storing attribute values representing the brightness and the contrast of the picture and the unique identifier of the picture in an array in a JSON data format in a one-to-one correspondence manner;
s32, traversing all the unique identifiers stored in the array, and executing the following steps for each unique identifier respectively:
s321, matching a relative path of the corresponding picture resource in the page resource association file according to the unique identifier, and acquiring the picture resource by using the relative path;
and S322, binding the acquired picture resources and the corresponding picture brightness and contrast attribute values thereof, and storing the picture resources in a project directory in a file form.
4. The method for restoring brightness and contrast of pictures according to claim 3, wherein said step S4 comprises:
traversing all the picture resources stored in the project directory, and respectively executing the following steps on each picture resource:
reading picture brightness and contrast numerical values corresponding to the transmitted picture resources according to the data format parameters of the picture resources, and restoring the picture brightness and contrast of the picture resources by using an image processing algorithm corresponding to the picture brightness and contrast numerical values.
5. The method of claim 4, wherein the step S4 of restoring the brightness and contrast of the picture resource by using the image processing algorithm corresponding to the brightness and contrast of the picture comprises:
traversing all pixels of the picture resource, and respectively executing for each pixel:
and obtaining the color value of the pixel, and reassigning the color value of the pixel according to the color value of the pixel and the picture brightness and contrast numerical value corresponding to the picture resource.
6. A terminal for restoring brightness and contrast of a picture, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
s1, reading an XML file under the PPTX file;
s2, traversing the XML file, and determining the picture processed by the album;
s3, acquiring the brightness, contrast and picture resource of the processed picture according to the picture processed by the album;
and S4, restoring the brightness and the contrast of the picture resource by using an image processing algorithm corresponding to the brightness and the contrast.
7. The terminal for restoring brightness and contrast of pictures according to claim 6, wherein said step S2 includes:
acquiring all PPT page numbers in the XML file, traversing picture nodes in the PPT page numbers, judging whether a node related to album processing exists under the picture nodes, if so, executing step S3, and if not, not processing.
8. The terminal for restoring brightness and contrast of pictures according to claim 7, wherein said step S3 includes:
s31, traversing child nodes under the picture nodes, and storing attribute values representing the brightness and the contrast of the picture and the unique identifier of the picture in an array in a JSON data format in a one-to-one correspondence manner;
s32, traversing all the unique identifiers stored in the array, and executing the following steps for each unique identifier respectively:
s321, matching a relative path of the corresponding picture resource in the page resource association file according to the unique identifier, and acquiring the picture resource by using the relative path;
and S322, binding the acquired picture resources and the corresponding picture brightness and contrast attribute values thereof, and storing the picture resources in a project directory in a file form.
9. The terminal for restoring brightness and contrast of pictures according to claim 8, wherein said step S4 includes:
traversing all the picture resources stored in the project directory, and respectively executing the following steps on each picture resource:
reading picture brightness and contrast numerical values corresponding to the transmitted picture resources according to the data format parameters of the picture resources, and restoring the picture brightness and contrast of the picture resources by using an image processing algorithm corresponding to the picture brightness and contrast numerical values.
10. The terminal for restoring picture brightness and contrast according to claim 9, wherein said performing, in step S4, picture brightness and contrast restoration on the picture resource by using an image processing algorithm corresponding to the picture brightness and contrast values includes:
traversing all pixels of the picture resource, and respectively executing for each pixel:
and obtaining the color value of the pixel, and reassigning the color value of the pixel according to the color value of the pixel and the picture brightness and contrast numerical value corresponding to the picture resource.
CN201911214027.XA 2019-12-02 2019-12-02 Method and terminal for restoring picture brightness and contrast Active CN111145104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911214027.XA CN111145104B (en) 2019-12-02 2019-12-02 Method and terminal for restoring picture brightness and contrast

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911214027.XA CN111145104B (en) 2019-12-02 2019-12-02 Method and terminal for restoring picture brightness and contrast

Publications (2)

Publication Number Publication Date
CN111145104A true CN111145104A (en) 2020-05-12
CN111145104B CN111145104B (en) 2023-04-18

Family

ID=70517391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911214027.XA Active CN111145104B (en) 2019-12-02 2019-12-02 Method and terminal for restoring picture brightness and contrast

Country Status (1)

Country Link
CN (1) CN111145104B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100100813A1 (en) * 2008-10-20 2010-04-22 Kabushiki Kaisha Toshiba Document processing apparatus and document processing method
JP2012146102A (en) * 2011-01-12 2012-08-02 Konica Minolta Business Technologies Inc Image reader, image reading method and program
CN106959869A (en) * 2017-02-16 2017-07-18 福建天泉教育科技有限公司 A kind of method and system of loading OCX controls
CN109325922A (en) * 2018-09-12 2019-02-12 深圳开阳电子股份有限公司 A kind of image self-adapting enhancement method, device and image processing equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100100813A1 (en) * 2008-10-20 2010-04-22 Kabushiki Kaisha Toshiba Document processing apparatus and document processing method
JP2012146102A (en) * 2011-01-12 2012-08-02 Konica Minolta Business Technologies Inc Image reader, image reading method and program
CN106959869A (en) * 2017-02-16 2017-07-18 福建天泉教育科技有限公司 A kind of method and system of loading OCX controls
CN109325922A (en) * 2018-09-12 2019-02-12 深圳开阳电子股份有限公司 A kind of image self-adapting enhancement method, device and image processing equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ACHIM REIZ 等: "Grass-Root Enterprise Modeling: Issues and Potentials of Retrieving Models from Powerpoint", 《IFIP WORKING CONFERENCE ON THE PRACTICE OF ENTERPRISE MODELING》 *
汪小威: "基于Retinex亮度校正与感知对比度的图像增强算法", 《电子测量与仪器学报》 *

Also Published As

Publication number Publication date
CN111145104B (en) 2023-04-18

Similar Documents

Publication Publication Date Title
CN109194960B (en) Image frame rendering method and device and electronic equipment
Almeer Cloud hadoop map reduce for remote sensing image analysis
US20090031227A1 (en) Intelligent screen capture and interactive display tool
US7545386B2 (en) Unified mobile display emulator
US9286228B2 (en) Facilitating caching in an image-processing system
CN111918065A (en) Information compression/decompression method and device
CN106959869B (en) Method and system for loading OCX control
CN107402878B (en) Test method and device
CN111222571A (en) Image special effect processing method and device, electronic equipment and storage medium
CN114860699A (en) Data quality detection method, device, equipment and storage medium
CN109615668B (en) Component-based digital image synchronization
CN111145104B (en) Method and terminal for restoring picture brightness and contrast
CN107767434B (en) Method for acquiring texture mapping configuration information in virtual reality technology and storage medium
CN115022670B (en) Video file storage method, video file restoration device, video file storage equipment and storage medium
CN105279247A (en) Expression library generation method and device
CN110119380B (en) Storage and reading method and device for scalable vector graphics file
CN112579357B (en) Snapshot difference obtaining method, device, equipment and storage medium
CN111080745B (en) Method and terminal for re-coloring pictures in PowerPoint
CN111127306B (en) Method and terminal for restoring transparency of picture in PPTX file
CN111158564B (en) Method and terminal for restoring picture clipping effect in PowerPoint
Reina Can Image Data Facilitate Reproducibility of Graphics and Visualizations? Toward a Trusted Scientific Practice
US20020025067A1 (en) Information adding apparatus, information extracting apparatus, information adding method, information extracting method, and computer readable recording medium
CN113628292B (en) Method and device for previewing pictures in target terminal
CN110941589A (en) Picture exporting method and device, electronic equipment and readable storage medium
KR101652740B1 (en) System and method for image processing and restoring

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