Method and device for receiving pictures

A receiving method and image technology, which is applied in the field of data processing, can solve problems such as conflicts between image standardization requirements and user convenience requirements, and achieve the effects of reducing uploading conditions, alleviating contradictions, and improving user experience

Inactive Publication Date: 2015-01-28
CHINA CONSTRUCTION BANK
6 Cites 5 Cited by

AI-Extracted Technical Summary

Problems solved by technology

[0007] In view of this, the purpose of the embodiments of the present invention is to provide a picture receiving method and a pictu...
View more

Method used

[0038] (1) The attribute of the uploaded picture is not required, nor is the uploaded picture processed. This method is relatively simple to implement and is also convenient for users. However, due to the different sources and processing techniques of the uploaded pictures, th...
View more

Abstract

An embodiment of the invention discloses a method and a device for receiving pictures. The method includes enabling a picture receiving end to receive uploaded pictures; enabling the picture receiving end to judge whether the uploaded pictures meet standardization requirements or not; enabling the picture receiving end to store the uploaded pictures if the uploaded pictures meet the standardization requirements; enabling the picture receiving end to adjust attribute parameter values of the uploaded pictures if the uploaded pictures do not meet the standardization requirements until the uploaded pictures meet the standardization requirements or until all the attribute parameter values of the uploaded pictures are completely adjusted but the uploaded pictures still do not meet the standardization requirements. The method and the device in the embodiment of the invention have the advantages that the attribute parameter values of the uploaded pictures can be adjusted by the picture receiving end when the uploaded pictures do not meet the standardization requirements, the uploaded pictures can be stored if the uploaded pictures meet the standardization requirements after the uploaded pictures are adjusted, and accordingly the uploaded pictures can be assuredly standardized; the pictures are adjusted at the picture receiving end, so that inconvenience for users can be prevented; the requirement on picture standardization and convenience requirements of users can be taken into consideration to a certain extent, and accordingly the conflict between picture standardization and convenience for the users can be relieved.

Application Domain

Still image data retrievalSpecial data processing applications

Technology Topic

Data scienceComputer graphics (images) +2

Image

  • Method and device for receiving pictures
  • Method and device for receiving pictures
  • Method and device for receiving pictures

Examples

  • Experimental program(1)

Example Embodiment

[0035] The drawings in the specification clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
[0036] Many scenes require image upload. For example, on an e-commerce platform, both merchants and individual users (collectively referred to as image uploaders or users) need to upload a large number of images to the e-commerce platform: merchants upload a large number of product display images, and individual users upload and share purchased products Related pictures of.
[0037] For uploaded pictures, traditional picture receivers (such as e-commerce platforms) have the following processing methods:
[0038] (1) No requirements are imposed on the attributes of uploaded pictures, and no uploaded pictures are processed. This method is relatively simple to implement and convenient for users. However, due to the different sources and processing technologies of the uploaded pictures, the attributes of the pictures (which can include at least one of picture size, resolution, storage bits, storage format and compression ratio) are also different, which may cause the picture to end up on the web page The display effect on the template is very different.
[0039] (2) Specify the attributes of the uploaded picture, such as the size and format of the picture. In this way, the uploaded pictures received by the picture receiving end are relatively standardized and consistent pictures, and the final display effect of the uploaded pictures on the web page template is relatively consistent. However, this method has strict requirements for users' upload conditions and requires users to master better image processing technology. Therefore, although it can obtain prescribed uploaded images, it brings inconvenience to users and is not applicable.
[0040] Therefore, in the existing methods, there is a problem that the image standardization requirements contradict the user convenience requirements.
[0041] To solve the above-mentioned contradiction, an embodiment of the present invention provides a picture receiving method. The execution subject is the picture receiving end.
[0042] The picture receiving end can be a server, such as a server on an e-commerce platform, or a functional module in the server.
[0043] See figure 1 The above method may at least include the following steps:
[0044] S1. The picture receiving terminal receives the uploaded picture.
[0045] S2. The above-mentioned picture receiving terminal judges whether the uploaded picture meets the standardized conditions.
[0046] The aforementioned normalization condition may include that the consistency between the attribute parameter value of the uploaded picture and the preset attribute parameter value is greater than a threshold.
[0047] The file header of the image file contains the attribute information of the file, so the attributes of the uploaded image and the corresponding attribute parameter values ​​can be read out.
[0048] The above attributes may include at least one of picture size, resolution, storage bits, storage format, and compression ratio.
[0049] As for the preset attribute parameter value, a standard picture can be stored in advance, and its attribute parameter value can be used as the preset attribute parameter value. Of course, the standard attribute parameter value can also be directly set as the preset attribute parameter value.
[0050] It should be noted that different scenarios have different requirements for the attribute parameter values ​​of the picture. For example, for a scene that requires the upload of ID photos, and a scene that requires the upload of a product image, at least the requirements for the image size are different. Therefore, different standard pictures can be preset for different scenes.
[0051] This article will detail how to obtain consistency later in this article.
[0052] S3. If it is determined that the aforementioned standardization conditions are satisfied, the aforementioned picture receiving end directly stores the aforementioned uploaded picture;
[0053] S4. If it is determined that the above-mentioned normalization conditions are not met, the above-mentioned picture receiving end adjusts the attribute parameter values ​​of the uploaded picture until the above-mentioned normalization conditions are met (adjustment is successful), or until the attribute parameter values ​​of all attributes of the uploaded picture have been adjusted but still not Meet the above standardization conditions (adjustment failure).
[0054] When adjusting the attribute parameter value of the uploaded image, you can adjust the attribute parameter value of only one attribute at a time, or adjust the attribute parameter values ​​of multiple attributes at once.
[0055] Because attributes can include picture size, resolution, storage bits, storage format, compression ratio, and so on. For different attributes, the adjustment methods are different.
[0056] For example, for the picture size and resolution, you can use image interpolation algorithm to process; for the number of bits, you can use the level quantization method to adjust; for the storage format, you can convert according to the format of the preset standard picture; for the compression ratio, you can The compression algorithm is used for compression, and the embodiment of the present invention specifically uses a frequency transform domain compression algorithm.
[0057] It can be seen that in the embodiment of the present invention, at the image receiving end, if the uploaded image meets the normalization conditions, the uploaded image is stored. When the uploaded image does not meet the normalization conditions, the image receiving end will adjust the attribute parameter value of the uploaded image. When the normalization conditions are met later, the uploaded image will also be stored, which ensures the normalization of the uploaded image and obtains a better display effect in the subsequent use of the image. Moreover, for the user side, since the adjustment of the picture is carried out at the picture receiving end, the restrictions on the uploading conditions of the user are reduced, and the user is relatively not required to master the corresponding picture processing technology, thus improving the picture receiving process User experience. That is, the embodiments of the present invention can take into account the requirements of picture standardization and user convenience to a certain extent, and alleviate the contradiction between picture standardization and user convenience.
[0058] In other embodiments of the present invention, after step S3, all the above embodiments may further include the following step: the picture receiving end displays the stored uploaded picture. This allows the user to obtain an intuitive visual display effect.
[0059] In other embodiments of the present invention, after step S4, regardless of whether the adjustment is successful (the so-called adjustment success refers to that the consistency between the adjusted attribute parameter value of the uploaded image and the preset attribute parameter value is greater than the threshold), the above All embodiments may also include:
[0060] The picture receiving end displays the adjusted uploaded picture.
[0061] It should be noted that the adjusted uploaded image is still displayed after the adjustment fails, so that the user can intuitively feel which aspects of the image need to be processed.
[0062] In other embodiments of the present invention, when the adjustment fails, that is, when the attribute parameter values ​​of all attributes of the uploaded image have been adjusted but still do not meet the standardization conditions, all the above embodiments may further include the following steps: the image receiving terminal prompts to upload the image Does not meet the standardization requirements.
[0063] In addition, after the adjustment fails, the adjusted uploaded picture and the preset standard picture can be displayed at the same time, allowing users to have an intuitive comparison.
[0064] In other embodiments of the present invention, after the adjustment fails, all the above embodiments can also display the attribute parameter values ​​of the preset standard picture, so that the user can process the picture according to the attribute parameter values ​​of the preset standard picture and upload it again.
[0065] In addition, in other embodiments of the present invention, after the adjustment fails, the picture receiving end in all the above embodiments may also provide a selection button to allow the user to choose whether to retransmit the picture. If the user chooses to retransmit the photo, wait for the user to upload again. If the user chooses not to retransmit the photo, the adjusted picture will be stored directly.
[0066] How to obtain consistency will be described in detail below.
[0067] The above consistency can be obtained in the following ways:
[0068] Calculate the weighted similarity between each attribute parameter value of the uploaded image and the preset attribute parameter value;
[0069] The weighted similarity corresponding to each attribute parameter value of the uploaded picture is accumulated to obtain the total similarity.
[0070] The above-mentioned total similarity represents consistency.
[0071] Assume that the weighted similarity between the i-th attribute parameter value of the uploaded picture and the corresponding attribute parameter value of the preset standard picture is expressed as α i S i , Where S i Indicates the similarity between the ith attribute parameter value of the uploaded picture and the corresponding attribute parameter value of the preset standard picture; α i Means S i The corresponding weight, the total similarity S can be expressed by the following formula:
[0072] S = X i = 1 n α i S i .
[0073] Where n represents the number of attributes.
[0074] more specific, X i = 1 n α i = 1 .
[0075] Further, the default value of the weight corresponding to each attribute parameter value is 1/n. Of course, the value of the weight can also be adjusted according to the needs of the application scenario, which will not be repeated here.
[0076] S i How to get it.
[0077] S i It can be calculated by the following formula:
[0078] S i = 0 , | x i 0 - x i | x i 0 ( 1 - | x i 0 - x i x i 0 | ) X 100 , | x i 0 - x i | ≤ x i 0 ;
[0079] Where x i Indicates the value of the i-th attribute parameter of the uploaded image; x i0 Represents the corresponding attribute parameter value of the aforementioned preset standard picture.
[0080] It should be noted that for some parameters that do not correspond to specific attribute parameter values, for example, the photo format can be JPG, bmp, tiff, gif, pcx, etc., these formats do not correspond to specific attribute parameter values. You can manually assign attribute parameter values ​​to these parameters.
[0081] For example, in a certain application scenario, it is recommended to use JPG format photos, you can set the attribute parameter value corresponding to JPG format to 100, and set the attribute parameter values ​​corresponding to other formats to 80, 60, 40, 20, respectively , 0, etc.
[0082] To make it easier to understand the solutions provided by the embodiments of the present invention, figure 2 Shows a more specific process:
[0083] S201: The picture receiving terminal receives the picture uploaded by the picture uploading terminal through the network.
[0084] S202: The picture receiving end selects a preset attribute parameter value corresponding to the scene.
[0085] Among them, the attributes include but are not limited to: picture size, resolution, storage bits, storage format and compression ratio.
[0086] S203: The picture receiving end calculates the total similarity between the attribute parameter value of the uploaded picture and the preset attribute parameter value.
[0087] The calculation formula of the total similarity S is:
[0088] S = X i = 1 n α i S i
[0089] Where n is the number of attributes, S i Indicates the similarity between the ith attribute parameter value of the uploaded picture and the corresponding attribute parameter value of the preset standard picture; α i Means S i Corresponding weight, and α i S i Indicates the weighted similarity between the i-th attribute parameter value of the uploaded picture and the corresponding attribute parameter value of the preset standard picture.
[0090] More specifically, α i The default value is 1/n.
[0091] S i The calculation formula is:
[0092] S i = 0 , | x i 0 - x i | x i 0 ( 1 - | x i 0 - x i x i 0 | ) X 100 , | x i 0 - x i | ≤ x i 0
[0093] Among them, the above x i Indicates the value of the i-th attribute parameter of the uploaded image; the above x i0 Represents the corresponding attribute parameter value of the aforementioned preset standard picture.
[0094] For some parameters that do not correspond to specific attribute parameter values, for example, the photo format can be JPG, bmp, tiff, gif, pcx, etc., these formats do not correspond to specific attribute parameter values. You can manually assign attribute parameter values ​​to these parameters. For related introduction, please refer to the previous record in this article, and I will not repeat it here.
[0095] S204: Compare whether S is greater than or equal to the threshold S~. If yes, go to step S205, otherwise go to step S206.
[0096] Those skilled in the art can design the specific value of the threshold S~ according to the actual situation, which will not be repeated here.
[0097] S205: Store the uploaded picture in the picture database module, and the picture upload workflow ends.
[0098] S206: Determine whether the uploaded image has unadjusted attributes, if yes, go to step S207, if not, go to step S208.
[0099] S207: Adjust the attribute parameter value of the unadjusted attribute with the smallest weighted similarity, so that the attribute parameter value is the same as the corresponding preset attribute parameter value. Jump to S203.
[0100] For example, assuming that the format, resolution, and number of bits have not been adjusted, and their corresponding weighted similarities are 20, 40, and 10, respectively, the resolution of the uploaded image is adjusted to be the same as the preset resolution.
[0101] In other embodiments of the present invention, the unadjusted attribute that is most associated with other attributes may also be adjusted preferentially. For example, if the format of the picture is related to attributes such as resolution (Once the picture format is adjusted, the attribute parameter values ​​of other related attributes will also change accordingly), the format can be adjusted first.
[0102] The so-called most associated with other attributes can refer to the most associated attributes. For example, there are 5 attributes (attributes 1-5). Attribute 1 is not related to other attributes, attribute 2 is associated with attributes 3 and 4, and attribute 5 is associated with attributes 2, 3, and 4. 5 is the attribute most associated with other attributes.
[0103] In other embodiments of the present invention, the picture uploading end or the picture receiving end may also preset the adjustment priority order or adjustment priority of each attribute, and the picture receiving end may adjust the attribute parameter value according to the adjustment priority order or adjustment priority.
[0104] Because attributes can include picture size, resolution, storage bits, storage format, compression ratio, and so on. For different attributes, the adjustment methods are different.
[0105] For example, for the picture size and resolution, you can use image interpolation algorithm to process; for the number of bits, you can use the level quantization method to adjust; for the storage format, you can convert according to the format of the preset standard picture; for the compression ratio, you can The compression algorithm is used for compression, and the embodiment of the present invention specifically uses a frequency transform domain compression algorithm.
[0106] S208: The image receiving end notifies the image uploading end that the uploaded image still does not meet the standardization requirements after adjustment, and displaying the adjusted total similarity S and the threshold S~, and the image uploading end chooses whether to upload the image again; if uploading the user Choose to upload the picture again and return to S201, otherwise go to step S205, and the picture upload workflow ends.
[0107] Correspondingly, the embodiment of the present invention also requires protection of the picture receiving device. The picture receiving end may specifically be a server, for example, a server on an e-commerce platform, or a functional module in the server.
[0108] image 3 An exemplary structure of the foregoing picture receiving end is shown, including:
[0109] The receiving unit 1 is used for receiving uploaded pictures.
[0110] The judging unit 2 is used to judge whether the uploaded picture meets the standardization condition.
[0111] The normalization condition includes that the consistency between the attribute parameter value of the uploaded image and the preset attribute parameter value is greater than a threshold.
[0112] The storage unit 3 is configured to store the uploaded picture when it is determined that the standardization condition is satisfied.
[0113] The adjustment unit 4 is configured to adjust the attribute parameter value of the uploaded image when it is determined that the above-mentioned normalization condition is not satisfied, until the above-mentioned normalization condition is satisfied, or until the attribute parameter values ​​of all the attributes of the uploaded image have been adjusted but still not satisfied The above standardized conditions.
[0114] For specific details, please refer to the aforementioned record in this article, and will not be repeated here.
[0115] In other embodiments of the present invention, please refer to Figure 4 The devices in all the foregoing embodiments may further include a display unit 5 for displaying the stored uploaded pictures or adjusted uploaded pictures.
[0116] For specific details, please refer to the aforementioned record in this article, and will not be repeated here.
[0117] In other embodiments of the present invention, please refer to Figure 5 The apparatus in all the above embodiments may further include a prompt unit 6 for prompting that the uploaded image does not meet the standardization requirements when the attribute parameter values ​​of all attributes of the uploaded image have been adjusted but the above-mentioned standardization conditions are still not met.
[0118] For specific details, please refer to the aforementioned record in this article, and will not be repeated here.
[0119] In other embodiments of the present invention, the above consistency can be obtained in the following manner:
[0120] Calculate the weighted similarity between each attribute parameter value of the uploaded image and the corresponding preset attribute parameter value;
[0121] Accumulate the weighted similarity corresponding to each attribute parameter value of the uploaded picture to obtain the total similarity, which represents the above consistency;
[0122] The weighted similarity between the i-th attribute parameter value of the uploaded image and the corresponding preset attribute parameter value is expressed as α i S i , Where the above S i Represents the similarity between the i-th attribute parameter value of the uploaded picture and the corresponding attribute parameter value of the aforementioned preset standard picture; the above α i Represents the above S i The corresponding weight.
[0123] More specifically, α i The default value is 1/n.
[0124] S i The calculation formula is:
[0125] S i = 0 , | x i 0 - x i | x i 0 ( 1 - | x i 0 - x i x i 0 | ) X 100 , | x i 0 - x i | ≤ x i 0
[0126] Among them, the above x i Indicates the value of the i-th attribute parameter of the uploaded image; the above x i0 Represents the corresponding attribute parameter value of the aforementioned preset standard picture.
[0127] For specific details, please refer to the aforementioned record in this article, and will not be repeated here.
[0128] Image 6 A hardware structure of the above-mentioned picture receiving device 600 is given, which may include a processor 61, a memory 62, a bus 63 and a communication interface 64. The processor 61, the memory 62, and the communication interface 64 are connected to each other through a bus 63; the memory 62 is used for storing programs. Specifically, the program may include program code, and the program code includes computer operation instructions.
[0129] The memory 62 may include a high-speed random access memory (random access memory, RAM for short) memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0130] The processor 61 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), etc. ), ready-made programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0131] The processor 61 executes the program stored in the memory 62 to implement the execution steps of the picture receiving method provided by the embodiment of the present invention:
[0132] Receive uploaded pictures;
[0133] Determine whether the uploaded image meets the standardization conditions;
[0134] If it is determined that the above-mentioned standardization conditions are met, the above-mentioned uploaded pictures are directly stored;
[0135] If it is determined that the above normalization conditions are not met, adjust the attribute parameter values ​​of the uploaded image until the above normalization conditions are met (adjustment is successful), or the attribute parameter values ​​of all attributes of the uploaded image have been adjusted but the above normalization conditions are still not met (adjustment failed) ).
[0136] When adjusting the attribute parameter value of the uploaded image, you can adjust the attribute parameter value of only one attribute at a time, or adjust the attribute parameter values ​​of multiple attributes at once.
[0137] Because attributes can include picture size, resolution, storage bits, storage format, compression ratio, and so on. For different attributes, the adjustment methods are different.
[0138] For example, for the picture size and resolution, you can use image interpolation algorithm to process; for the number of bits, you can use the level quantization method to adjust; for the storage format, you can convert according to the format of the preset standard picture; for the compression ratio, you can The compression algorithm is used for compression, and the embodiment of the present invention specifically uses a frequency transform domain compression algorithm.
[0139] For related introduction, please refer to the previous record in this article, and I will not repeat it here.
[0140] In addition, the above-mentioned device 600 can also complete other steps involved in uploading pictures described in the method part of this article, as well as the refinement of each step, which will not be repeated here.
[0141] In the present invention, the CPU and the memory can be integrated in the same chip, or can be two independent devices.
[0142] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other.
[0143] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or all areas in the technical field. Any other known storage media.
[0144] The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined in this document can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in this document, but should conform to the widest scope consistent with the principles and novel features disclosed in this document.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.

Similar technology patents

Display device

ActiveCN102540684Ashow uniformgood display
Owner:江苏荣圣汽车零部件有限公司

Classification and recommendation of technical efficacy words

  • good display

Liquid crystal display (LCD) device and image signal processing method

ActiveCN101673520AAvoid low backlight brightnessgood display
Owner:SICHUAN ROSTAR ELECTRONICS TECH

Fringing electric field switch type liquid crystal display unit

ActiveCN1690815Agood display
Owner:HONG FU JIN PRECISION IND (SHENZHEN) CO LTD +1

Image processing method and device applied to tiled display equipment

ActiveCN103985373AGood character displaygood display
Owner:HISENSE VISUAL TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products