CN115052160A - Image coding method and device based on cloud data automatic downloading and electronic equipment - Google Patents

Image coding method and device based on cloud data automatic downloading and electronic equipment Download PDF

Info

Publication number
CN115052160A
CN115052160A CN202210425363.4A CN202210425363A CN115052160A CN 115052160 A CN115052160 A CN 115052160A CN 202210425363 A CN202210425363 A CN 202210425363A CN 115052160 A CN115052160 A CN 115052160A
Authority
CN
China
Prior art keywords
image
similar
coded
cloud data
coding
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
CN202210425363.4A
Other languages
Chinese (zh)
Other versions
CN115052160B (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 Tobacco Jiangxi Industrial Co Ltd
Original Assignee
China Tobacco Jiangxi Industrial 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 China Tobacco Jiangxi Industrial Co Ltd filed Critical China Tobacco Jiangxi Industrial Co Ltd
Priority to CN202210425363.4A priority Critical patent/CN115052160B/en
Publication of CN115052160A publication Critical patent/CN115052160A/en
Application granted granted Critical
Publication of CN115052160B publication Critical patent/CN115052160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of cloud databases, in particular to an image coding method and device based on cloud data automatic downloading and an electronic device, wherein the image coding method and device comprise the following steps: the method comprises the steps of performing similarity retrieval in a cloud data image library by utilizing image characteristics to obtain a candidate similar image set, judging whether a similar image exists or not, if not, encoding an image to be encoded by utilizing an intra-frame encoding algorithm to obtain an encoded image, if so, preprocessing the similar image to obtain an encoded reference image and a preprocessing parameter, performing inter-frame predictive encoding on the image to be encoded to obtain an inter-frame encoding residual error, constructing a compressed code stream by utilizing the preprocessing parameter, the inter-frame encoding residual error and an image index of the similar image, and storing the compressed code stream in the cloud data image library. The invention also provides an image coding device based on cloud data automatic downloading, an electronic device and a computer readable storage medium. The method can solve the problems of low image data compression efficiency and low retrieval speed of the network cloud data gallery.

Description

Image coding method and device based on cloud data automatic downloading and electronic equipment
Technical Field
The invention relates to the technical field of cloud databases, in particular to an image coding method and device based on automatic cloud data downloading and electronic equipment.
Background
With the popularization of image acquisition equipment, a large amount of images are uploaded to the internet for storage, so that the storage pressure of a network cloud data gallery is greatly increased.
At present, the network cloud data gallery can reduce data storage pressure in a distributed storage mode, but the storage of image data does not fully utilize the existing image data in the network cloud data gallery to improve the compression efficiency of the image data, so that the storage pressure of the image data is reduced, and therefore the problems of low image data compression efficiency and low retrieval speed of the existing network cloud data gallery are caused.
Disclosure of Invention
The invention provides an image coding method and device based on cloud data automatic downloading and electronic equipment, and mainly aims to solve the problem.
In order to achieve the above object, the image encoding method based on cloud data automatic download provided by the present invention includes:
extracting image features of an image to be coded, and performing similar retrieval in a pre-constructed cloud data image library by using the image features to obtain a candidate similar image set;
judging whether the candidate similar image set has a similar image of the image to be coded;
if the candidate similar image set does not have the similar image of the image to be coded, coding the image to be coded by utilizing a pre-constructed intra-frame coding algorithm to obtain a coded image, and storing the coded image in the cloud data image library to finish coding of the image to be coded;
if the candidate similar image set has the similar image of the image to be coded, preprocessing the similar image to obtain a coding reference image and preprocessing parameters;
performing inter-frame prediction coding on the image to be coded by using the coding reference image to obtain an inter-frame coding residual error;
and extracting the image index of the similar image in the cloud data image library, constructing a compressed code stream by using the preprocessing parameter, the inter-frame coding residual error and the image index, and storing the compressed code stream in the cloud data image library to finish the coding of the image to be coded.
Optionally, the extracting image features of an image to be encoded includes:
carrying out interest point detection on the image to be coded to obtain an initial local feature point;
removing noise points in the initial local descriptor to obtain target local characteristic points;
compressing the target local characteristic points to obtain a local descriptor;
aggregating the target local feature points to obtain a global descriptor;
and constructing the image characteristics of the image to be coded according to the local descriptor and the global descriptor.
Optionally, the performing, by using the image features, a similarity search in a pre-constructed cloud data gallery to obtain a candidate similar image set includes:
extracting a global descriptor index table pre-constructed in the cloud data gallery;
matching the global descriptor in the image feature with the global descriptor of the image in the cloud data image library by using the global descriptor index table to obtain a Hamming distance sequence between the image in the cloud data image library and the image to be coded;
extracting a preset number of Hamming distances and images corresponding to the preset number of Hamming distances from the Hamming distance sequence according to the sequence from small to large;
and taking the images corresponding to the Hamming distances of the preset number as the candidate similar image set.
Optionally, before performing similarity retrieval in a pre-constructed cloud data gallery by using the image features to obtain a candidate similar image set, the method further includes:
extracting local characteristic points of all images in the cloud data image library;
aggregating each local feature point to obtain a global descriptor corresponding to each image;
and according to a plurality of pre-constructed index structures, constructing a global descriptor index table by using the global descriptor corresponding to each image.
Optionally, the determining whether a similar image of the image to be encoded exists in the candidate similar image set includes:
acquiring a similar image test set;
extracting local characteristic points of each image in the similar image test set;
aggregating the local feature points of each image in the similar image test set to obtain a global descriptor of each image in the similar image test set;
sequentially extracting images to be compared in the similar image test set;
matching the global descriptor of the image to be compared with global descriptors of other images in the similar image test set to obtain other images in the similar image test set and a Hamming distance set of the image to be compared;
extracting the maximum Hamming distance in the Hamming distance set to obtain the similar Hamming distance of the image to be compared;
extracting the maximum Hamming distance from the similar Hamming distances of all the images in the similar image test set to obtain a similar Hamming distance threshold;
judging whether a Hamming distance smaller than the similar Hamming distance threshold exists in a Hamming distance sequence corresponding to the candidate similar image;
if the Hamming distance smaller than the similar Hamming distance threshold does not exist in the Hamming distance sequence corresponding to the candidate similar images, judging that the similar images of the images to be coded do not exist in the candidate similar image set;
and if the Hamming distance smaller than the similar Hamming distance threshold exists in the Hamming distance sequence corresponding to the candidate similar images, judging that the similar images of the images to be coded exist in the candidate similar image set.
Optionally, before the preprocessing the similar image if the similar image of the image to be encoded exists in the candidate similar image set, the method further includes:
extracting all Hamming distances smaller than the similar Hamming threshold value to obtain a candidate Hamming distance set;
sequentially extracting images corresponding to each candidate Hamming distance in the candidate Hamming distance set to obtain a global similar image set;
extracting local feature points of each image in the global similar image set;
compressing the local characteristic point of each image in the global similar image set to obtain a local descriptor of each image in the global similar image set;
carrying out Hamming distance matching on the local descriptor of each image in the global similar image set and the local descriptor of the image to be coded to obtain a local Hamming distance sequence;
extracting the minimum Hamming distance in the local Hamming distance sequence and an image corresponding to the minimum Hamming distance;
and taking the image corresponding to the minimum Hamming distance as a similar image of the image to be coded.
Optionally, the preprocessing the similar image to obtain a coding reference image and a preprocessing parameter includes:
segmenting the similar image according to the feature points matched with the image to be coded to obtain a similar block set;
obtaining an optimal transformation matrix corresponding to each similar block in the similar block set by utilizing a pre-constructed feature point matching distance formula;
deforming the similar image by using the optimal transformation matrix corresponding to each similar block to obtain a deformed reference image;
according to the difference of the pixel values of the same positions of the image to be coded and the deformation reference image, carrying out illumination compensation on the deformation reference image to obtain the coding reference image;
and constructing the preprocessing parameters according to the optimal transformation matrix corresponding to each similar block and the numerical difference of the illumination compensation.
Optionally, the feature point matching distance formula is as follows:
Figure 902768DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 100002_DEST_PATH_IMAGE002
representing the distance value of the characteristic point between the similar block of the ith block and the corresponding block in the image to be coded,
Figure 100002_DEST_PATH_IMAGE003
represents the corresponding position of the i-th block similar block in the image to be coded,
Figure 100002_DEST_PATH_IMAGE004
indicating the position of the i-th block of similar blocks in the similar image,
Figure 100002_DEST_PATH_IMAGE005
a transformation matrix is represented that is,
Figure 100002_DEST_PATH_IMAGE006
representing the corresponding characteristic points of the i-th block similar block in the image to be coded,
Figure 100002_DEST_PATH_IMAGE007
and representing the characteristic points of the ith block of similar blocks in the similar image.
Optionally, the performing inter-frame prediction coding on the image to be coded by using the coded reference image to obtain an inter-frame coding residual includes:
performing block segmentation on the image to be coded and the coded reference image to obtain a block image set to be coded and a reference block image set;
sequentially extracting a to-be-coded block image from the to-be-coded block image set, and calculating the mean square error of the to-be-coded block image and each reference block image in the reference block image set to obtain the minimum mean square error corresponding to the to-be-coded block image and a similar reference block image;
and integrating the differences between all blocks to be coded in the image to be coded and the corresponding similar reference block images to obtain the inter-frame coding residual error.
In order to solve the above problem, the present invention also provides an image encoding apparatus based on cloud data automatic download, the apparatus including:
the candidate similar image set retrieval module is used for extracting image features of an image to be coded, and performing similar retrieval in a pre-constructed cloud data image library by utilizing the image features to obtain a candidate similar image set;
a similar image existence judging module, configured to judge whether a similar image of the image to be encoded exists in the candidate similar image set;
the intra-frame coding module is used for coding the image to be coded by utilizing a pre-constructed intra-frame coding algorithm to obtain a coded image if the candidate similar image set does not have the similar image of the image to be coded, and storing the coded image in the cloud data image library to finish the coding of the image to be coded;
the similar image preprocessing module is used for preprocessing the similar images to obtain a coding reference image and preprocessing parameters if the similar images of the images to be coded exist in the candidate similar image set;
and the inter-frame prediction coding module is used for performing inter-frame prediction coding on the image to be coded by utilizing the coding reference image to obtain an inter-frame coding residual error.
The compressed code stream storage module is configured to extract an image index of the similar image in the cloud data gallery, construct a compressed code stream by using the preprocessing parameter, the inter-frame coding residual and the image index, store the compressed code stream in the cloud data gallery, and complete coding of the image to be coded, so as to solve the above problem, the invention further provides an electronic device, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the cloud data automatic download-based image encoding method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the above image encoding method based on cloud data automatic download.
Compared with the background art, the method comprises the following steps: in the embodiment of the present invention, by using the image characteristics of the image to be encoded, the candidate similar image set is retrieved from the cloud data gallery, and further, whether a similar image of the image to be encoded exists in the candidate similar image set is determined, if not, the image to be encoded is compressed according to a general intra-frame encoding algorithm, if so, the image to be encoded is compressed by using the similar image, so as to improve the compression efficiency, the similar image needs to be preprocessed first to obtain the encoding reference image and the preprocessing parameter, then the encoding reference image is used to perform inter-frame prediction encoding to obtain the inter-frame encoding residual, and finally, according to the image index, the preprocessing parameter and the inter-frame encoding residual of the similar image, and constructing the compressed code stream, storing the compressed code stream in the cloud data image library, and finishing the encoding operation of the image to be encoded. Therefore, the image coding method and device based on cloud data automatic downloading and the electronic equipment can solve the problems of low image data compression efficiency and low retrieval speed of a network cloud data gallery.
Drawings
Fig. 1 is a schematic flowchart of an image encoding method based on cloud data automatic download according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart showing a detailed implementation of one of the steps in FIG. 1;
FIG. 3 is a schematic flow chart showing another step of FIG. 1;
fig. 4 is a functional block diagram of an image encoding apparatus for automatically downloading based on cloud data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing the image encoding method based on cloud data automatic downloading according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides an image coding method based on cloud data automatic downloading. The execution subject of the image coding method based on cloud data automatic downloading includes, but is not limited to, at least one of electronic devices such as a server and a terminal, which can be configured to execute the method provided by the embodiment of the present application. In other words, the image encoding method based on cloud data automatic download may be performed by software or hardware installed in a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Example 1:
fig. 1 is a schematic flowchart of an image encoding method based on cloud data automatic downloading according to an embodiment of the present invention. In this embodiment, the image encoding method based on cloud data automatic download includes:
and S1, extracting image features of the image to be coded, and performing similar retrieval in a pre-constructed cloud data gallery by using the image features to obtain a candidate similar image set.
Explicable, the image feature refers to a feature obtained by performing feature extraction on the image to be encoded by using the MPEG stabilized Compact Descriptor for Visual Search, CDVS for short. The visual search compact descriptor is a standard specified by a descriptor format, a feature extraction and search process of image retrieval by MPEG organization, occupies less bytes compared with general image features, has good retrieval and matching performance, and has faster feature extraction and matching speed.
Understandably, the cloud data gallery refers to a cloud data gallery for storing images. The candidate similar image set refers to similar images extracted from the cloud data gallery and possibly the image to be encoded.
In an embodiment of the present invention, the extracting image features of an image to be encoded includes:
carrying out interest point detection on the image to be coded to obtain an initial local feature point;
removing noise points in the initial local descriptor to obtain target local characteristic points;
compressing the target local characteristic points to obtain a local descriptor;
aggregating the target local feature points to obtain a global descriptor;
and constructing the image characteristics of the image to be coded according to the local descriptor and the global descriptor.
It should be understood that the initial local feature points need to be screened to remove noise points, and only important local feature points are retained.
Explainably, the global descriptor can be obtained by performing dimensionality reduction, aggregation and binarization processing on the target local feature points. And transforming and scalar quantizing the target local feature points to obtain the local descriptor. The target local feature points are compressed, so that byte occupation can be reduced, feature matching time can be reduced, the target local feature points are aggregated, the image to be coded can have information description of different levels, and the retrieval accuracy is improved.
In detail, as shown in fig. 2, the performing a similarity search in a pre-constructed cloud data map library by using the image features to obtain a candidate similar image set includes:
s11, extracting a global descriptor index table pre-constructed in the cloud data gallery;
s12, matching the global descriptor in the image feature with the global descriptor of the image in the cloud data gallery by using the global descriptor index table to obtain a Hamming distance sequence between the image in the cloud data gallery and the image to be coded;
s13, extracting a preset number of Hamming distances and images corresponding to the preset number of Hamming distances from the Hamming distance sequence in a descending order;
and S14, taking the images corresponding to the Hamming distances in the preset number as the candidate similar image set.
It should be appreciated that an index table of the global descriptor needs to be generated based on a multi-block index structure according to all images in the cloud data gallery, thereby improving the retrieval efficiency.
Understandably, the hamming distance refers to a method for measuring the distance of features, and represents the similarity between two features.
In the embodiment of the invention, a predetermined number of images need to be selected by using the global descriptor, the range of the candidate images is reduced by the predetermined number of images, the predetermined number can be 300, and similar images are selected from the predetermined number of images by using the local descriptor.
In detail, before performing similarity retrieval in a pre-constructed cloud data gallery by using the image features to obtain a candidate similar image set, the method further includes:
extracting local feature points of all images in the cloud data gallery;
aggregating each local feature point to obtain a global descriptor corresponding to each image;
and according to a plurality of pre-constructed index structures, constructing a global descriptor index table by using the global descriptor corresponding to each image.
S2, judging whether the candidate similar image set has a similar image of the image to be coded.
It can be understood that whether the similar image exists in the candidate similar image set or not needs to be judged, if so, the image to be coded is compressed and coded by using inter-frame prediction coding, and if the similar image does not exist in the candidate similar image set, the image to be coded is compressed by using an intra-frame coding algorithm.
In this embodiment of the present invention, the determining whether there is a similar image of the image to be encoded in the candidate similar image set includes:
acquiring a similar image test set;
extracting local characteristic points of each image in the similar image test set;
aggregating the local characteristic points of each image in the similar image test set to obtain a global descriptor of each image in the similar image test set;
sequentially extracting images to be compared in the similar image test set;
matching the global descriptor of the image to be compared with global descriptors of other images in the similar image test set to obtain a Hamming distance set of the other images in the similar image test set and the image to be compared;
extracting the maximum Hamming distance in the Hamming distance set to obtain the similar Hamming distance of the image to be compared;
extracting the maximum Hamming distance from the similar Hamming distances of all the images in the similar image test set to obtain a similar Hamming distance threshold value;
judging whether a Hamming distance smaller than the similar Hamming distance threshold exists in a Hamming distance sequence corresponding to the candidate similar image;
if the Hamming distance smaller than the similar Hamming distance threshold does not exist in the Hamming distance sequence corresponding to the candidate similar images, judging that the similar images of the images to be coded do not exist in the candidate similar image set;
and if the Hamming distance smaller than the similar Hamming distance threshold exists in the Hamming distance sequence corresponding to the candidate similar images, judging that the similar images of the images to be coded exist in the candidate similar image set.
Illustratively, the test set of similar images refers to a collection of a set of similar images. And judging whether similar images exist in the candidate similar images or not by using the similar Hamming distance threshold obtained by the similar image test set. And if the distance is smaller than the similar Hamming distance threshold value, indicating that similar images exist, otherwise, indicating that the similar images do not exist.
If the candidate similar image set does not have the similar image of the image to be coded, S3 is executed, a pre-constructed intra-frame coding algorithm is utilized to code the image to be coded, a coded image is obtained, the coded image is stored in the cloud data image library, and the coding of the image to be coded is completed.
In the embodiment of the invention, if the candidate similar image set does not have the similar image of the image to be coded, the encoding compression is carried out by utilizing the existing intra-frame encoding algorithm, and the image in the cloud data image library cannot be utilized. The intra-frame coding algorithm is the prior art and is not described herein again.
And if the candidate similar image set has the similar image of the image to be coded, executing S4, and preprocessing the similar image to obtain a coding reference image and preprocessing parameters.
It should be understood that the preprocessing refers to adjusting the shape and pixel value of the similar image to be close to the image to be encoded according to the image to be encoded, so as to facilitate subsequent processing.
In this embodiment of the present invention, before the preprocessing the similar image if the similar image of the image to be encoded exists in the candidate similar image set, the method further includes:
extracting all Hamming distances smaller than the similar Hamming threshold value to obtain a candidate Hamming distance set;
sequentially extracting images corresponding to each candidate Hamming distance in the candidate Hamming distance set to obtain a global similar image set;
extracting local feature points of each image in the global similar image set;
compressing the local feature points of each image in the global similar image set to obtain a local descriptor of each image in the global similar image set;
carrying out Hamming distance matching on the local descriptor of each image in the global similar image set and the local descriptor of the image to be coded to obtain a local Hamming distance sequence;
extracting the minimum Hamming distance in the local Hamming distance sequence and an image corresponding to the minimum Hamming distance;
and taking the image corresponding to the minimum Hamming distance as a similar image of the image to be coded.
Understandably, a smaller hamming distance indicates that the image to be encoded is more similar to the similar image.
In the embodiment of the present invention, the preprocessing the similar image to obtain a coded reference image and a preprocessing parameter includes:
segmenting the similar image according to the feature points matched with the image to be coded to obtain a similar block set;
obtaining an optimal transformation matrix corresponding to each similar block in the similar block set by utilizing a pre-constructed feature point matching distance formula;
deforming the similar image by using the optimal transformation matrix corresponding to each similar block to obtain a deformed reference image;
according to the difference of the pixel values of the same positions of the image to be coded and the deformation reference image, carrying out illumination compensation on the deformation reference image to obtain a coded reference image;
and constructing the preprocessing parameters according to the optimal transformation matrix corresponding to each similar block and the numerical difference of the illumination compensation.
In the embodiment of the present invention, the feature point matching distance formula is as follows:
Figure 633963DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE008
representing the distance value of the characteristic point between the similar block of the ith block and the corresponding block in the image to be coded,
Figure 627327DEST_PATH_IMAGE003
represents the corresponding position of the i-th block similar block in the image to be coded,
Figure 70072DEST_PATH_IMAGE004
indicating the position of the i-th block of similar blocks in the similar image,
Figure 807084DEST_PATH_IMAGE005
a transformation matrix is represented that is,
Figure 330469DEST_PATH_IMAGE006
representing the corresponding characteristic points of the i-th block similar block in the image to be coded,
Figure 697996DEST_PATH_IMAGE007
and representing the characteristic points of the ith block of the similar block in the similar image.
It can be understood that, according to the perspective transformation principle, a transformation matrix can be calculated for every four pairs of matched feature points, the matrix can represent deformation information such as rotation, translation, scaling and the like between images, and a plurality of transformation matrices can exist because most of the two images have more matched feature points.
And S5, performing interframe predictive coding on the image to be coded by using the coding reference image to obtain an interframe coding residual error.
It is understood that the inter-frame prediction coding may utilize hevc (high Efficiency Video coding) for coding prediction and image compression.
In detail, referring to fig. 3, the performing inter-frame prediction coding on the image to be coded by using the coding reference image to obtain an inter-frame coding residual includes:
s51, performing block segmentation on the image to be coded and the coded reference image to obtain a block image set to be coded and a reference block image set;
s52, sequentially extracting the block images to be coded in the block image set to be coded, and calculating the mean square error of the block images to be coded and each reference block image in the reference block image set to obtain the minimum mean square error corresponding to the block images to be coded and similar reference block images;
and S53, integrating the differences between all blocks to be coded in the image to be coded and the corresponding similar reference block images to obtain the inter-coded residual.
It should be understood that, in the process of inter-frame prediction encoding, the image to be encoded needs to be segmented, and then a similar reference block image with the minimum mean square error with the segmented block image to be encoded is searched in the similar image. And finally, obtaining the inter-frame coding residual error according to the difference between all similar reference block images and the corresponding block images to be coded.
S6, extracting image indexes of the similar images in the cloud data image library, constructing a compressed code stream by using the preprocessing parameters, the inter-frame coding residual errors and the image indexes, and storing the compressed code stream in the cloud data image library to complete the coding of the to-be-coded images.
In the embodiment of the invention, the compressed code stream can be constructed and stored in the cloud data gallery after the preprocessing parameters, the inter-frame coding residual errors and the image indexes are obtained. When decoding is needed, the similar image is extracted from the cloud data gallery only according to the image index, the preprocessing parameter is used for preprocessing the similar image, and the inter-frame coding residual and the processed similar image are used for calculating the image to be coded. The storage space is saved, and the retrieval efficiency is improved.
Compared with the background art: in the embodiment of the present invention, by using the image characteristics of the image to be encoded, the candidate similar image set is retrieved from the cloud data gallery, and further, whether a similar image of the image to be encoded exists in the candidate similar image set is determined, if not, the image to be encoded is compressed according to a general intra-frame encoding algorithm, if so, the image to be encoded is compressed by using the similar image, so as to improve the compression efficiency, the similar image needs to be preprocessed first to obtain the encoding reference image and the preprocessing parameter, then the encoding reference image is used to perform inter-frame prediction encoding to obtain the inter-frame encoding residual, and finally, according to the image index, the preprocessing parameter and the inter-frame encoding residual of the similar image, and constructing the compressed code stream, storing the compressed code stream in the cloud data image library, and finishing the encoding operation of the image to be encoded. Therefore, the image coding method and device based on cloud data automatic downloading and the electronic equipment can solve the problems of low image data compression efficiency and low retrieval speed of a network cloud data gallery.
Example 2:
fig. 4 is a functional block diagram of an image encoding apparatus for automatically downloading based on cloud data according to an embodiment of the present invention.
The image encoding apparatus 100 based on cloud data automatic download according to the present invention may be installed in an electronic device. According to the implemented functions, the image encoding apparatus 100 based on cloud data automatic downloading may include a candidate similar image set retrieval module 101, a similar image existence judgment module 102, an intra-frame encoding module 103, a similar image preprocessing module 104, an inter-frame prediction encoding module 105, and a compressed code stream storage module 106. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform a fixed function, and are stored in a memory of the electronic device.
The candidate similar image set retrieval module 101 is configured to extract image features of an image to be encoded, and perform similar retrieval in a pre-constructed cloud data gallery by using the image features to obtain a candidate similar image set;
explicable, the image feature refers to a feature obtained by performing feature extraction on the image to be encoded by using the MPEG stabilized Compact Descriptor for Visual Search, CDVS for short. The visual search compact descriptor is a standard specified by a descriptor format, a feature extraction and search process of image retrieval by MPEG organization, occupies less bytes compared with general image features, has good retrieval and matching performance, and has faster feature extraction and matching speed.
Understandably, the cloud data gallery refers to a cloud data gallery for storing images. The candidate similar image set refers to similar images extracted from the cloud data gallery and possibly the image to be encoded.
In an embodiment of the present invention, the extracting image features of an image to be encoded includes:
carrying out interest point detection on the image to be coded to obtain an initial local feature point;
removing noise points in the initial local descriptor to obtain target local characteristic points;
compressing the target local characteristic points to obtain a local descriptor;
aggregating the target local feature points to obtain a global descriptor;
and constructing the image characteristics of the image to be coded according to the local descriptor and the global descriptor.
It should be understood that the initial local feature points need to be screened to remove noise points, and only important local feature points are reserved.
Explainably, the global descriptor can be obtained by performing dimensionality reduction, aggregation and binarization processing on the target local feature points. And transforming and scalar quantizing the target local feature points to obtain the local descriptors. The target local feature points are compressed, so that byte occupation can be reduced, feature matching time can be reduced, the target local feature points are aggregated, the image to be coded can have information description of different levels, and the retrieval accuracy is improved.
In the embodiment of the present invention, the performing similarity retrieval in a pre-constructed cloud data gallery by using the image features to obtain a candidate similar image set includes:
extracting a global descriptor index table pre-constructed in the cloud data gallery;
matching the global descriptor in the image feature with the global descriptor of the image in the cloud data image library by using the global descriptor index table to obtain a Hamming distance sequence between the image in the cloud data image library and the image to be coded;
extracting a preset number of Hamming distances and images corresponding to the preset number of Hamming distances from the Hamming distance sequence according to a sequence from small to large;
and taking the images corresponding to the Hamming distances of the preset number as the candidate similar image set.
It should be appreciated that an index table of the global descriptor needs to be generated based on a multi-block index structure according to all images in the cloud data gallery, thereby improving the retrieval efficiency.
Understandably, the hamming distance refers to a method of measuring the distance of features, representing the similarity between two features.
In the embodiment of the invention, a predetermined number of images need to be selected by using the global descriptor, the range of the candidate images is reduced by the predetermined number of images, the predetermined number can be 300, and similar images are selected from the predetermined number of images by using the local descriptor.
In an embodiment of the present invention, before performing similarity retrieval in a pre-constructed cloud data gallery by using the image features to obtain a candidate similar image set, the method further includes:
extracting local feature points of all images in the cloud data gallery;
aggregating each local feature point to obtain a global descriptor corresponding to each image;
and according to a plurality of pre-constructed index structures, constructing a global descriptor index table by using the global descriptor corresponding to each image.
The similar image existence judging module 102 is configured to judge whether a similar image of the image to be encoded exists in the candidate similar image set;
it can be understood that whether the similar image exists in the candidate similar image set or not needs to be judged, if so, the image to be coded is compressed and coded by using inter-frame prediction coding, and if the similar image does not exist in the candidate similar image set, the image to be coded is compressed by using an intra-frame coding algorithm.
In this embodiment of the present invention, the determining whether the similar image of the image to be encoded exists in the candidate similar image set includes:
acquiring a similar image test set;
extracting local characteristic points of each image in the similar image test set;
aggregating the local feature points of each image in the similar image test set to obtain a global descriptor of each image in the similar image test set;
sequentially extracting images to be compared in the similar image test set;
matching the global descriptor of the image to be compared with global descriptors of other images in the similar image test set to obtain a Hamming distance set of the other images in the similar image test set and the image to be compared;
extracting the maximum Hamming distance in the Hamming distance set to obtain the similar Hamming distance of the image to be compared;
extracting the maximum Hamming distance from the similar Hamming distances of all the images in the similar image test set to obtain a similar Hamming distance threshold;
judging whether a Hamming distance smaller than the similar Hamming distance threshold exists in a Hamming distance sequence corresponding to the candidate similar image or not;
if the Hamming distance smaller than the similar Hamming distance threshold does not exist in the Hamming distance sequence corresponding to the candidate similar images, judging that the similar images of the images to be coded do not exist in the candidate similar image set;
and if the Hamming distance smaller than the similar Hamming distance threshold exists in the Hamming distance sequence corresponding to the candidate similar images, judging that the similar images of the images to be coded exist in the candidate similar image set.
Illustratively, the test set of similar images refers to a collection of a set of similar images. And judging whether similar images exist in the candidate similar images or not by using the similar Hamming distance threshold obtained by the similar image test set. And if the distance is smaller than the similar Hamming distance threshold value, indicating that similar images exist, otherwise, indicating that the similar images do not exist.
The intra-frame coding module 103 is configured to, if there is no similar image of the to-be-coded image in the candidate similar image set, code the to-be-coded image by using a pre-constructed intra-frame coding algorithm to obtain a coded image, and store the coded image in the cloud data gallery to complete coding of the to-be-coded image;
in the embodiment of the invention, if the candidate similar image set does not have the similar image of the image to be coded, the encoding compression is carried out by utilizing the existing intra-frame encoding algorithm, and the image in the cloud data image library cannot be utilized. The intra-frame coding algorithm is the prior art, and is not described herein again.
The similar image preprocessing module 104 is configured to, if a similar image of the to-be-encoded image exists in the candidate similar image set, perform preprocessing on the similar image to obtain an encoded reference image and a preprocessing parameter;
it should be understood that the preprocessing refers to adjusting the shape and pixel value of the similar image to be close to the image to be encoded according to the image to be encoded, so as to facilitate subsequent processing.
In an embodiment of the present invention, before the preprocessing the similar image if the similar image of the image to be encoded exists in the candidate similar image set, the method further includes:
extracting all Hamming distances smaller than the similar Hamming threshold value to obtain a candidate Hamming distance set;
sequentially extracting images corresponding to each candidate Hamming distance in the candidate Hamming distance set to obtain a global similar image set;
extracting local feature points of each image in the global similar image set;
compressing the local characteristic point of each image in the global similar image set to obtain a local descriptor of each image in the global similar image set;
carrying out Hamming distance matching on the local descriptor of each image in the global similar image set and the local descriptor of the image to be coded to obtain a local Hamming distance sequence;
extracting the minimum Hamming distance in the local Hamming distance sequence and an image corresponding to the minimum Hamming distance;
and taking the image corresponding to the minimum Hamming distance as a similar image of the image to be coded.
Understandably, a smaller hamming distance indicates that the image to be encoded is more similar to the similar image.
In the embodiment of the present invention, the preprocessing the similar image to obtain a coded reference image and a preprocessing parameter includes:
segmenting the similar image according to the feature points matched with the image to be coded to obtain a similar block set;
obtaining an optimal transformation matrix corresponding to each similar block in the similar block set by utilizing a pre-constructed feature point matching distance formula;
deforming the similar image by using the optimal transformation matrix corresponding to each similar block to obtain a deformed reference image;
according to the difference of the pixel values of the same positions of the image to be coded and the deformation reference image, carrying out illumination compensation on the deformation reference image to obtain the coding reference image;
and constructing the preprocessing parameters according to the optimal transformation matrix corresponding to each similar block and the numerical difference of the illumination compensation.
In the embodiment of the present invention, the feature point matching distance formula is as follows:
Figure 939622DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 401696DEST_PATH_IMAGE002
representing the distance value of the characteristic point between the similar block of the ith block and the corresponding block in the image to be coded,
Figure 45167DEST_PATH_IMAGE003
represents the corresponding position of the i-th block similar block in the image to be coded,
Figure 380334DEST_PATH_IMAGE004
indicating the position of the i-th block of similar blocks in the similar image,
Figure 46938DEST_PATH_IMAGE005
a transformation matrix is represented by a matrix of a transformation,
Figure 125753DEST_PATH_IMAGE006
representing the corresponding characteristic points of the i-th block similar block in the image to be coded,
Figure 623730DEST_PATH_IMAGE007
and representing the characteristic points of the ith block of the similar block in the similar image.
It can be understood that according to the perspective transformation principle, a transformation matrix can be calculated for every four pairs of matched feature points, the matrix can represent deformation information such as rotation, translation, scaling and the like between images, and a plurality of transformation matrices can exist because most of the two images have more matched feature points.
The inter-frame prediction coding module 105 is configured to perform inter-frame prediction coding on the image to be coded by using the coding reference image to obtain an inter-frame coding residual;
it is understood that the inter-frame prediction coding may utilize hevc (high Efficiency Video coding) for coding prediction and image compression.
In this embodiment of the present invention, the performing inter-frame prediction coding on the image to be coded by using the coding reference image to obtain an inter-frame coding residual includes:
performing block segmentation on the image to be coded and the coding reference image to obtain a block image set to be coded and a reference block image set;
sequentially extracting a to-be-coded block image from the to-be-coded block image set, and calculating the mean square error of the to-be-coded block image and each reference block image in the reference block image set to obtain the minimum mean square error corresponding to the to-be-coded block image and a similar reference block image;
and integrating the differences between all blocks to be coded in the image to be coded and the corresponding similar reference block images to obtain the inter-frame coding residual error.
It should be understood that, in the inter-frame prediction encoding process, the image to be encoded needs to be segmented, and then a similar reference block image with the minimum mean square error with the segmented block image to be encoded is found in the similar image. And finally, obtaining the inter-frame coding residual error according to the difference between all similar reference block images and the corresponding block images to be coded.
The compressed code stream storage module 106 is configured to extract an image index of the similar image in the cloud data gallery, construct a compressed code stream by using the preprocessing parameter, the inter-frame coding residual and the image index, store the compressed code stream in the cloud data gallery, and complete coding of the image to be coded.
In the embodiment of the invention, the compressed code stream can be constructed and stored in the cloud data gallery after the preprocessing parameters, the inter-frame coding residual errors and the image indexes are obtained. When decoding is needed, the similar image is extracted from the cloud data gallery only according to the image index, the preprocessing parameter is used for preprocessing the similar image, and the inter-frame coding residual and the processed similar image are used for calculating the image to be coded. The storage space is saved, and the retrieval efficiency is improved.
In detail, the image encoding device 100 based on cloud data automatic download according to the embodiment of the present invention can produce the following technical effects:
compared with the background art: in the embodiment of the present invention, by using the image characteristics of the image to be encoded, the candidate similar image set is retrieved from the cloud data gallery, and further, whether a similar image of the image to be encoded exists in the candidate similar image set is determined, if not, the image to be encoded is compressed according to a general intra-frame encoding algorithm, if so, the image to be encoded is compressed by using the similar image, so as to improve the compression efficiency, the similar image needs to be preprocessed first to obtain the encoding reference image and the preprocessing parameter, then the encoding reference image is used to perform inter-frame prediction encoding to obtain the inter-frame encoding residual, and finally, according to the image index, the preprocessing parameter and the inter-frame encoding residual of the similar image, and constructing the compressed code stream, storing the compressed code stream in the cloud data image library, and finishing the encoding operation of the image to be encoded. Therefore, the image coding method and device based on cloud data automatic downloading and the electronic equipment can solve the problems of low image data compression efficiency and low retrieval speed of a network cloud data gallery.
Example 3:
fig. 5 is a schematic structural diagram of an electronic device implementing an image encoding method based on cloud data automatic downloading according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11, a bus 12, and a communication interface 13, and may further include a computer program, such as an image encoding program automatically downloaded based on cloud data, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of an image encoding program automatically downloaded based on cloud data, etc., but also to temporarily store data that has been output or is to be output.
The processor 10 may be formed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed of a plurality of integrated circuits packaged with the same function or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., image coding programs automatically downloaded based on cloud data, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device 1 and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The image encoding program stored in the memory 11 of the electronic device 1 and automatically downloaded based on cloud data is a combination of a plurality of instructions, and when running in the processor 10, can realize that:
extracting image features of an image to be coded, and performing similar retrieval in a pre-constructed cloud data image library by using the image features to obtain a candidate similar image set;
judging whether the candidate similar image set has a similar image of the image to be coded;
if the candidate similar image set does not have the similar image of the image to be coded, coding the image to be coded by utilizing a pre-constructed intra-frame coding algorithm to obtain a coded image, and storing the coded image in the cloud data image library to finish coding of the image to be coded;
if the candidate similar image set has the similar image of the image to be coded, preprocessing the similar image to obtain a coding reference image and preprocessing parameters;
performing inter-frame prediction coding on the image to be coded by using the coding reference image to obtain an inter-frame coding residual error;
and extracting the image index of the similar image in the cloud data image library, constructing a compressed code stream by using the preprocessing parameter, the inter-frame coding residual error and the image index, and storing the compressed code stream in the cloud data image library to finish the coding of the image to be coded.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiments corresponding to fig. 1 to fig. 4, which is not repeated herein.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
extracting image features of an image to be coded, and performing similar retrieval in a pre-constructed cloud data image library by using the image features to obtain a candidate similar image set;
judging whether the candidate similar image set has a similar image of the image to be coded;
if the candidate similar image set does not have the similar image of the image to be coded, coding the image to be coded by utilizing a pre-constructed intra-frame coding algorithm to obtain a coded image, and storing the coded image in the cloud data image library to finish coding of the image to be coded;
if the candidate similar image set has the similar image of the image to be coded, preprocessing the similar image to obtain a coding reference image and preprocessing parameters;
performing inter-frame prediction coding on the image to be coded by using the coding reference image to obtain an inter-frame coding residual error;
and extracting the image index of the similar image in the cloud data image library, constructing a compressed code stream by using the preprocessing parameter, the inter-frame coding residual error and the image index, and storing the compressed code stream in the cloud data image library to finish the coding of the image to be coded.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An image coding method based on cloud data automatic downloading is characterized by comprising the following steps:
extracting image features of an image to be coded, and performing similar retrieval in a pre-constructed cloud data image library by using the image features to obtain a candidate similar image set;
judging whether the candidate similar image set has a similar image of the image to be coded;
if the candidate similar image set does not have the similar image of the image to be coded, coding the image to be coded by utilizing a pre-constructed intra-frame coding algorithm to obtain a coded image, and storing the coded image in the cloud data image library to finish coding of the image to be coded;
if the candidate similar image set has the similar image of the image to be coded, preprocessing the similar image to obtain a coding reference image and preprocessing parameters;
performing inter-frame prediction coding on the image to be coded by using the coding reference image to obtain an inter-frame coding residual error;
and extracting the image index of the similar image in the cloud data image library, constructing a compressed code stream by using the preprocessing parameter, the inter-frame coding residual error and the image index, and storing the compressed code stream in the cloud data image library to finish the coding of the image to be coded.
2. The image coding method based on automatic cloud data downloading of claim 1, wherein the extracting image features of the image to be coded comprises:
carrying out interest point detection on the image to be coded to obtain an initial local feature point;
removing noise points in the initial local descriptors to obtain target local feature points;
compressing the target local characteristic points to obtain a local descriptor;
aggregating the target local feature points to obtain a global descriptor;
and constructing the image characteristics of the image to be coded according to the local descriptor and the global descriptor.
3. The image coding method based on cloud data automatic downloading according to claim 2, wherein the performing similarity search in a pre-constructed cloud data gallery by using the image features to obtain a candidate similar image set comprises:
extracting a global descriptor index table pre-constructed in the cloud data gallery;
matching the global descriptor in the image feature with the global descriptor of the image in the cloud data image library by using the global descriptor index table to obtain a Hamming distance sequence between the image in the cloud data image library and the image to be coded;
extracting a preset number of Hamming distances and images corresponding to the preset number of Hamming distances from the Hamming distance sequence according to a sequence from small to large;
and taking the images corresponding to the Hamming distances of the preset number as the candidate similar image set.
4. The image encoding method based on cloud data automatic downloading according to claim 3, wherein before performing similarity search in a pre-constructed cloud data gallery by using the image features to obtain a candidate similar image set, the method further comprises:
extracting local feature points of all images in the cloud data gallery;
aggregating each local feature point to obtain a global descriptor corresponding to each image;
and according to a plurality of pre-constructed index structures, constructing a global descriptor index table by using the global descriptor corresponding to each image.
5. The image coding method based on cloud data automatic downloading according to claim 4, wherein the determining whether the similar image of the image to be coded exists in the candidate similar image set comprises:
acquiring a similar image test set;
extracting local characteristic points of each image in the similar image test set;
aggregating the local feature points of each image in the similar image test set to obtain a global descriptor of each image in the similar image test set;
sequentially extracting images to be compared in the similar image test set;
matching the global descriptor of the image to be compared with global descriptors of other images in the similar image test set to obtain a Hamming distance set of the other images in the similar image test set and the image to be compared;
extracting the maximum Hamming distance in the Hamming distance set to obtain the similar Hamming distance of the image to be compared;
extracting the maximum Hamming distance from the similar Hamming distances of all the images in the similar image test set to obtain a similar Hamming distance threshold;
judging whether a Hamming distance smaller than the similar Hamming distance threshold exists in a Hamming distance sequence corresponding to the candidate similar image;
if the Hamming distance smaller than the similar Hamming distance threshold does not exist in the Hamming distance sequence corresponding to the candidate similar images, judging that the similar images of the images to be coded do not exist in the candidate similar image set;
and if the Hamming distance smaller than the similar Hamming distance threshold exists in the Hamming distance sequence corresponding to the candidate similar images, judging that the similar images of the images to be coded exist in the candidate similar image set.
6. The image encoding method based on automatic cloud data downloading of claim 5, wherein before the similar image of the image to be encoded exists in the candidate similar image set, the method further comprises:
extracting all Hamming distances smaller than the similar Hamming threshold value to obtain a candidate Hamming distance set;
sequentially extracting images corresponding to each candidate Hamming distance in the candidate Hamming distance set to obtain a global similar image set;
extracting local feature points of each image in the global similar image set;
compressing the local characteristic point of each image in the global similar image set to obtain a local descriptor of each image in the global similar image set;
carrying out Hamming distance matching on the local descriptor of each image in the global similar image set and the local descriptor of the image to be coded to obtain a local Hamming distance sequence;
extracting the minimum Hamming distance in the local Hamming distance sequence and an image corresponding to the minimum Hamming distance;
and taking the image corresponding to the minimum Hamming distance as a similar image of the image to be coded.
7. The image coding method based on cloud data automatic downloading according to claim 5, wherein the preprocessing the similar image to obtain a coding reference image and preprocessing parameters comprises:
segmenting the similar image according to the characteristic points matched with the image to be coded to obtain a similar block set;
obtaining an optimal transformation matrix corresponding to each similar block in the similar block set by utilizing a pre-constructed feature point matching distance formula;
deforming the similar image by using the optimal transformation matrix corresponding to each similar block to obtain a deformed reference image;
according to the difference of the pixel values of the same positions of the image to be coded and the deformation reference image, carrying out illumination compensation on the deformation reference image to obtain a coded reference image;
and constructing the preprocessing parameters according to the optimal transformation matrix corresponding to each similar block and the numerical difference of the illumination compensation.
8. The image encoding method based on cloud data automatic download according to claim 7, wherein the feature point matching distance formula is as follows:
Figure DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE002
representing the distance value of the characteristic point between the similar block of the ith block and the corresponding block in the image to be coded,
Figure DEST_PATH_IMAGE003
represents the corresponding position of the i-th block similar block in the image to be coded,
Figure DEST_PATH_IMAGE004
indicating the position of the i-th block of similar blocks in the similar image,
Figure DEST_PATH_IMAGE005
a transformation matrix is represented that is,
Figure DEST_PATH_IMAGE006
representing the corresponding characteristic points of the i-th block similar block in the image to be coded,
Figure DEST_PATH_IMAGE007
and representing the characteristic points of the ith block of the similar block in the similar image.
9. The image coding method based on cloud data automatic download of claim 7, wherein the using the coding reference image to perform inter-frame prediction coding on the image to be coded to obtain an inter-frame coding residual comprises:
performing block segmentation on the image to be coded and the coded reference image to obtain a block image set to be coded and a reference block image set;
sequentially extracting a to-be-coded block image from the to-be-coded block image set, and calculating the mean square error of the to-be-coded block image and each reference block image in the reference block image set to obtain the minimum mean square error corresponding to the to-be-coded block image and a similar reference block image;
and integrating the differences between all blocks to be coded in the image to be coded and the corresponding similar reference block images to obtain the inter-frame coding residual error.
10. An image encoding apparatus for automatic cloud data download, the apparatus comprising:
the candidate similar image set retrieval module is used for extracting image features of an image to be coded, and performing similar retrieval in a pre-constructed cloud data image library by utilizing the image features to obtain a candidate similar image set;
a similar image existence judging module, configured to judge whether a similar image of the image to be encoded exists in the candidate similar image set;
the intra-frame coding module is used for coding the image to be coded by utilizing a pre-constructed intra-frame coding algorithm if the candidate similar image set does not have the similar image of the image to be coded, so as to obtain a coded image, and storing the coded image in the cloud data image library, so as to complete the coding of the image to be coded;
the similar image preprocessing module is used for preprocessing the similar images to obtain a coding reference image and preprocessing parameters if the similar images of the images to be coded exist in the candidate similar image set;
the inter-frame prediction coding module is used for performing inter-frame prediction coding on the image to be coded by utilizing the coding reference image to obtain an inter-frame coding residual error;
and the compressed code stream storage module is used for extracting the image index of the similar image in the cloud data image library, constructing a compressed code stream by using the preprocessing parameter, the inter-frame coding residual error and the image index, and storing the compressed code stream in the cloud data image library to complete the coding of the image to be coded.
CN202210425363.4A 2022-04-22 2022-04-22 Image coding method and device based on cloud data automatic downloading and electronic equipment Active CN115052160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210425363.4A CN115052160B (en) 2022-04-22 2022-04-22 Image coding method and device based on cloud data automatic downloading and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210425363.4A CN115052160B (en) 2022-04-22 2022-04-22 Image coding method and device based on cloud data automatic downloading and electronic equipment

Publications (2)

Publication Number Publication Date
CN115052160A true CN115052160A (en) 2022-09-13
CN115052160B CN115052160B (en) 2023-07-07

Family

ID=83157126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210425363.4A Active CN115052160B (en) 2022-04-22 2022-04-22 Image coding method and device based on cloud data automatic downloading and electronic equipment

Country Status (1)

Country Link
CN (1) CN115052160B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004064518A (en) * 2002-07-30 2004-02-26 Nec Corp Moving image encoding method and device and its computer program
JP2007142498A (en) * 2005-11-14 2007-06-07 Nippon Telegr & Teleph Corp <Ntt> Image decoding device and program, and computer-readable recording medium
US20140222953A1 (en) * 2013-02-06 2014-08-07 International Business Machines Corporation Reliable and Scalable Image Transfer For Data Centers With Low Connectivity Using Redundancy Detection
US8913851B1 (en) * 2011-04-29 2014-12-16 Google Inc. Fingerprinting image using points of interest for robust image identification
CN104768011A (en) * 2015-03-31 2015-07-08 浙江大学 Image encoding and decoding method and related device
CN106682092A (en) * 2016-11-29 2017-05-17 深圳市华尊科技股份有限公司 Target retrieval method and terminal
CN108259914A (en) * 2018-03-20 2018-07-06 西安电子科技大学 Cloud method for encoding images based on object library
CN109522436A (en) * 2018-11-29 2019-03-26 厦门美图之家科技有限公司 Similar image lookup method and device
WO2019148906A1 (en) * 2018-02-01 2019-08-08 腾讯科技(深圳)有限公司 Video coding method, computer device, and storage medium
CN110134804A (en) * 2019-05-20 2019-08-16 北京达佳互联信息技术有限公司 Image search method, device and storage medium
CN111935487A (en) * 2020-08-12 2020-11-13 汪礼君 Image compression method and system based on video stream detection
CN112887732A (en) * 2021-04-30 2021-06-01 浙江智慧视频安防创新中心有限公司 Method and device for inter-frame and intra-frame joint prediction coding and decoding with configurable weight
CN113343920A (en) * 2021-07-01 2021-09-03 中诚信征信有限公司 Method and device for classifying face recognition photos, electronic equipment and storage medium
CN113422959A (en) * 2021-05-31 2021-09-21 浙江智慧视频安防创新中心有限公司 Video encoding and decoding method and device, electronic equipment and storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004064518A (en) * 2002-07-30 2004-02-26 Nec Corp Moving image encoding method and device and its computer program
JP2007142498A (en) * 2005-11-14 2007-06-07 Nippon Telegr & Teleph Corp <Ntt> Image decoding device and program, and computer-readable recording medium
US8913851B1 (en) * 2011-04-29 2014-12-16 Google Inc. Fingerprinting image using points of interest for robust image identification
US20140222953A1 (en) * 2013-02-06 2014-08-07 International Business Machines Corporation Reliable and Scalable Image Transfer For Data Centers With Low Connectivity Using Redundancy Detection
CN104768011A (en) * 2015-03-31 2015-07-08 浙江大学 Image encoding and decoding method and related device
CN106682092A (en) * 2016-11-29 2017-05-17 深圳市华尊科技股份有限公司 Target retrieval method and terminal
WO2019148906A1 (en) * 2018-02-01 2019-08-08 腾讯科技(深圳)有限公司 Video coding method, computer device, and storage medium
CN108259914A (en) * 2018-03-20 2018-07-06 西安电子科技大学 Cloud method for encoding images based on object library
CN109522436A (en) * 2018-11-29 2019-03-26 厦门美图之家科技有限公司 Similar image lookup method and device
CN110134804A (en) * 2019-05-20 2019-08-16 北京达佳互联信息技术有限公司 Image search method, device and storage medium
CN111935487A (en) * 2020-08-12 2020-11-13 汪礼君 Image compression method and system based on video stream detection
CN112887732A (en) * 2021-04-30 2021-06-01 浙江智慧视频安防创新中心有限公司 Method and device for inter-frame and intra-frame joint prediction coding and decoding with configurable weight
CN113422959A (en) * 2021-05-31 2021-09-21 浙江智慧视频安防创新中心有限公司 Video encoding and decoding method and device, electronic equipment and storage medium
CN113343920A (en) * 2021-07-01 2021-09-03 中诚信征信有限公司 Method and device for classifying face recognition photos, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115052160B (en) 2023-07-07

Similar Documents

Publication Publication Date Title
KR101565265B1 (en) Coding of feature location information
EP2801190B1 (en) Method for processing an image
CN111431537A (en) Data compression method and device and computer readable storage medium
CN110110113A (en) Image search method, system and electronic device
CN113705462B (en) Face recognition method, device, electronic equipment and computer readable storage medium
CN115443490A (en) Image auditing method and device, equipment and storage medium
CN112560845A (en) Character recognition method and device, intelligent meal taking cabinet, electronic equipment and storage medium
CN113283446A (en) Method and device for identifying target object in image, electronic equipment and storage medium
CN113157962B (en) Image retrieval method, electronic device, and storage medium
CN111177450B (en) Image retrieval cloud identification method and system and computer readable storage medium
CN117314863A (en) Defect output method, device, equipment and storage medium
CN112329666A (en) Face recognition method and device, electronic equipment and storage medium
CN115409041B (en) Unstructured data extraction method, device, equipment and storage medium
CN115052160B (en) Image coding method and device based on cloud data automatic downloading and electronic equipment
CN115798004A (en) Face card punching method and device based on local area, electronic equipment and medium
CN115719490A (en) Rapid battery cell identification and detection coding method, device, equipment and storage medium
CN115561700A (en) Method and device for analyzing metering standard of direct current electric energy meter
CN115205758A (en) Intelligent conversion method and device based on video and text, electronic equipment and medium
US9756342B2 (en) Method for context based encoding of a histogram map of an image
CN112580505A (en) Method and device for identifying opening and closing states of network points, electronic equipment and storage medium
CN112802088A (en) Transmission control method and device based on image processing technology
CN116257488B (en) Geotechnical engineering investigation big data archiving method, device, electronic equipment and medium
CN117076713B (en) Video fingerprint extraction and retrieval method
CN116431711B (en) Data intelligent acquisition method and system based on data characteristics
CN111475719B (en) Information pushing method and device based on data mining and storage medium

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