Product image acquisition method, device, computer equipment and storage medium
By acquiring multi-band spectral data of the product, generating synthetic images in a virtual lighting environment and dynamically processing and storing them, the problems of insufficient high definition and multi-dimensionality of product image display in existing technologies are solved, thereby improving user experience and decision-making efficiency.
Patent Information
- Application Number
- CN202411706367.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Existing technologies lack high-definition and multi-dimensional display in product image presentations, and changes in lighting conditions cause large visual errors, affecting user experience and decision-making efficiency.
By acquiring product image data in multi-band spectra, calculating spectral parameters, generating synthetic images in a virtual lighting environment, and performing dynamic processing, compression processing, and distributed storage, hyperspectral imaging and AI technology are used to improve image quality and efficiency.
It provides high-definition and multi-dimensional product display, reduces visual errors caused by lighting changes, improves user experience and decision-making efficiency, and optimizes storage and transmission efficiency.
Smart Images

Figure CN119478105B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image acquisition technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for acquiring product images. Background Art
[0002] With the rapid development of smart online power grid platforms, product images have become a core element of product display and user experience. The quality, accuracy, and loading speed of image display directly impact the user experience. Users make product preferences by browsing product images on online platforms, and therefore have increasingly high expectations for product display. To provide a better experience, online platforms are continuously improving image capture, processing, compression, distribution, and display technologies. However, while these improvements have significantly advanced image display, current technologies still have many limitations, particularly in terms of product detail display and image loading efficiency.
[0003] Currently, most online platforms rely on traditional static visible light images to display product images, capturing visual information through a single capture method. While these methods can demonstrate a product's basic appearance, they have significant limitations in depicting material, lighting conditions, and concealing flaws.
[0004] Therefore, there is an urgent need for a product image acquisition method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can provide high-definition, multi-dimensional product display to enhance user experience and improve decision-making efficiency. Summary of the Invention
[0005] Based on this, it is necessary to provide a product image acquisition method, device, computer equipment, computer-readable storage medium and computer program product that can provide high-definition, multi-dimensional product display to enhance user experience and improve decision-making efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for acquiring a product image, comprising:
[0007] Obtain product image data in multi-band spectra;
[0008] Calculating spectral parameters of the product in different bands based on image data of the product in the multi-band spectrum;
[0009] generating a synthetic image of the product in a virtual lighting environment according to spectral parameters of the product in different bands;
[0010] Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
[0011] In one embodiment, calculating the spectral parameters of the product in different bands based on the image data of the product in the multi-band spectrum includes:
[0012] Performing spectral separation processing on the image data of the product in the multi-band spectrum, calculating the reflectivity of each pixel point in different bands, and generating an independent reflection image in each band;
[0013] Generate a multi-band spectral image of the product based on the reflectivity of each pixel in different bands and the independent reflection image in each band;
[0014] According to the image grayscale value of each pixel in the multi-band spectral image in different bands, the image texture roughness of the product in different bands is calculated.
[0015] In one embodiment, generating a product composite image in a virtual lighting environment based on spectral parameters of the product in different wavelength bands includes:
[0016] Build a physical lighting reflection model;
[0017] Calculate the light reflection intensity of the product under at least one virtual light source based on the physical light reflection model;
[0018] Calculating a physical lighting image of the product based on the light source reflection intensity of the product;
[0019] By generating a GAN (Generative Adversarial Network), the multi-band spectral image is amplified in quantity and enhanced in quality;
[0020] The quality-enhanced multi-band spectral image is fused with the physical illumination image to generate a product composite image.
[0021] In one embodiment, the dynamic processing and compression processing of the product composite image includes:
[0022] Dynamically identifying the resolution of the user device, scaling the product composite image to fit the size of the user device, and compressing the product composite image using an adaptive quantization compression algorithm;
[0023] Multi-level quality optimization is performed on the compressed product composite image to generate product composite images with different clarity.
[0024] In one embodiment, the distributed storage of the processed product composite image includes:
[0025] Dividing the product composite image into multiple file blocks, generating a hash value for each file block using a hash algorithm, and storing the hash value in different distributed storage nodes;
[0026] Counting the image access frequency of each of the product composite images, and migrating the product composite images to different storage levels of distributed storage nodes according to the image access frequency and a preset access frequency threshold;
[0027] A redundant copy is created for each of the product composite images, and the redundant copies are stored in different distributed storage nodes according to a distributed storage rule, and integrity checks are performed on the redundant copies regularly.
[0028] In one embodiment, acquiring image data of a product in a multi-band spectrum includes:
[0029] Use a spectral imaging device to perform a multi-band spectral scan on the product; wherein the band types of the spectral imaging device include visible light band, near infrared band, far infrared band and ultraviolet band.
[0030] In a second aspect, the present application further provides a product image acquisition device, comprising:
[0031] Obtain product image data in multi-band spectra;
[0032] Calculating spectral parameters of the product in different bands based on image data of the product in the multi-band spectrum;
[0033] generating a synthetic image of the product in a virtual lighting environment according to spectral parameters of the product in different bands;
[0034] Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
[0035] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0036] Obtain product image data in multi-band spectra;
[0037] Calculating spectral parameters of the product in different bands based on image data of the product in the multi-band spectrum;
[0038] generating a synthetic image of the product in a virtual lighting environment according to spectral parameters of the product in different bands;
[0039] Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0041] Obtain product image data in multi-band spectra;
[0042] Calculating spectral parameters of the product in different bands based on image data of the product in the multi-band spectrum;
[0043] generating a synthetic image of the product in a virtual lighting environment according to spectral parameters of the product in different bands;
[0044] Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
[0045] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0046] Obtain product image data in multi-band spectra;
[0047] Calculating spectral parameters of the product in different bands based on image data of the product in the multi-band spectrum;
[0048] generating a synthetic image of the product in a virtual lighting environment according to spectral parameters of the product in different bands;
[0049] Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
[0050] The aforementioned product image acquisition method, apparatus, computer device, computer-readable storage medium, and computer program product, by acquiring product image data across multiple spectral bands, can more comprehensively capture a product's physical characteristics, such as material, transparency, and reflectivity, thereby providing a more realistic product display. They can also display a product's appearance under varying lighting conditions, reducing visual errors caused by lighting variations and improving the user's understanding of the product's actual appearance. The resulting composite image provides a high-definition, multi-dimensional view of the product, enhancing the user's visual experience. Dynamic processing and compression optimize image loading speed, reducing user wait time and improving the user experience. Users can make more accurate decisions quickly with more detailed product image information. Multi-dimensional product display helps users more quickly identify and select products that meet their needs, improving decision-making efficiency. Distributed storage of processed composite product images reduces storage costs and improves storage efficiency. Dynamic compression provides images of varying resolutions based on the user's network conditions and device performance, optimizing image transmission and loading efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 A diagram showing an application environment of a method for acquiring product images in one embodiment;
[0053] Figure 2 1 is a flow chart of a method for acquiring product images in one embodiment;
[0054] Figure 3 is a flowchart of a method for acquiring product images in another embodiment;
[0055] Figure 4 is a structural block diagram of a device for acquiring product images in one embodiment;
[0056] Figure 5 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0058] The product image acquisition method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 via a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104 or placed on the cloud or other network servers.
[0059] The terminal 102 obtains image data of the product in a multi-band spectrum; the server 104 calculates the spectral parameters of the product in different bands based on the image data of the product in the multi-band spectrum; based on the spectral parameters of the product in different bands, a composite image of the product is generated in a virtual lighting environment; the composite image of the product is dynamically processed and compressed, and the processed composite image of the product is distributedly stored.
[0060] Terminal 102 may include, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, smart car devices, and projectors. Portable wearable devices may include smart watches, smart bracelets, and head-mounted devices. Head-mounted devices may include virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, and the like. Server 104 may be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services.
[0061] In an exemplary embodiment, Figure 2 As shown, a product image acquisition method is provided, which is applied to Figure 1 The server in the example is used to illustrate the method, which includes the following steps S202 to S208.
[0062] Step S202: Acquire image data of the product in a multi-band spectrum.
[0063] Specifically, specialized hyperspectral imaging equipment is used to scan the product. This spectral scan covers multiple wavelengths to determine its reflectance or emission characteristics in each wavelength. The hyperspectral imaging device captures raw multi-band spectral data. This data, containing the product's reflectance information in each wavelength band, forms the basis for subsequent analysis and image generation.
[0064] In a specific embodiment, obtaining image data of a product in a multi-band spectrum includes: using a spectral imaging device to perform a multi-band spectral scan of the product; wherein the band types of the spectral imaging device include visible light band, near infrared band, far infrared band and ultraviolet band.
[0065] Among them, the visible light band: This is the spectrum range that the human eye can perceive, and is usually used to show the appearance and color of the product.
[0066] Near-infrared band: can provide information about the material and chemical composition of the product, which is useful for identifying certain materials and detecting the internal structure of the product.
[0067] Far infrared: Radiation can penetrate certain materials and is used to detect the thermal properties or deep structure of products.
[0068] Ultraviolet Band: The ultraviolet band is useful for detecting the fluorescence reaction of certain materials or identifying subtle features of products, such as the underlying pigment of a painting.
[0069] In each band, the device captures image data of the product, which can then be used to analyze the product's physical and chemical properties and generate multispectral images.
[0070] In this embodiment, through this multi-band spectral scanning technology, richer product information can be obtained than traditional single-band imaging, providing more accurate data support for product analysis and display.
[0071] Step S204 : calculating the spectral parameters of the product in different bands based on the image data of the product in the multi-band spectrum.
[0072] Specifically, for each band of the image, the reflectance of each pixel is calculated. Based on the calculated reflectance, the spectral parameters of the product are extracted. These parameters may include but are not limited to:
[0073] Spectral reflectance: The reflectance of each band reflects the product's ability to reflect light in that band.
[0074] Spectral absorptivity: the product's ability to absorb light in different wavelengths.
[0075] Spectral transmittance: the product's ability to transmit light in different wavelengths.
[0076] In a specific embodiment, calculating the spectral parameters of the product in different bands based on the image data of the product in the multi-band spectrum includes:
[0077] Perform spectral separation on the product's image data in multi-band spectra, calculate the reflectivity of each pixel in different bands, and generate independent reflection images in each band;
[0078] Generate a multi-band spectral image of the product based on the reflectivity of each pixel in different bands and the independent reflection image in each band;
[0079] According to the image grayscale value of each pixel in the multi-band spectral image in different bands, the image texture roughness of the product in different bands is calculated.
[0080] Specifically, the product's multi-band spectral image data is first processed to separate the mixed spectral data into individual independent bands. This step typically involves image processing techniques to ensure that the data for each band is accurately separated.
[0081] For each band of data, the reflectivity of each pixel is calculated. Reflectivity refers to the ability of a product surface to reflect light of a specific wavelength, and is usually calculated by comparing the intensity of incident light and the intensity of reflected light.
[0082] Based on the calculated reflectivity, independent reflection images are generated for each band. These images show the reflection characteristics of the product in different bands and provide a basis for further analysis.
[0083] A multi-band spectral image of the product is synthesized using the reflectivity and independent reflectance images of each pixel in different bands. This composite image can be a simple overlay or based on more complex algorithms, such as physical model-based rendering technology, to demonstrate the comprehensive performance of the product in multiple bands.
[0084] Based on the grayscale values of each pixel in a multi-band spectral image across different bands, the product's image texture roughness in each band is calculated. Texture roughness is a parameter that describes the detail and variation of textures in an image. It can be calculated using statistical methods such as variance or standard deviation, or using more advanced texture analysis algorithms. These spectral parameters and the calculated texture roughness can help analyze a product's physical and chemical properties, such as material, transparency, and reflectivity. This multi-dimensional spectral information can be used to provide a more detailed and realistic product display, enhancing the user experience and helping users make more accurate purchasing decisions.
[0085] In this embodiment, through this process, the data provided by the hyperspectral imaging technology can be fully utilized to deeply explore the characteristics of the product and provide scientific and accurate data support for various applications.
[0086] Step S206: Generate a product composite image in a virtual lighting environment based on the product's spectral parameters in different bands. Figure 3 Shown, including:
[0087] Step S302, constructing a physical light reflection model;
[0088] Step S304, calculating the light source reflection intensity of the product under at least one virtual light source according to the physical light reflection model;
[0089] Step S306, calculating a physical lighting image of the product based on the light source reflection intensity of the product;
[0090] Step S308, amplifying the quantity and enhancing the quality of the multi-band spectral image by generating an adversarial network (GAN);
[0091] Step S310 , fusing the quality-enhanced multi-band spectral image with the physical illumination image to generate a product composite image.
[0092] Specifically, building a virtual lighting environment can include simulating natural light, indoor light, or lighting under specific conditions. This environment can be implemented using a physical lighting model, such as the Phong reflection model, which takes into account the direction and intensity of the light source as well as the reflective properties of the product surface.
[0093] Use a physical lighting model (such as the Phong model) to calculate the lighting effect at each point on the product surface under specific lighting conditions. This involves calculating lighting effects such as diffuse reflection, specular reflection, and highlights.
[0094] Create a virtual light source library containing light source parameters of different types and conditions. These parameters can be used to simulate various real-world lighting environments, such as sunlight, fluorescent lamps, incandescent lamps, etc.
[0095] Artificial intelligence (AI) models, such as the generative adversarial network (GAN) in the convolutional neural network (CNN), are used to amplify the quantity and enhance the quality of multi-band spectral images to generate higher quality images.
[0096] The AI-enhanced image is combined with the lighting effects calculated by the physical lighting model to generate a final composite image of the product. This composite image should accurately reflect the product's appearance under specific lighting conditions.
[0097] In this embodiment, through this process, composite images of products in various virtual lighting environments can be generated. These images can provide richer and more realistic product displays than traditional static visible light images, thereby improving the user's shopping experience and decision-making efficiency.
[0098] Step S208 : Dynamically process and compress the product composite image, and distribute-store the processed product composite image.
[0099] In a specific embodiment, the dynamic processing and compression processing of the product composite image includes:
[0100] Dynamically identify the resolution of the user's device, scale the product composite image to fit the size of the user's device, and compress the product composite image using an adaptive quantization compression algorithm;
[0101] Multi-level quality optimization is performed on the compressed product composite image to generate product composite images with different clarity.
[0102] Specifically, the system needs to be able to identify or predict the screen resolution of the user's device. This can be achieved through user agent string analysis, client-provided device information, or a preset list of device resolutions. Based on the identified device resolution, the system scales the composite product image to a size suitable for the user's device display. This step ensures that the image is displayed at the optimal size across different devices, avoiding overly large or undersized images that affect the user experience.
[0103] The scaled product composite image is compressed using an adaptive quantization compression algorithm. This algorithm dynamically adjusts the compression ratio based on the image content and quality requirements, reducing file size while maintaining image quality. Adaptive compression means the algorithm analyzes the image content and identifies which parts can withstand a higher compression ratio without significantly reducing visual quality, while also identifying which parts should maintain a higher quality.
[0104] To adapt to different users' network conditions and device capabilities, the system needs to generate composite product images with varying levels of clarity. This typically involves creating multiple versions of an image, each with a different resolution and compression level. For example, you can create a low-resolution version for environments with poor network conditions, a high-resolution version for environments with good network conditions, and a retina-optimized version for devices with high pixel density.
[0105] The system needs to dynamically select the most appropriate image version for loading and display based on the user's network speed and device performance. This can be achieved through technologies such as network condition detection and device performance evaluation. To improve loading speed, the system may cache commonly used image versions on the user's device or edge server. Furthermore, it can predict and preload the image versions that may be needed based on user behavior.
[0106] In this embodiment, these steps are used to process and compress the composite product image, optimizing its transmission and storage efficiency while ensuring a high-quality user experience across various devices and network conditions. This dynamic processing and compression strategy is crucial for improving the performance and user satisfaction of online platforms.
[0107] In a specific embodiment, distributed storage of the processed product composite image includes:
[0108] Divide the product composite image into multiple file blocks, generate a hash value for each file block using a hash algorithm, and store the hash value in different distributed storage nodes;
[0109] Count the image access frequency of each product composite image, and migrate the product composite image to different storage levels of distributed storage nodes based on the image access frequency and the preset access frequency threshold;
[0110] Create redundant copies for each product composite image, store them in different distributed storage nodes through distributed storage rules, and regularly perform integrity checks on the redundant copies.
[0111] Specifically, file segmentation and hash value generation include:
[0112] File chunking involves dividing large product composite images into multiple smaller file chunks. This improves storage efficiency, allows for parallel processing and transfer, and provides more flexible storage management.
[0113] The hash algorithm application refers to the use of a hash algorithm to generate a unique hash value for each file block. This hash value is equivalent to the "fingerprint" of the file block and is used to identify and retrieve the file block.
[0114] The generated hash values and corresponding file blocks are stored in different distributed storage nodes. This distributed storage can improve data reliability and access speed because the data is replicated and stored on multiple geographically dispersed servers.
[0115] The system needs to track and count the access frequency of each product composite image. This can be achieved through log analysis, counters, or other monitoring tools. Based on the image access frequency and preset access frequency thresholds, the system automatically migrates images to different tiers of storage nodes. For example, frequently accessed images may be migrated to faster storage media (such as SSDs), while infrequently accessed images may be migrated to lower-cost, slower storage media (such as HDDs or cloud storage).
[0116] To improve data reliability and fault tolerance, the system creates redundant copies of each product composite image. These copies are stored on different storage nodes according to distributed storage rules, ensuring that even if a node fails, data can still be recovered from other nodes. The integrity of these redundant copies is regularly checked to ensure that data has not been lost or damaged due to hardware failure, data corruption, or other reasons.
[0117] In this embodiment, a distributed storage strategy can be used to efficiently manage large amounts of product composite image data, improving data access efficiency and reliability while reducing storage costs. This is particularly important for e-commerce platforms that need to process and store large amounts of image data, as they need to ensure that users can quickly access high-quality product images anytime, anywhere.
[0118] The above-mentioned product image acquisition method, by acquiring product image data across multiple spectral bands, can more comprehensively capture the product's physical characteristics, such as material, transparency, and reflectivity, thereby providing a more realistic product display. It can also display the product's appearance under different lighting conditions, reducing visual errors caused by lighting variations and improving the user's understanding of the product's actual appearance. The resulting composite image provides a high-definition and multi-dimensional product view, enhancing the user's visual experience. Dynamic processing and compression can optimize image loading speed, reduce user wait time, and improve the user experience. Users can make more accurate decisions quickly with more detailed product image information. Multi-dimensional product display can help users more quickly identify and select products that meet their needs, improving decision-making efficiency. Distributed storage of processed composite product images can reduce storage costs and improve storage efficiency. Dynamic compression can provide images of varying resolutions based on the user's network conditions and device performance, optimizing image transmission and loading efficiency.
[0119] The most detailed embodiment of this application is:
[0120] 1. Obtain product image data in multi-band spectra and calculate the product's spectral parameters in different bands;
[0121] 1.1. Use hyperspectral imaging equipment to perform multi-band spectral scanning on the product. The hyperspectral imaging equipment covers the following wavelengths: visible light, near infrared, far infrared, and ultraviolet.
[0122] 1.2. After obtaining the original multi-band spectral data, the images of each band are spectrally separated and the reflectance of each pixel in different bands is calculated to generate an independent reflection image in each band. The spectral reflectance is calculated using the following formula:
[0123] ;
[0124] in, is the reflectivity at wavelength λ, is the reflection intensity of the product surface at this wavelength, is the incident light intensity;
[0125] 1.3. Generate multispectral images based on the spectral reflectance data of different bands, and calculate the texture roughness of the image in each band as the texture feature:
[0126] ;
[0127] Among them, T is the texture roughness, n is the number of bands, is the grayscale value of the midpoint (x, y) in the i-th band image, and the texture features are combined with the image reflectivity to form the image features.
[0128] 2. Generate a synthetic image of the product in a virtual lighting environment;
[0129] 2.1. Build a physical lighting model;
[0130] Calculate the light source reflection intensity based on the Phong reflection model:
[0131] ;
[0132] in, is the reflected light intensity, is the incident light intensity, L is the light source direction vector, N is the product surface normal vector, is the diffuse reflectance, is the mirror reflection coefficient, V is the sight direction vector, B is the reflected light direction vector, and a is the specular index;
[0133] 2.2. Build a virtual light source library;
[0134] After establishing the physical lighting model, a virtual light source library is created based on typical scenarios, covering various lighting conditions such as natural light, artificial light, and special ambient light. Specific light source settings are made according to user selection or the actual environment. Lighting parameters are selected from the virtual light source library and input into the physical lighting model. The reflected light intensity of each pixel in the multispectral image is calculated, and a physical lighting image is generated based on the reflected light intensity.
[0135] 2.3. Dynamic synthesis of lighting conditions based on AI models;
[0136] A convolutional neural network is constructed to input image features to enhance the multispectral image, and a generative adversarial network (GAN) is used to amplify the quantity and enhance the quality of the multi-band spectral image through the generative network and the discriminative network. The quality-enhanced multi-band spectral image is fused with the physical illumination image to generate a synthetic image of the product.
[0137] 3. Dynamically process and compress product composite images;
[0138] 3.1. Dynamically identify the user device resolution, scale the width and height of the product composite image to the display size of the user device, compress the product composite image using an adaptive quantization compression algorithm, and perform quality inspection on the compressed image to ensure that the compression effect meets visual standards;
[0139] 3.2. Perform multi-level quality optimization on the compressed images, generate product composite images in different resolutions, detect the user device network speed, and select the product composite image with the appropriate resolution for loading and display.
[0140] 4. Distributed storage of product composite images;
[0141] 4.1. Divide the product composite image into multiple file blocks. Generate a hash value for each file block using a hash algorithm. Store the hash value in different distributed storage nodes. When distributing to the distributed storage nodes, compare the hash value of the file block with the hash value of the existing files in the storage node to avoid repeated storage of the same file block.
[0142] 4.2. Count the access frequency of each product's composite image and set an access frequency threshold. Based on the image access frequency and the access frequency threshold, migrate the image to different storage tiers of distributed storage nodes, including high-speed storage tier, medium-speed storage tier, and low-speed storage tier.
[0143] 4.3. Create redundant copies for each image, store them on different storage nodes according to distributed storage rules, mark them as copies, and regularly perform integrity checks on the redundant copies.
[0144] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0145] Based on the same inventive concept, embodiments of the present application also provide a product image acquisition device for implementing the aforementioned product image acquisition method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more product image acquisition device embodiments provided below can be found in the aforementioned limitations of the product image acquisition method and will not be further elaborated here.
[0146] In an exemplary embodiment, Figure 4 As shown, a product image acquisition device is provided, comprising:
[0147] An image data acquisition module 402 is used to acquire image data of a product in a multi-band spectrum;
[0148] The parameter calculation module 404 is used to calculate the spectral parameters of the product in different bands based on the image data of the product in the multi-band spectrum;
[0149] An image synthesis module 406 is configured to generate a synthetic image of the product in a virtual lighting environment based on the spectral parameters of the product in different wavelength bands;
[0150] The image processing and storage module 408 is used to perform dynamic processing and compression processing on the product composite image, and to perform distributed storage on the processed product composite image.
[0151] In an exemplary embodiment, the parameter calculation module 404 is specifically used to perform spectral separation processing on the image data of the product in the multi-band spectrum, calculate the reflectivity of each pixel point in different bands, and generate an independent reflection image in each band; generate a multi-band spectral image of the product based on the reflectivity of each pixel point in different bands and the independent reflection image in each band; calculate the image texture roughness of the product in different bands based on the image grayscale value of each pixel point in the multi-band spectral image in different bands.
[0152] In an exemplary embodiment, the image synthesis module 406 is specifically used to construct a physical lighting reflection model; calculate the light source reflection intensity of the product under at least one virtual light source based on the physical lighting reflection model; calculate the physical lighting image of the product based on the light source reflection intensity of the product; amplify the quantity and enhance the quality of the multi-band spectral image through the generative adversarial network (GAN); and fuse the quality-enhanced multi-band spectral image and the physical lighting image to generate a product composite image.
[0153] In an exemplary embodiment, the image processing and storage module 408 is specifically used to dynamically identify the resolution of the user device, scale the product composite image to adapt to the size of the user device, and compress the product composite image using an adaptive quantization compression algorithm; perform multi-level quality optimization on the compressed product composite image to generate product composite images of different clarity.
[0154] In an exemplary embodiment, the image processing and storage module 408 is specifically used to divide the product composite image into multiple file blocks, generate a hash value for each file block through a hash algorithm, and store the hash value in different distributed storage nodes; count the image access frequency of each product composite image, and migrate the product composite image to different storage levels of the distributed storage node based on the image access frequency and a preset access frequency threshold; create a redundant copy for each product composite image, store the redundant copy in different distributed storage nodes through distributed storage rules, and regularly perform integrity checks on the redundant copy.
[0155] In an exemplary embodiment, the image data acquisition module 402 is specifically configured to perform multi-band spectral scanning on a product using a spectral imaging device; wherein the band types of the spectral imaging device include visible light band, near infrared band, far infrared band, and ultraviolet band.
[0156] Each module in the aforementioned product image acquisition device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor within a computer device in the form of hardware, or may be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0157] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, memory and input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store image data of the product in a multi-band spectrum and processed product composite images. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a product image acquisition method is implemented.
[0158] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0159] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0160] Obtain product image data in multi-band spectra;
[0161] Calculating spectral parameters of the product in different bands based on image data of the product in the multi-band spectrum;
[0162] generating a synthetic image of the product in a virtual lighting environment according to spectral parameters of the product in different bands;
[0163] Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
[0164] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0165] Performing spectral separation processing on the image data of the product in the multi-band spectrum, calculating the reflectivity of each pixel point in different bands, and generating an independent reflection image in each band;
[0166] Generate a multi-band spectral image of the product based on the reflectivity of each pixel in different bands and the independent reflection image in each band;
[0167] According to the image grayscale value of each pixel in the multi-band spectral image in different bands, the image texture roughness of the product in different bands is calculated.
[0168] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0169] Build a physical lighting reflection model;
[0170] Calculate the light reflection intensity of the product under at least one virtual light source based on the physical light reflection model;
[0171] Calculating a physical lighting image of the product based on the light source reflection intensity of the product;
[0172] By generating a GAN (Generative Adversarial Network), the multi-band spectral image is amplified in quantity and enhanced in quality;
[0173] The quality-enhanced multi-band spectral image is fused with the physical illumination image to generate a product composite image.
[0174] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0175] Dynamically identifying the resolution of the user device, scaling the product composite image to fit the size of the user device, and compressing the product composite image using an adaptive quantization compression algorithm;
[0176] Multi-level quality optimization is performed on the compressed product composite image to generate product composite images with different clarity.
[0177] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0178] Dividing the product composite image into multiple file blocks, generating a hash value for each file block using a hash algorithm, and storing the hash value in different distributed storage nodes;
[0179] Counting the image access frequency of each of the product composite images, and migrating the product composite images to different storage levels of distributed storage nodes according to the image access frequency and a preset access frequency threshold;
[0180] A redundant copy is created for each of the product composite images, and the redundant copies are stored in different distributed storage nodes according to a distributed storage rule, and integrity checks are performed on the redundant copies regularly.
[0181] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0182] Use a spectral imaging device to perform a multi-band spectral scan on the product; wherein the band types of the spectral imaging device include visible light band, near infrared band, far infrared band and ultraviolet band.
[0183] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0184] Obtain product image data in multi-band spectra;
[0185] Calculating spectral parameters of the product in different bands based on image data of the product in the multi-band spectrum;
[0186] generating a synthetic image of the product in a virtual lighting environment according to spectral parameters of the product in different bands;
[0187] Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
[0188] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0189] Performing spectral separation processing on the image data of the product in the multi-band spectrum, calculating the reflectivity of each pixel point in different bands, and generating an independent reflection image in each band;
[0190] Generate a multi-band spectral image of the product based on the reflectivity of each pixel in different bands and the independent reflection image in each band;
[0191] According to the image grayscale value of each pixel in the multi-band spectral image in different bands, the image texture roughness of the product in different bands is calculated.
[0192] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0193] Build a physical lighting reflection model;
[0194] Calculate the light reflection intensity of the product under at least one virtual light source based on the physical light reflection model;
[0195] Calculating a physical lighting image of the product based on the light source reflection intensity of the product;
[0196] By generating a GAN (Generative Adversarial Network), the multi-band spectral image is amplified in quantity and enhanced in quality;
[0197] The quality-enhanced multi-band spectral image is fused with the physical illumination image to generate a product composite image.
[0198] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0199] Dynamically identifying the resolution of the user device, scaling the product composite image to fit the size of the user device, and compressing the product composite image using an adaptive quantization compression algorithm;
[0200] Multi-level quality optimization is performed on the compressed product composite image to generate product composite images with different clarity.
[0201] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0202] Dividing the product composite image into multiple file blocks, generating a hash value for each file block using a hash algorithm, and storing the hash value in different distributed storage nodes;
[0203] Counting the image access frequency of each of the product composite images, and migrating the product composite images to different storage levels of distributed storage nodes according to the image access frequency and a preset access frequency threshold;
[0204] A redundant copy is created for each of the product composite images, and the redundant copies are stored in different distributed storage nodes according to a distributed storage rule, and integrity checks are performed on the redundant copies regularly.
[0205] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0206] Use a spectral imaging device to perform a multi-band spectral scan on the product; wherein the band types of the spectral imaging device include visible light band, near infrared band, far infrared band and ultraviolet band.
[0207] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0208] Obtain product image data in multi-band spectra;
[0209] Calculating spectral parameters of the product in different bands based on image data of the product in the multi-band spectrum;
[0210] generating a synthetic image of the product in a virtual lighting environment according to spectral parameters of the product in different bands;
[0211] Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
[0212] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0213] Performing spectral separation processing on the image data of the product in the multi-band spectrum, calculating the reflectivity of each pixel point in different bands, and generating an independent reflection image in each band;
[0214] Generate a multi-band spectral image of the product based on the reflectivity of each pixel in different bands and the independent reflection image in each band;
[0215] According to the image grayscale value of each pixel in the multi-band spectral image in different bands, the image texture roughness of the product in different bands is calculated.
[0216] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0217] Build a physical lighting reflection model;
[0218] Calculate the light reflection intensity of the product under at least one virtual light source based on the physical light reflection model;
[0219] Calculating a physical lighting image of the product based on the light source reflection intensity of the product;
[0220] By generating a GAN (Generative Adversarial Network), the multi-band spectral image is amplified in quantity and enhanced in quality;
[0221] The quality-enhanced multi-band spectral image is fused with the physical illumination image to generate a product composite image.
[0222] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0223] Dynamically identifying the resolution of the user device, scaling the product composite image to fit the size of the user device, and compressing the product composite image using an adaptive quantization compression algorithm;
[0224] Multi-level quality optimization is performed on the compressed product composite image to generate product composite images with different clarity.
[0225] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0226] Dividing the product composite image into multiple file blocks, generating a hash value for each file block using a hash algorithm, and storing the hash value in different distributed storage nodes;
[0227] Counting the image access frequency of each of the product composite images, and migrating the product composite images to different storage levels of distributed storage nodes according to the image access frequency and a preset access frequency threshold;
[0228] A redundant copy is created for each of the product composite images, and the redundant copies are stored in different distributed storage nodes according to a distributed storage rule, and integrity checks are performed on the redundant copies regularly.
[0229] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:
[0230] Use a spectral imaging device to perform a multi-band spectral scan on the product; wherein the band types of the spectral imaging device include visible light band, near infrared band, far infrared band and ultraviolet band.
[0231] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0232] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0233] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0234] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A method for acquiring product images, characterized in that: The method comprises: Obtain product image data in multi-band spectra; Performing spectral separation processing on the image data of the product in the multi-band spectrum, calculating the reflectivity of each pixel point in different bands, and generating an independent reflection image in each band; Generate a multi-band spectral image of the product based on the reflectivity of each pixel in different bands and the independent reflection image in each band; According to the image gray value of each pixel in the multi-band spectral image in different bands, the image texture roughness of the product in different bands is calculated; Generating a synthetic image of the product in a virtual lighting environment based on the spectral parameters of the product in different bands; including constructing a physical lighting reflection model; Calculating the light source reflection intensity of the product under at least one virtual light source according to a physical light reflection model; and calculating the physical light image of the product according to the light source reflection intensity of the product; After establishing the physical illumination reflection model, a virtual light source library is created based on typical scenes. Lighting parameters are selected from the virtual light source library and input into the physical illumination model. The reflected light intensity of each pixel in the multispectral image is calculated, and a physical illumination image is generated based on the reflected light intensity. Amplifying the quantity and enhancing the quality of the multi-band spectral image by generating an adversarial network (GAN); fusing the multi-band spectral image after quality enhancement with the physical illumination image to generate a product composite image; Dynamic processing and compression processing are performed on the product composite image, and the processed product composite image is distributedly stored.
2. The method according to claim 1, characterized in that The dynamic processing and compression processing of the product composite image includes: Dynamically identifying the resolution of the user device, scaling the product composite image to fit the size of the user device, and compressing the product composite image using an adaptive quantization compression algorithm; Multi-level quality optimization is performed on the compressed product composite image to generate product composite images with different clarity.
3. The method according to claim 1, characterized in that The distributed storage of the processed product composite image includes: Dividing the product composite image into multiple file blocks, generating a hash value for each file block using a hash algorithm, and storing the hash value in different distributed storage nodes; Counting the image access frequency of each of the product composite images, and migrating the product composite images to different storage levels of distributed storage nodes according to the image access frequency and a preset access frequency threshold; A redundant copy is created for each of the product composite images, and the redundant copies are stored in different distributed storage nodes according to a distributed storage rule, and integrity checks are performed on the redundant copies regularly.
4. The method according to claim 1, wherein The obtaining of image data of the product in a multi-band spectrum includes: Use a spectral imaging device to perform a multi-band spectral scan on the product; wherein the band types of the spectral imaging device include visible light band, near infrared band, far infrared band and ultraviolet band.
5. A product image acquisition device, characterized in that: The device comprises: Image data acquisition module, used to acquire image data of the product in multi-band spectrum; a parameter calculation module for performing spectral separation processing on the image data of the product in the multi-band spectrum, calculating the reflectivity of each pixel in different bands, and generating an independent reflection image in each band; generating a multi-band spectral image of the product based on the reflectivity of each pixel in different bands and the independent reflection image in each band; and calculating the image texture roughness of the product in different bands based on the image grayscale value of each pixel in the multi-band spectral image in different bands; An image synthesis module is configured to generate a composite image of the product in a virtual lighting environment based on the spectral parameters of the product in different bands, and is specifically configured to: construct a physical lighting reflection model; calculate the light source reflection intensity of the product under at least one virtual light source based on the physical lighting reflection model; calculate the physical lighting image of the product based on the light source reflection intensity of the product; after establishing the physical lighting reflection model, create a virtual light source library based on typical scenarios, select lighting parameters from the virtual light source library and input them into the physical lighting model, calculate the reflected light intensity of each pixel in the multispectral image, and generate a physical lighting image based on the reflected light intensity; amplify the quantity and enhance the quality of the multi-band spectral image through a generative adversarial network (GAN); and fuse the quality-enhanced multi-band spectral image with the physical lighting image to generate a composite image of the product; The image processing and storage module is used to perform dynamic processing and compression processing on the product composite image, and to perform distributed storage on the processed product composite image.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method and device for restoring and reconstructing light source spectrum from hyperspectral image
WO2022051911A1
Method and device for fusion and classification of remote sensing hyperspectral image and laser radar image
WO2024040828A1