CN108492337A - A kind of gray level image simplification method, unit and storage medium based on PCA - Google Patents

A kind of gray level image simplification method, unit and storage medium based on PCA Download PDF

Info

Publication number
CN108492337A
CN108492337A CN201810123063.4A CN201810123063A CN108492337A CN 108492337 A CN108492337 A CN 108492337A CN 201810123063 A CN201810123063 A CN 201810123063A CN 108492337 A CN108492337 A CN 108492337A
Authority
CN
China
Prior art keywords
gray level
matrix
level image
compression
obtains
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
CN201810123063.4A
Other languages
Chinese (zh)
Other versions
CN108492337B (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.)
China Agricultural University
Original Assignee
China Agricultural University
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 China Agricultural University filed Critical China Agricultural University
Priority to CN201810123063.4A priority Critical patent/CN108492337B/en
Publication of CN108492337A publication Critical patent/CN108492337A/en
Application granted granted Critical
Publication of CN108492337B publication Critical patent/CN108492337B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Image Processing (AREA)

Abstract

The present invention provides a kind of, and the gray level image based on PCA simplifies method, the method includes the steps:Extract the gray level image matrix of gray level image;It compresses the gray level image matrix and obtains first compression gray level image matrix;It compresses the first compression gray level image matrix and obtains second-compressed gray level image matrix;Restore the gray level image after the second-compressed gray level image matrix is simplified.The present invention also provides a kind of active interactive device, non-transient readable storage medium storing program for executing and devices, for realizing the method.The present invention can reduce the redundancy of gray level image, reduce gray level image the space occupied in the electronic device.

Description

A kind of gray level image simplification method, unit and storage medium based on PCA
Technical field
The present invention relates to image processing fields, simplify method more particularly, to a kind of gray level image based on PCA, set Standby, device and storage medium.
Background technology
In the research and application in many fields, generally require to reflecting that multiple variables of things are largely observed, It collects mass data and finds rule to carry out analysis.Multivariable large sample undoubtedly can provide abundant letter for research and application Breath, but the workload of data acquisition is also increased to a certain extent.If analyzed respectively each index, analysis is often It is isolated, rather than comprehensive.Many information can be lost by blindly reducing index, easy to produce the conclusion of mistake.Therefore it needs A rational method is found, the index analyzed is needed simultaneously in reduction, the loss that former index includes information is reduced to the greatest extent, to reach To the purpose analyzed collected data comprehensively.Therefore, a kind of redundancy that can reduce image is found, is realized to figure The compression of picture, while the method that the minimum error of image may be implemented by retrieving algorithm just become the problem of industry is paid close attention to.
Invention content
It solves the above problems in order to overcome the problems referred above or at least partly, the present invention provides a kind of ashes based on PCA Spend image simplification method, unit and storage medium.
On the one hand, the present invention provides a kind of, and the gray level image based on PCA simplifies method, and specific steps include:Extraction ash Spend the gray level image matrix of image;It compresses the gray level image matrix and obtains first compression gray level image matrix;Compress described one Second compression gray level image matrix obtains second-compressed gray level image matrix;It restores the second-compressed gray level image matrix and obtains letter Gray level image after change.
On the other hand, the present invention provides a kind of active interactive device and a kind of non-transient readable storage medium storing program for executing.Described one Planting active interactive device includes:At least one processor;And at least one processor being connect with the processor communication, In:The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy It enough executes a kind of gray level image based on PCA and simplifies method.A kind of non-transient readable storage medium storing program for executing storage program refers to It enables, simplifies method for executing a kind of gray level image based on PCA.The present invention also provides a kind of devices, for realizing The method.
The present invention provides a kind of, and the gray level image based on PCA simplifies method, unit and storage medium, by adopting Gray level image is compressed with PCA methods, it is possible to reduce the redundancy of gray level image reduces gray level image in electronic equipment Middle the space occupied.
Description of the drawings
Fig. 1 is the overall flow figure that the gray level image based on PCA simplifies method in the embodiment of the present invention;
Fig. 2 is to compress gray level image matrix in the embodiment of the present invention to obtain first compression gray level image matrix specific steps stream Cheng Tu;
Fig. 3 is to compress first compression gray level image matrix in the embodiment of the present invention to obtain second-compressed gray level image matrix tool Body flow chart of steps;
Fig. 4 is the gray level image effect diagram after simplification in the embodiment of the present invention;
Fig. 5 is gray level image matrix and original image matrix schematic diagram in the embodiment of the present invention;
Fig. 6 is the hardware device operating diagram of the embodiment of the present invention;
Fig. 7 is that the gray level image based on PCA simplifies schematic device in the embodiment of the present invention.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is further described, and the particular technique details hereinafter mentioned only makes reader be better understood from technical solution, not generation Present invention is limited only by following technical details for table.
The embodiment provides a kind of, and the gray level image based on PCA simplifies method, unit and storage Jie Matter.It is the overall flow figure that the gray level image based on PCA simplifies method in the embodiment of the present invention, the method referring to Fig. 1, Fig. 1 It is realized by hardware device, specific steps include:
S101:The gray level image matrix of gray level image is extracted, the gray level image includes:Appointing in three primary colours gray level image It anticipates a kind of or arbitrary several combination, the element type of the gray level image matrix includes:Floating-point type double precision.
S102:It compresses the gray level image matrix and obtains first compression gray level image matrix.
S103:It compresses the first compression gray level image matrix and obtains second-compressed gray level image matrix.
S104:Restore the gray level image after the second-compressed gray level image matrix is simplified.
It is to compress gray level image matrix in the embodiment of the present invention to obtain first compression gray level image matrix tool referring to Fig. 2, Fig. 2 Body flow chart of steps, including:
S201:Calculate mean value of the gray level image matrix per column element.
S202:Each element of the gray level image matrix subtracts the element mean value of column, obtains equal value difference matrix.
S203:Principal component analysis is carried out to the equal value difference matrix, obtains the characteristic value and feature of the equal value difference matrix Vector.
S204:The contribution rate individual amount threshold value for setting principal component analysis, according to the contribution rate individual amount threshold value, choosing The feature vector composition characteristic vector matrix for taking the equal value difference matrix, specifically includes:The contribution rate individual amount threshold value is 100, according to the descending sequence of contribution rate, choose in equal value difference matrix before contribution rate 100 100 feature vector composition characteristics Vector matrix.
S205:The equal value difference matrix right side multiplies described eigenvector matrix, obtains first compression gray level image matrix.
It is to compress first compression gray level image matrix in the embodiment of the present invention to obtain second-compressed gray-scale map referring to Fig. 3, Fig. 3 As matrix specific steps flow chart, including:
S301:First compression gray level image matrix described in transposition obtains transposed matrix, calculates the every column element of transposed matrix Mean value.
S302:Each element of the transposed matrix subtracts the element mean value of column, obtains the equal value difference matrix of transposition.
S303:Principal component analysis is carried out to the equal value difference matrix of the transposition, obtains the feature of the equal value difference matrix of the transposition Value and feature vector.
S304:The contribution rate individual amount critical value of principal component analysis is set, it is critical according to the contribution rate individual amount Value is chosen the feature vector composition transposition eigenvectors matrix of the equal value difference matrix of the transposition, is specifically included:The contribution rate Body quantity critical value is 60, according to the descending sequence of contribution rate, chooses in the equal value difference matrix of transposition 60 of before contribution rate 60 Feature vector forms transposition eigenvectors matrix.
S305:The transposition equal value difference matrix right side multiplies the transposition eigenvectors matrix, obtains second-compressed gray level image Matrix.
It is described to restore the gray level image after the second-compressed gray level image matrix is simplified, it specifically includes:Described two The second compression gray level image matrix right side multiplies the transposed matrix of the transposition eigenvectors matrix, obtains inverse matrix;The inverse matrix is right The transposed matrix for multiplying described eigenvector matrix, the gray level image after being simplified.
It is the gray level image effect diagram in the embodiment of the present invention after simplification referring to Fig. 4, Fig. 4, including:Original graph Simplify ash as 401, red primary gray level image 402, red primary simplify gray level image 403, green primary gray level image 404, green primary It spends image 405, blue primary gray level image 406, blue primary and simplifies gray level image 407.Original image 401 is decomposed into red primary gray scale Image 402, green primary gray level image 404 and blue primary gray level image 406.Red primary gray level image 402 is after overcompression restores It obtains red primary and simplifies gray level image 403.Green primary gray level image 404 obtains green primary after overcompression restores and simplifies gray-scale map As 405.Blue primary gray level image 406 obtains blue primary after overcompression restores and simplifies gray level image 407.It can be seen that simple Element after change in image substantially reduces, and compression ratio reaches 829.47.
It is gray level image matrix and original image matrix schematic diagram in the embodiment of the present invention referring to Fig. 5, Fig. 5, including:Red base Color shade image array 501, original image matrix 502, element minimum value 503 and element maximum value 504.Wherein, 520x520 tables Show and share 270400 elements, 520x520x3 indicates 811200 elements, wherein 3 indicate that three primary colours, uint8 indicate element Data type, element minimum value 503 indicates in 270400 elements in red primary gray level image matrix 501, minimum Element value is 3.In 270400 elements of the expression of element maximum value 504 in red primary gray level image matrix 501, maximum member Plain value is 255.
It is the hardware device operating diagram of the embodiment of the present invention referring to Fig. 6, Fig. 6, the hardware device specifically includes:One Gray level image of the kind based on PCA simplifies equipment 601, processor 602 and storage medium 603.
Gray level image based on PCA simplifies equipment 601:A kind of gray level image based on PCA simplifies equipment 601 and realizes A kind of gray level image based on PCA simplifies method.
Processor 602:The processor 602 loads and executes the instruction in the storage medium 603 and data for real A kind of existing gray level image based on PCA simplifies method.
Storage medium 603:603 store instruction of the storage medium and data;The storage medium 603 is for realizing described A kind of gray level image based on PCA simplify method.
It is the gray level image simplification schematic device based on PCA in the embodiment of the present invention referring to Fig. 7, Fig. 7, including:Gray scale Image array extraction module 701, first compression module 702, second-compressed module 703 and compression recovery module 704;The gray scale Image array extraction module 701 extracts the gray level image matrix of gray level image, and by gray level image Transfer-matrix to described primary Compression module 702;The first compression module 702 compresses gray level image matrix and obtains first compression gray level image matrix, and will The first compression gray level image Transfer-matrix gives the second-compressed module 703;The second-compressed module 703 is compressed described First compression gray level image matrix obtains second-compressed gray level image matrix, and by the second-compressed gray level image Transfer-matrix To the compression recovery module 704, the compression recovery module 704 restores the second-compressed gray level image matrix and is simplified Gray level image afterwards
By executing the embodiment of the present invention, all technical characteristics in the claims in the present invention are obtained for detailed explain It states.
It is different from the prior art, the embodiment provides a kind of, and the gray level image based on PCA simplifies method, sets Standby, device and storage medium compress gray level image by using PCA methods, it is possible to reduce the redundancy of gray level image is believed Breath reduces gray level image the space occupied in the electronic device.
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of gray level image based on PCA simplifies method, which is characterized in that including:
Step 1:Extract the gray level image matrix of gray level image;
Step 2:It compresses the gray level image matrix and obtains first compression gray level image matrix;
Step 3:It compresses the first compression gray level image matrix and obtains second-compressed gray level image matrix;
Step 4:Restore the gray level image after the second-compressed gray level image matrix is simplified.
2. the method as described in claim 1, which is characterized in that the gray level image includes:Appointing in three primary colours gray level image It anticipates a kind of or arbitrary several combination.
3. method as claimed in claim 1 or 2, which is characterized in that the compression gray level image matrix is once pressed Contracting gray level image matrix, including:
Step 1:Calculate mean value of the gray level image matrix per column element;
Step 2:Each element of the gray level image matrix subtracts the element mean value of column, obtains equal value difference matrix;
Step 3:Principal component analysis is carried out to the equal value difference matrix, obtain the equal value difference matrix characteristic value and feature to Amount;
Step 4:, according to contribution rate individual amount threshold value, choose the feature vector composition characteristic moment of a vector of the equal value difference matrix Battle array;
Step 5:The equal value difference matrix right side is multiplied into described eigenvector matrix, obtains first compression gray level image matrix.
4. method as claimed in claim 3, which is characterized in that the contribution rate individual amount threshold value is 100;It is described according to tribute Rate individual amount threshold value is offered, the feature vector composition characteristic vector matrix of the equal value difference matrix is chosen, specifically includes:According to tribute The descending sequence of rate is offered, 100 feature vector composition characteristic vector matrixs before contribution rate are chosen in equal value difference matrix.
5. method as claimed in claim 3, which is characterized in that the compression first compression gray level image matrix obtains two Second compression gray level image matrix, specific steps include:
Step 1:First compression gray level image matrix described in transposition obtains transposed matrix, and it is equal per column element to calculate transposed matrix Value;
Step 2:The element mean value that each element of the transposed matrix is subtracted to column obtains the equal value difference matrix of transposition;
Step 3:To the equal value difference matrix of the transposition carry out principal component analysis, obtain the equal value difference matrix of the transposition characteristic value and Feature vector;
Step 4:According to contribution rate individual amount critical value, the feature vector composition transposition for choosing the equal value difference matrix of the transposition is special Levy vector matrix;
Step 5:The transposition equal value difference matrix right side is multiplied into the transposition eigenvectors matrix, obtains second-compressed gray level image square Battle array.
6. method as claimed in claim 5, which is characterized in that the contribution rate individual amount critical value is 60;The basis Contribution rate individual amount critical value chooses the feature vector composition transposition eigenvectors matrix of the equal value difference matrix of the transposition, tool Body includes:, according to the descending sequence of contribution rate, 60 feature vectors compositions turn before contribution rate in the selection equal value difference matrix of transposition Set eigenvectors matrix.
7. method as claimed in claim 5, which is characterized in that the reduction second-compressed gray level image matrix obtains letter Gray level image after change, specifically includes:The second-compressed gray level image matrix right side multiplies turning for the transposition eigenvectors matrix Matrix is set, inverse matrix is obtained;The inverse matrix right side multiplies the transposed matrix of described eigenvector matrix, the gray-scale map after being simplified Picture.
8. a kind of active interactive device, which is characterized in that including:
At least one processor;And
At least one processor being connect with the processor communication, wherein:
The memory is stored with the program instruction that can be executed by the processor, and the processor calls described program to instruct energy It is enough to execute such as any the method for claim 1 to 7.
9. a kind of non-transient readable storage medium storing program for executing, which is characterized in that the non-transient readable storage medium storing program for executing stores program instruction, institute State program instruction for execute such as any the method for claim 1 to 7.
10. a kind of device being used for realizing any the method for claim 1 to 7, which is characterized in that including:Gray level image square Battle array extraction module, first compression module, second-compressed module and compression recovery module;The gray level image matrix extraction module carries The gray level image matrix of gray level image is taken, and gives gray level image Transfer-matrix to the first compression module;The first compression Module compression gray level image matrix obtains first compression gray level image matrix, and by the first compression gray level image Transfer-matrix To the second-compressed module;The second-compressed module compresses the first compression gray level image matrix and obtains second-compressed ash Image array is spent, and gives the compression recovery module, the compression to restore mould the second-compressed gray level image Transfer-matrix Block restores the gray level image after the second-compressed gray level image matrix is simplified.
CN201810123063.4A 2018-02-07 2018-02-07 PCA-based gray scale image simplification method, device, apparatus and storage medium Expired - Fee Related CN108492337B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810123063.4A CN108492337B (en) 2018-02-07 2018-02-07 PCA-based gray scale image simplification method, device, apparatus and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810123063.4A CN108492337B (en) 2018-02-07 2018-02-07 PCA-based gray scale image simplification method, device, apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN108492337A true CN108492337A (en) 2018-09-04
CN108492337B CN108492337B (en) 2020-07-03

Family

ID=63344693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810123063.4A Expired - Fee Related CN108492337B (en) 2018-02-07 2018-02-07 PCA-based gray scale image simplification method, device, apparatus and storage medium

Country Status (1)

Country Link
CN (1) CN108492337B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955676A (en) * 2014-05-12 2014-07-30 苏州大学 Human face identification method and system
CN104616000A (en) * 2015-02-27 2015-05-13 苏州大学 Human face recognition method and apparatus
CN104820696A (en) * 2015-04-29 2015-08-05 山东大学 Large-scale image retrieval method based on multi-label least square Hash algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955676A (en) * 2014-05-12 2014-07-30 苏州大学 Human face identification method and system
CN104616000A (en) * 2015-02-27 2015-05-13 苏州大学 Human face recognition method and apparatus
CN104820696A (en) * 2015-04-29 2015-08-05 山东大学 Large-scale image retrieval method based on multi-label least square Hash algorithm

Also Published As

Publication number Publication date
CN108492337B (en) 2020-07-03

Similar Documents

Publication Publication Date Title
Narayanaperumal et al. VLSI Implementations of Compressive Image Acquisition using Block Based Compression Algorithm.
CA2519358C (en) Color image compression via spectral decorrelation and elimination of spatial redundancy
CN105933708B (en) A kind of method and apparatus of data compression and decompression
CN107743235B (en) Image processing method, device and electronic equipment
Shen et al. Joint sparse representation model for multi-channel image based on reduced geometric algebra
US20190325557A1 (en) Image processing device, image processing method, and image processing program
CN105100814A (en) Methods and devices for image encoding and decoding
Pan et al. Enhanced fast encoding method for vector quantization by finding an optimally-ordered Walsh transform kernel
Chen et al. Color image inpainting via robust pure quaternion matrix completion: Error bound and weighted loss
CN104322063B (en) Method, system and the computer readable storage medium of video stream compression
Swathi et al. Image compression using singular value decomposition
CN109286819A (en) Combine explicit image encryption, decryption method and the device of compression
CN108492337A (en) A kind of gray level image simplification method, unit and storage medium based on PCA
CN104683818B (en) Method for compressing image based on biorthogonal invariant set m ultiwavelet
US20200013201A1 (en) Method and system for solving inverse problems in image processing using deep dictionary learning (ddl)
CN107169925B (en) The method for reconstructing of stepless zooming super-resolution image
CN107223259A (en) Image storage system based on tree
Neagoe An optimum 2d color space for pattern recognition.
CN115474048A (en) Rapid color image compression method based on split quaternion model
CN107172425A (en) Reduced graph generating method, device and terminal device
Moin et al. Face recognition in JPEG compressed domain: a novel coefficient selection approach
CN108460409A (en) A kind of fish identification method, equipment and storage medium based on PCA
CN110572652A (en) Static image processing method and device
Kountchev et al. Image color space transform with enhanced KLT
WO2015167519A1 (en) Color extrapolation from a first color space to a second color space

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200703

Termination date: 20210207

CF01 Termination of patent right due to non-payment of annual fee