WO2022156355A1 - 图像处理方法、图像处理装置、电子设备和存储介质 - Google Patents

图像处理方法、图像处理装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2022156355A1
WO2022156355A1 PCT/CN2021/133248 CN2021133248W WO2022156355A1 WO 2022156355 A1 WO2022156355 A1 WO 2022156355A1 CN 2021133248 W CN2021133248 W CN 2021133248W WO 2022156355 A1 WO2022156355 A1 WO 2022156355A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
panoramic image
storage address
panoramic
priority
Prior art date
Application number
PCT/CN2021/133248
Other languages
English (en)
French (fr)
Inventor
易泓志
杜钊君
Original Assignee
武汉旷视金智科技有限公司
北京旷视科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 武汉旷视金智科技有限公司, 北京旷视科技有限公司 filed Critical 武汉旷视金智科技有限公司
Publication of WO2022156355A1 publication Critical patent/WO2022156355A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the technical field of data processing, and in particular, to an image processing method, an image processing apparatus, an electronic device, a storage medium and a computer program product.
  • the images involved in the security protection technology usually include a pair of panoramic images and partial images, wherein the partial images are the parts containing the object of interest captured from the panoramic image.
  • partial images and panoramic images are obtained through third-party systems (such as cameras installed in various places, cameras, and databases that store pictures), and after the images are obtained, the partial images and panoramic images are stored and analyzed in real time, etc. deal with.
  • third-party systems such as cameras installed in various places, cameras, and databases that store pictures
  • the partial images and panoramic images are stored and analyzed in real time, etc. deal with.
  • due to the large size of the panoramic image and the time-consuming processing of the panoramic image when there are multiple image pairs including the partial image-panoramic image, it is difficult for the above technology to ensure the real-time processing of the partial image in the image pair that is ranked lower. sex.
  • An image processing method may include:
  • each of the partial image data includes the panoramic image ID of the panoramic image corresponding to the partial image, and each of the panoramic images
  • the image data includes a panoramic image ID
  • the image parsing unit parses the processed multiple partial image data to obtain a parsing result list ;
  • the analysis result list includes the analysis results corresponding to the partial image data one-to-one, and the analysis result includes the panoramic image ID of the panoramic image data corresponding to the partial image data corresponding thereto;
  • the second thread stores the panoramic image data, obtains a storage address corresponding to the panoramic image data one-to-one, and updates the storage address to the target analysis result; the target analysis result contains the corresponding storage address.
  • the parsing result of the panoramic image ID of the panoramic image data is the parsing result of the panoramic image ID of the panoramic image data.
  • the real-time processing of the plurality of partial image data by the first thread may include: real-time storage and/or format conversion of the plurality of partial image data by the first thread.
  • storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address to the target parsing result may include:
  • the current storage address is updated to the target parsing result corresponding to the current storage address.
  • storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address to the target parsing result may include:
  • the panoramic image corresponding to the currently retrieved panoramic image data is stored to obtain the current storage address; the current storage address is updated to the target parsing result corresponding to the current storage address.
  • the image processing Methods before storing the panoramic image data through the second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address into the target parsing result, the image processing Methods can also include:
  • retrieving panoramic image data one by one through the second thread may include:
  • the panoramic image data is taken out from the first buffer queue by the second thread, and the taken out panoramic image data is used as the current panoramic image data.
  • the image processing Methods before storing the panoramic image data through the second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address into the target parsing result, the image processing Methods can also include:
  • the image processing method further includes:
  • storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address to the target parsing result may include:
  • the storage addresses are obtained;
  • the currently fetched storage address is put into the tail of the second buffer queue.
  • the image processing method may further include:
  • the priority processing information includes a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID;
  • the priority panoramic image data corresponding to the priority panoramic image ID is taken out by the third thread according to the priority panoramic image ID;
  • the priority storage address is updated to the analysis result corresponding to the priority panoramic image ID.
  • the image processing method may further include:
  • the priority processing information includes a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID;
  • the priority storage address corresponding to the priority panoramic image ID is taken out from the second buffer queue by the third thread according to the priority panoramic image ID;
  • the priority storage address is updated to the analysis result corresponding to the priority panoramic image ID.
  • the acquiring a plurality of partial image data and the panoramic image data corresponding to each partial image data may include:
  • Panoramic image data corresponding to each of the partial image data is acquired from the image data source through the data access processing service.
  • An image processing apparatus may include:
  • an acquisition module which can be configured to acquire multiple partial image data and panoramic image data corresponding to each partial image data; wherein each partial image data includes a panoramic image corresponding to the partial image
  • the panoramic image ID of the image, each of the panoramic image data includes the panoramic image ID;
  • the first processing module can be configured to process the plurality of partial image data in real time through a first thread, and send the processed plurality of partial image data to the image parsing unit, so that the image parsing
  • the unit parses the processed partial image data to obtain a list of parsing results; wherein, the parsing result list may include parsing results corresponding to the partial image data one-to-one, and the parsing result may include the corresponding partial image data
  • a second processing module may be configured to asynchronously process each of the panoramic image data, including: storing the panoramic image data through a second thread, and obtaining a one-to-one correspondence with the panoramic image data
  • the storage address is updated to the target analysis result;
  • the target analysis result may be the analysis result including the panoramic image ID of the panoramic image data corresponding to the storage address.
  • An electronic device may include a memory and a processor, the memory may store a computer program, and the processor may implement the following steps when executing the computer program:
  • each of the partial image data includes the panoramic image ID of the panoramic image corresponding to the partial image, and each of the panoramic image The data includes the panoramic image ID;
  • the image parsing unit parses the processed multiple partial image data to obtain a parsing result list ;
  • the analysis result list includes the analysis results corresponding to the partial image data one-to-one, and the analysis result includes the panoramic image ID of the panoramic image data corresponding to the partial image data corresponding thereto;
  • the second thread stores the panoramic image data, obtains a storage address corresponding to the panoramic image data one-to-one, and updates the storage address to the target analysis result; the target analysis result contains the corresponding storage address.
  • the parsing result of the panoramic image ID of the panoramic image data is the parsing result of the panoramic image ID of the panoramic image data.
  • a computer-readable storage medium on which a computer program can be stored, and the computer program can implement the following steps when executed by a processor:
  • each of the partial image data includes the panoramic image ID of the panoramic image corresponding to the partial image, and each of the panoramic image The data includes the panoramic image ID;
  • the image parsing unit parses the processed multiple partial image data to obtain a parsing result list ;
  • the analysis result list includes the analysis results corresponding to the partial image data one-to-one, and the analysis result includes the panoramic image ID of the panoramic image data corresponding to the partial image data corresponding thereto;
  • the second thread stores the panoramic image data, obtains a storage address corresponding to the panoramic image data one-to-one, and updates the storage address to the target analysis result; the target analysis result contains the corresponding storage address.
  • the parsing result of the panoramic image ID of the panoramic image data is the parsing result of the panoramic image ID of the panoramic image data.
  • a computer program product which can include a computer program that, when executed by a processor, can implement the following steps:
  • each of the partial image data includes the panoramic image ID of the panoramic image corresponding to the partial image, and each of the panoramic image The data includes the panoramic image ID;
  • the image parsing unit parses the processed multiple partial image data to obtain a parsing result list ;
  • the analysis result list includes the analysis results corresponding to the partial image data one-to-one, and the analysis result includes the panoramic image ID of the panoramic image data corresponding to the partial image data corresponding thereto;
  • the second thread stores the panoramic image data, obtains a storage address corresponding to the panoramic image data one-to-one, and updates the storage address to the target analysis result; the target analysis result contains the corresponding storage address.
  • the parsing result of the panoramic image ID of the panoramic image data is the parsing result of the panoramic image ID of the panoramic image data.
  • the above-mentioned image processing method, image processing device, electronic device, storage medium and computer program product use two different threads to process partial image data and panoramic image data respectively, so that partial image data can be processed in real time, and panoramic image data can be processed asynchronously.
  • the timeliness of processing the local image data can be improved, that is, the real-time performance of the local image data processing can be ensured, and the stability of the business system can be improved.
  • Fig. 1 is the application environment diagram of the image processing method in one embodiment
  • FIG. 2 is a schematic flowchart of an image processing method in one embodiment
  • FIG. 3 is a schematic flowchart of an image processing method in another embodiment
  • FIG. 4 is a schematic flowchart of an image processing method in yet another embodiment
  • FIG. 5 is a structural block diagram of an image processing apparatus in one embodiment
  • FIG. 6 is an internal structure diagram of an electronic device in one embodiment.
  • image data sources such as cameras installed in various places, databases storing images, etc.
  • they usually transmit the partial images together with their associated panoramic images to the image analysis unit for processing.
  • business processes such as image retrieval and analysis are only carried out for local images, which requires ensuring the real-time processing of local images.
  • Analysis while for panoramic images, the panoramic images are viewed only when necessary, and there is no need for real-time analysis.
  • the panoramic image will take up a lot of computer resources during transmission or processing, which will lead to a long processing time of a single partial image-panoramic image pair, and the processing of the panoramic image will affect the real-time performance of the partial image.
  • the present application provides an image processing method, an image processing apparatus, an electronic device, a storage medium and a computer program product, which can solve the above technical problems.
  • the image processing method provided in this application can be applied to the application environment shown in FIG. 1 .
  • the image data source 101 (which may be an image acquisition device such as a camera, or a database storing image data, a cloud, etc.) communicates with the image analysis unit 102 through a network.
  • the image data source sends the image data to the image analysis unit 102, and the image data may be video or image, and may include partial image data and panoramic image data.
  • it may also include a data access processing device 103.
  • the data access processing device 103 can be configured to perform data storage and/or format conversion processing on the image source collected by the collecting device 101, and transmit the processed image data. It is analyzed by the image analysis unit 102 .
  • the data access processing device 103 may be configured to parse the processed image data.
  • the image parsing unit 102 may be a device installed on a terminal or a server that can parse an image, and perform business processing such as retrieval and analysis of the parsed image.
  • the data access processing device 103 may be an electronic device, and may include a terminal or a server.
  • an image processing method is provided. This embodiment relates to how to store partial image data and panoramic image data respectively, and a specific process of preferentially processing partial image data. As shown in Figure 2, the image processing method may include the following steps:
  • each partial image data may include a panoramic image ID of the panoramic image corresponding to the partial image
  • each partial image data may include a panoramic image ID.
  • the partial image may be an image of the object of interest obtained by cutting out a part of the object of interest from the panoramic image.
  • the partial image can be a human face image.
  • a panoramic image can be a full-frame image captured by a camera.
  • the partial image data and the panorama image data are in a one-to-one or many-to-one relationship.
  • the image data obtained from the image data source may include the image (such as base64 data) and/or the image address (such as the storage address of the image in the image data source), and may also include the image ID, the time and place where the partial image was taken (such as capture camera ID).
  • the partial image data may also include its corresponding panoramic image ID, indicating the relationship between the partial image and the panoramic image.
  • the panoramic image data may also include its corresponding partial image ID, indicating the relationship between the partial image and the panoramic image. It can be understood that at least one of the partial image data and the panoramic image data may contain both the partial image ID and the panoramic image ID associated with each other, and the relationship between the two can be found through the partial image ID and the panoramic image ID.
  • both the partial image data and the panoramic image data may include a panoramic image ID
  • the partial image data also includes a panoramic image ID, so that a corresponding relationship between the partial image data and the panoramic image data can be established.
  • the partial image data may include: partial image ID, panoramic image ID, partial image, partial image storage address (one or both of partial image and partial image address may exist), partial image shooting time, partial image Shoot the camera.
  • the data access processing device can obtain image data from the image data source through FTP (File Transfer Protocol, file transfer protocol) file transfer, KAFKA message, HTTP (Hyper Text Transfer Protocol, hypertext transfer protocol) interface and other forms.
  • FTP File Transfer Protocol
  • KAFKA Kerman Transfer Protocol
  • HTTP Hyper Text Transfer Protocol, hypertext transfer protocol
  • S204 Process the multiple partial image data in real time through the first thread, and send the processed multiple partial image data to the image parsing unit, so that the image parsing unit parses the processed multiple partial image data to obtain the parsing A result list; wherein, the parsing result list may include parsing results corresponding to the partial image data one-to-one, and the parsing result may include the panoramic image ID of the panoramic image data corresponding to the partial image data corresponding thereto.
  • the partial image data is processed in real time through the first thread and sent to the image analysis unit, so as to ensure that the partial image is used for analysis as soon as possible after the partial image is generated.
  • the processing of the partial image data may include storage and/or format conversion, and when both storage and format conversion are included, the order of the two may be set as required.
  • the format conversion may include two times, the sequence of storage and format conversion is format conversion-storage-format conversion, wherein the first format conversion converts image data from the image data source into a storable format, and the second format conversion Format conversion converts data into a format that matches the image parsing unit.
  • the image data format used in the interaction between the image data source and the data access processing device can usually be different from the image data format used in the interaction between the data access processing device and the image analysis unit.
  • the data is converted into a format matched by the image parsing unit and sent to the image parsing unit.
  • the processing of the partial image data may include storage and format conversion.
  • the partial image can be stored in the file system first, the partial image address in the file system can be obtained, and then the partial image address and other information in the partial image data, such as partial image ID, panoramic image ID, etc., can be converted into image parsing unit matching format.
  • an image address with a smaller amount of data can be transmitted instead of an image with a larger amount of data, thereby ensuring the data transmission speed.
  • the processing of the partial image data may also include format conversion but not storage, and at this time, the transmitted data includes images.
  • the processing of the partial image data may include format conversion but not storage, or may include storage and format conversion.
  • the partial image address included in the partial image data may be the storage address of the partial image in the third party, and the data access processing device may download the partial image according to the storage address of the partial image in the third party, and then upload the partial image to the file
  • the storage system obtains the partial image address of the partial image address in the file storage system.
  • partial images can be stored in a file storage system that belongs to the same local network or network segment as the image parsing unit, which can improve the speed at which the image parsing unit acquires images based on addresses, compared to storage systems stored in third parties.
  • the data access processing device may convert the partial image address and other information in the partial image data, such as partial image ID, panoramic image ID, etc., into a format matched by the image parsing unit.
  • the image parsing unit After receiving the processed partial image data sent from the data access processing device, the image parsing unit parses the processed multiple partial image data to obtain a parsing result list; wherein, the parsing result list may include the same as the partial image.
  • the analysis result may include the panoramic image ID of the panoramic image data corresponding to the corresponding partial image data.
  • the partial image data A includes the panoramic image ID of the corresponding panoramic image data, so the data access processing device processes the partial image data A, and the obtained processed partial image data B still includes the panoramic image ID, and the image analysis unit The data B is analyzed, and the obtained analysis result C still includes the panoramic image ID.
  • the parsing result list includes parsing results. If the image parsing unit has finished parsing a certain processed partial image data, an parsing result corresponding to the partial image data will be obtained, and the parsing result corresponding to the partial image data can be found from the parsing result list. If the image parsing unit has not finished parsing a certain processed partial image data, the parsing result corresponding to the partial image data cannot be found from the parsing result list.
  • the parsing of the partial image data may include feature extraction, attribute recognition, etc.
  • the parsing result may include information such as face location, age, and gender obtained through attribute identification.
  • the analysis result may also include the partial image ID, the panoramic image ID, and the image data capture time.
  • the parsing result may also include a storage address of the panoramic image data corresponding to the reserved partial image data, so that the panoramic image corresponding to the partial image can be pulled according to the address when necessary.
  • the storage address of the panoramic image data corresponding to the partial image data may be empty, a meaningless value, or a value representing that the address has not been updated.
  • the first thread here may be a thread used by the data access processing device when processing local image data, and may be an arbitrarily set thread.
  • S206 asynchronously processing the panoramic image data, which may include: storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address to the target analysis result;
  • the target parsing result may be an parsing result including the panoramic image ID of the panoramic image data corresponding to the storage address.
  • the analysis, retrieval and analysis of images by the image analysis unit are mostly carried out for partial image data. Only when a certain partial image data is displayed to the user as the retrieval and analysis result, it is possible to respond to the user viewing the image.
  • the partial image corresponds to the requirement of the panoramic image, and the panoramic image corresponding to the partial image is retrieved. It can be seen that the use of a panoramic image by the image analysis unit is a small probability event, and the use of a panoramic image must be based on the premise that the partial image data corresponding to the panoramic image has been parsed, applied to retrieval and analysis, and used as the result of retrieval and analysis. Therefore, the real-time requirement for panoramic image data processing is low, and it can be processed asynchronously, and more resources can be used to process local image data.
  • the processing of the panoramic image data may include storing and updating the storage of the panoramic image into the parsing result, so the asynchronous processing may be asynchronous processing in the storage process or asynchronous processing in the storage address update process.
  • the processing of the panoramic image data may also include image compression prior to storage.
  • the panoramic image data may include the panoramic image or the storage address of the panoramic image in a third party.
  • the storage of the panoramic image data is similar to the storage of the partial image data, and will not be repeated here.
  • the file storage system for storing panoramic image data here may be the same as or different from the above-mentioned file storage system for storing partial image data.
  • the panoramic image After updating the storage address of the panorama image to its corresponding parsing result, when the user views the parsing result (usually after the parsing result is displayed to the user as a retrieval or analysis result, the user will only perform the analysis on the panorama image corresponding to the parsing result. View), the panoramic image can be obtained through the storage address of the panoramic image.
  • the second thread here may be different from the above-mentioned first thread. It may be the thread of the data access processing device when processing the panoramic image data. After the first thread is set, it may be arbitrarily selected from other threads of the device. fixed thread. In addition, since the data size of the panoramic image is larger than that of the partial image, the processing speed of the panoramic image is slower than that of the partial image.
  • the second thread stores the panoramic image, usually the partial image corresponding to the panoramic image has been pushed to the image analysis unit. Perform image processing.
  • the above image processing method uses two different threads to process the partial image data and the panoramic image data respectively, which can process the partial image data in real time and asynchronously process the panoramic image data, which can improve the timeliness of processing the partial image data. That is, the real-time performance of local image data processing can be ensured, thereby improving the stability of the business system.
  • step S206 can be implemented in the following manner:
  • Step SA1 the panoramic image data is put into the first buffer queue
  • Step SA2 take out the panoramic image data one by one from the first buffer queue by the second thread, take out the panoramic image data as the current panoramic image data;
  • Step SA3 store the panoramic image corresponding to the current panoramic image data, obtain the current storage address
  • the panoramic image data contains a panoramic image
  • the current panoramic image contained in the current panoramic image data is stored in the file system, and the current storage address of the panoramic image corresponding to the current panoramic image data in the file system is obtained;
  • the panoramic image data contains the storage address of the panoramic image in the third-party storage system
  • obtain the current panoramic image according to the storage address in the third-party storage system store the current panoramic image in the file system, and obtain the corresponding data of the current panoramic image.
  • the current storage address of the panorama image in the file system is obtained
  • Step SA4 obtain described parsing result list from image parsing unit
  • Step SA5 Judging whether there is a target parsing result corresponding to the current storage address in the parsing result list
  • Step SA6 If there is, update the current storage address to the target parsing result corresponding to the current storage address.
  • Step S B1 the panoramic image data is put into the first buffer queue
  • Step S B2 take out the panoramic image data one by one from the first buffer queue by the second thread, take out the panoramic image data as current panoramic image data;
  • Step S B3 obtain the analysis result list from the image analysis unit
  • Step S B4 judge whether there is a target analysis result corresponding to the current panoramic image data in the analysis result list
  • Step S B5 if there is, then store the current panoramic image data, obtain the current storage address (the specific steps are the same as SA3); The current storage address is updated to the target analysis result corresponding to the current storage address; If not If there is, the current panoramic image data is put into the tail of the first buffer queue.
  • the storage step is a step that occupies a large amount of resources, and performing asynchronous processing on the storage step can use more resources to process local image data.
  • the second method is to store the current panoramic image data after it is judged that the analysis has been completed.
  • storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address to the target parsing result may include:
  • the current storage address is updated to the target parsing result corresponding to the current storage address.
  • storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address to the target parsing result may include:
  • the panoramic image corresponding to the currently retrieved panoramic image data is stored to obtain the current storage address; the current storage address is updated to the target parsing result corresponding to the current storage address.
  • the image processing Methods before storing the panoramic image data through the second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address into the target parsing result, the image processing Methods can also include:
  • retrieving panoramic image data one by one through the second thread may include:
  • the panoramic image data is taken out from the first buffer queue by the second thread, and the taken out panoramic image data is used as the current panoramic image data.
  • the image processing Methods before storing the panoramic image data through the second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address into the target parsing result, the image processing Methods can also include:
  • the image processing method also includes:
  • Step S C1 store described panoramic image data one by one by the second thread, obtain storage address (specific steps are the same as SA3);
  • Step S C2 the storage address is put into the second buffer queue
  • Step S C3 take out storage addresses one by one from the second buffer queue, take out storage addresses as current storage addresses;
  • Step S C4 obtain the analysis result list from the image analysis unit
  • Step S C5 Judging whether there is a target parsing result corresponding to the current storage address in the parsing result list;
  • Step S C6 if there is, then the current storage address is updated to the target parsing result corresponding to the current storage address;
  • the current storage address is put into the tail of the second buffer queue.
  • the image processing method may further include:
  • Step S208 Receive priority processing information, where the priority processing information may include a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID.
  • the image analysis unit analyzes the local image data, obtains the analysis result, and then retrieves and analyzes the analysis result.
  • the analysis result may include the shooting time and shooting location of the target.
  • the user can search the analysis results with the shooting time between t1 and t2 in the shooting time field of the analysis results, and then the partial image data corresponding to the analysis results satisfying the retrieval conditions can be obtained.
  • the corresponding panoramic image needs to be pulled.
  • the corresponding panoramic image data may be pulled from the file storage system according to the address of the panoramic image data included in the parsing result and displayed to the user.
  • the image analysis unit will send priority processing information to the data access processing device to notify the data access processing device to perform queue-cutting processing on the panoramic image data.
  • the data access processing device performs queue-cutting processing on the panoramic image data through the fourth mode.
  • Step S D1 take out the priority panoramic image data corresponding to the described priority panoramic image ID from the first buffer queue according to the priority panoramic image ID by the third thread;
  • Step S D2 store described priority panoramic image data, obtain priority storage address (referring to step SA3 for storage mode);
  • Step S D3 Update the priority storage address to the analysis result corresponding to the priority panoramic image ID.
  • the data access processing device performs queue-cutting processing on the panoramic image data through the fifth mode.
  • Step S E1 according to the priority panorama image ID by the third thread, from the second buffer queue, take out the priority storage address corresponding to the priority panorama image ID;
  • Step S E2 Update the priority storage address to the parsing result corresponding to the priority panoramic image ID.
  • the panoramic image data has been stored but not updated, and in this case, it is only necessary to cut the queue to update.
  • the data access processing device updates the priority storage address to the parsing result corresponding to the priority panoramic image ID, it can send the updated parsing result to the image parsing unit, so that the image parsing unit can Include the priority storage address to obtain the panoramic image and show it to the user.
  • the “processing the plurality of partial image data in real time through the first thread” in the above S204 may include the following steps:
  • S302 store the plurality of partial image data one by one through the first thread, and obtain a first storage address corresponding to each of the partial image data.
  • each partial image data and each panoramic image data is converted into format, and the data format of each partial image data and each panoramic image data is converted into a docking station data format (denoted as Docking data format, namely Docking Data format).
  • each partial image data can be sequentially stored on the file storage system through the first thread (see step S A3 for the specific steps).
  • the file storage system can assign a storage address to each partial image, which is denoted as the first A storage address, that is, each stored partial image number will obtain a first storage address.
  • S304 Encapsulate each of the first storage addresses and other information contained in each of the partial image data to obtain partial image encapsulation data corresponding to the partial image data.
  • the other information here may be, for example, a partial image ID, a panoramic image ID.
  • the local image encapsulation data obtained here can be recorded as the Capture data format, that is, the Captuer Data format.
  • storing the panoramic image data through the second thread to obtain a storage address corresponding to the panoramic image data one-to-one may include the following steps:
  • Step A1 Store the panoramic image data one by one through the second thread to obtain a second storage address corresponding to each of the panoramic image data.
  • the data format of each panoramic image data may be format-converted before being stored.
  • the panorama image or the panorama image address can be obtained from the format-converted panorama image data through the second thread, and the panorama images are sequentially stored on the file server.
  • a storage address is denoted as the second storage address, that is, each stored panoramic image will obtain a second storage address.
  • Step A2 Encapsulate each of the above-mentioned panoramic image IDs and the corresponding second storage addresses to obtain panoramic image encapsulation data corresponding to each of the above-mentioned panoramic image data.
  • each panoramic image ID and its corresponding second storage address can be encapsulated together to obtain panoramic image encapsulation data corresponding to each panoramic image data.
  • each partial image data can be stored one by one through the first thread, the first storage address of each partial image data can be obtained, and the first storage address and other information contained in the partial image data (including the partial image data) can be obtained.
  • the image ID and its associated panoramic image ID) are encapsulated to obtain individual partial image encapsulation data.
  • the storage address of the partial image data and the partial image ID and its associated panoramic image ID can be encapsulated, it is convenient to quickly find the corresponding panoramic image ID through the storage address and the panoramic image ID during subsequent image processing.
  • the local image data can improve the efficiency of data search.
  • the foregoing S202 may include the following steps:
  • S402 Acquire a plurality of partial image data from an image data source through a data access processing service.
  • S404 Acquire a plurality of panoramic image data corresponding to the plurality of partial image data from the above-mentioned image data source through the above-mentioned data access processing service.
  • the image data source (such as an image acquisition device, a database for storing images, videos, etc.) may only have panoramic images, or may include both partial images containing faces or other targets, and partial images containing objects of interest where the panoramic image is located.
  • the image data source may only have the panoramic image, the identification of the panoramic image, and the time and location information of the panoramic image, and use these information as panoramic image data; then perform face recognition and face matting on the panoramic image.
  • a partial image can be obtained, and an ID can also be added to the partial image, and the partial image and its ID, the shooting time and location of the panoramic image where it is located, etc., can be used as the partial image data.
  • the third-party acquisition device can send the partial image data and the panoramic image data to the data access processing device, and the data access processing device can receive the multiple partial image data and multiple panoramic image data through the data access processing service and convert it to a format matched by the image parsing unit.
  • multiple partial image data and multiple corresponding panoramic image data can be obtained from the image data source through the data access processing service, so that the partial image data and the panoramic image data can be quickly obtained as subsequent images.
  • Processing provides data sources and improves the processing efficiency of subsequent services.
  • steps in the flowcharts of FIG. 2 to FIG. 4 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 2-4 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.
  • an image processing apparatus may include: an acquisition module 10, a first processing module 11 and a second processing module 12, wherein:
  • the acquiring module 10 may be configured to acquire a plurality of partial image data and panoramic image data corresponding to each partial image data; wherein each partial image data may include a panoramic view of the panoramic image corresponding to the partial image an image ID, each of the panoramic image data may include a panoramic image ID;
  • the first processing module 11 may be configured to process the plurality of partial image data in real time through the first thread, and send the processed plurality of partial image data to the image analysis unit, so that the image analysis unit can analyze the processed multiple pieces of image data in real time. Parsing the partial image data to obtain a list of parsing results; wherein, the parsing result list may include parsing results corresponding to the partial image data one-to-one, and the parsing results may include panoramic image data corresponding to the corresponding partial image data The panorama image ID;
  • the second processing module 12 may be configured to: store the panoramic image data through a second thread, obtain a storage address corresponding to the panoramic image data one-to-one, and update the storage address into the target analysis result; the target analysis
  • the result may be an analysis result including the panoramic image ID of the panoramic image data corresponding to the storage address.
  • the above-mentioned first processing module 11 can specifically be used to store and store the plurality of partial image data in real time through the first thread. / or format conversion.
  • the above-mentioned second processing module 12 may include a first putting-in unit, a first taking-out unit, a first storage unit, a first an acquisition unit, a first judgment unit and an update unit, wherein:
  • the first putting unit may be configured to put the panoramic image data into the first buffer queue
  • the first fetching unit may be configured to fetch the panoramic image data from the first buffer queue one by one through the second thread, and use the fetched panoramic image data as the current panoramic image data;
  • the first storage unit may be configured to store the panoramic image corresponding to the current panoramic image data to obtain the current storage address;
  • the first acquiring unit may be configured to acquire the parsing result list from the image parsing unit
  • the first judging unit may be configured to judge whether there is a target parsing result corresponding to the current storage address in the parsing result list;
  • the updating unit may be configured to: if exists, update the current storage address to the target parsing result corresponding to the current storage address.
  • the above-mentioned second processing module 12 may include a second insertion unit, a second extraction unit, a second acquisition unit, a second Judgment unit and storage unit, where:
  • the second putting unit may be configured to put the panoramic image data into the first buffer queue
  • the second fetching unit may be configured to fetch the panoramic image data from the first buffer queue one by one through the second thread, and use the fetched panoramic image data as the current panoramic image data;
  • the second acquiring unit may be configured to acquire the parsing result list from the image parsing unit
  • the second judging unit may be configured to judge whether there is a target parsing result corresponding to the current panoramic image data in the parsing result list;
  • the storage putting unit can be configured to: if exists, store the panoramic image corresponding to the current panoramic image data to obtain the current storage address; update the current storage address to the target parsing result corresponding to the current storage address in; if it does not exist, put the current panoramic image data into the tail of the first buffer queue.
  • the above-mentioned second processing module 12 may include a third storage unit, a third putting-in unit, a third taking-out unit, a third An acquisition unit, a third judgment unit, and an update insertion unit, wherein:
  • the third storage unit may be configured to store the panoramic images corresponding to the panoramic image data one by one through the second thread to obtain a storage address;
  • the third putting unit may be configured to put the storage address into the second buffer queue
  • the third fetching unit may be configured to fetch storage addresses from the second buffer queue one by one, and use the fetched storage addresses as the current storage address;
  • the third acquiring unit may be configured to acquire the parsing result list from the image parsing unit
  • the third judging unit may be configured to judge whether there is a target parsing result corresponding to the current storage address in the parsing result list;
  • the update putting unit may be configured to: if it exists, update the current storage address to the target parsing result corresponding to the current storage address; if not, put the current storage address into the second storage address The tail of the buffer queue.
  • the foregoing apparatus may further include: a first receiving module, a first retrieval module, a storage module and a first updating module, wherein:
  • the first receiving module may be configured to receive priority processing information, where the priority processing information includes a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID;
  • the first retrieval module may be configured to retrieve the priority panoramic image data corresponding to the priority panoramic image ID from the first buffer queue according to the priority panoramic image ID through the third thread;
  • the storage module may be configured to store the panoramic image corresponding to the priority panoramic image data to obtain the priority storage address;
  • the first update module may be configured to update the priority storage address into the parsing result corresponding to the priority panoramic image ID.
  • the above-mentioned apparatus may further include: a second receiving module, a second taking-out module and a second updating module, wherein:
  • the second receiving module may be configured to receive priority processing information, where the priority processing information includes a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID;
  • the second retrieval module may be configured to retrieve the priority storage address corresponding to the priority panoramic image ID from the second buffer queue according to the priority panoramic image ID through the third thread;
  • the second update module may be configured to update the priority storage address into the parsing result corresponding to the priority panoramic image ID.
  • the above-mentioned acquisition module 10 may include a local acquisition unit and a global acquisition unit, wherein:
  • the partial acquisition unit may be configured to acquire a plurality of partial image data from the image data source through the data access processing service;
  • the global acquisition unit may be configured to acquire panoramic image data corresponding to the local image data from the image data source through the data access processing service.
  • Each module in the above-mentioned image processing apparatus may be implemented in whole or in part by software, hardware, and combinations thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of the above-mentioned modules.
  • an electronic device can be a computer device, such as a terminal, and can be a part of a data access processing device or directly used as a data access processing device. Its internal structure diagram can be shown in FIG. 6 . shown.
  • a computer device may include a processor, memory, communication interface, display screen, and input devices connected by a system bus. Among other things, the processor of the computing device may be used to provide computing and control capabilities.
  • the memory of the computer device may include non-volatile storage media, internal memory.
  • the nonvolatile storage medium may store an operating system and a computer program.
  • the internal memory may provide an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
  • the communication interface of the computer device can be used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies.
  • WIFI Wireless Fidelity
  • NFC Near Field Communication
  • an image processing method can be implemented.
  • the display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen
  • the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
  • FIG. 6 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may include There are more or fewer components than shown in the figures, or some components are combined, or have a different arrangement of components.
  • an electronic device may include a memory and a processor, a computer program may be stored in the memory, and the processor may implement the following steps when executing the computer program:
  • each of the partial image data includes the panoramic image ID of the panoramic image corresponding to the partial image, and each of the panoramic image
  • the data includes a panoramic image ID; the plurality of partial image data is processed in real time through the first thread, and the processed multiple partial image data is sent to the image analysis unit, so that the image analysis unit can analyze the processed multiple partial image data in real time.
  • the parsing result list includes parsing results corresponding to the partial image data one-to-one, and the parsing result includes the panoramic image ID of the panoramic image data corresponding to the partial image data; asynchronous
  • the processing of the panoramic image data includes: storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address to the target analysis result; the target analysis The result is an analysis result including the panoramic image ID of the panoramic image data corresponding to the storage address.
  • the processor may further implement the following steps when executing the computer program:
  • Real-time storage and/or format conversion of the plurality of partial image data is performed by the first thread.
  • the processor may further implement the following steps when executing the computer program:
  • Panoramic image obtain the current storage address; obtain the parsing result list from the image parsing unit; determine whether there is a target parsing result corresponding to the current storage address in the parsing result list; The target parsing result corresponding to the current storage address is updated.
  • the processor may further implement the following steps when executing the computer program:
  • the processor may further implement the following steps when executing the computer program:
  • the processor may further implement the following steps when executing the computer program:
  • Receive priority processing information where the priority processing information includes a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID; take out the priority panoramic image from the first buffer queue through a third thread according to the priority panoramic image ID
  • the priority panoramic image data corresponding to the image ID; the panoramic image corresponding to the priority panoramic image data is stored to obtain a priority storage address; the priority storage address is updated to the analysis result corresponding to the priority panoramic image ID.
  • the processor may further implement the following steps when executing the computer program:
  • Receive priority processing information where the priority processing information includes a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID; take out the priority panoramic image from the second buffer queue through a third thread according to the priority panoramic image ID The priority storage address corresponding to the image ID; the priority storage address is updated to the analysis result corresponding to the priority panoramic image ID.
  • the processor may further implement the following steps when executing the computer program:
  • a computer-readable storage medium is provided, and a computer program may be stored on the computer-readable storage medium, and when the computer program is executed by a processor, the following steps may be implemented:
  • each of the partial image data includes the panoramic image ID of the panoramic image corresponding to the partial image, and each of the panoramic image
  • the data includes a panoramic image ID; the plurality of partial image data is processed in real time through the first thread, and the processed multiple partial image data is sent to the image analysis unit, so that the image analysis unit can analyze the processed multiple partial image data in real time.
  • the parsing result list includes parsing results corresponding to the partial image data one-to-one, and the parsing result includes the panoramic image ID of the panoramic image data corresponding to the partial image data; asynchronous
  • the processing of the panoramic image data includes: storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address to the target analysis result; the target analysis The result is an analysis result including the panoramic image ID of the panoramic image data corresponding to the storage address.
  • the computer program may further implement the following steps when executed by the processor:
  • Real-time storage and/or format conversion of the plurality of partial image data is performed by the first thread.
  • the computer program may further implement the following steps when executed by the processor:
  • Panoramic image obtain the current storage address; obtain the parsing result list from the image parsing unit; determine whether there is a target parsing result corresponding to the current storage address in the parsing result list; The target parsing result corresponding to the current storage address is updated.
  • the computer program may further implement the following steps when executed by the processor:
  • the computer program may further implement the following steps when executed by the processor:
  • the computer program may further implement the following steps when executed by the processor:
  • Receive priority processing information where the priority processing information includes a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID; take out the priority panoramic image from the first buffer queue through a third thread according to the priority panoramic image ID
  • the priority panoramic image data corresponding to the image ID; the panoramic image corresponding to the priority panoramic image data is stored to obtain a priority storage address; the priority storage address is updated to the analysis result corresponding to the priority panoramic image ID.
  • the computer program may further implement the following steps when executed by the processor:
  • Receive priority processing information where the priority processing information includes a priority panoramic image ID and a parsing result corresponding to the priority panoramic image ID; take out the priority panoramic image from the second buffer queue through a third thread according to the priority panoramic image ID The priority storage address corresponding to the image ID; the priority storage address is updated to the analysis result corresponding to the priority panoramic image ID.
  • the computer program may further implement the following steps when executed by the processor:
  • a computer program can include computer readable code, when the computer readable code is run on a computing processing device, the computing processing device can perform the following steps:
  • each of the partial image data includes the panoramic image ID of the panoramic image corresponding to the partial image, and each of the panoramic image The data includes the panoramic image ID;
  • the image parsing unit parses the processed multiple partial image data to obtain a parsing result list ;
  • the analysis result list includes the analysis results corresponding to the partial image data one-to-one, and the analysis result includes the panoramic image ID of the panoramic image data corresponding to the partial image data corresponding thereto;
  • the second thread stores the panoramic image data, obtains a storage address corresponding to the panoramic image data one-to-one, and updates the storage address to the target analysis result; the target analysis result contains the corresponding storage address.
  • the parsing result of the panoramic image ID of the panoramic image data is the parsing result of the panoramic image ID of the panoramic image data.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • the RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
  • the present application discloses an image processing method, an image processing apparatus, an electronic device, a storage medium and a computer program product.
  • the image processing method includes: acquiring a plurality of partial image data and panoramic image data corresponding to each of the partial image data; wherein each of the partial image data includes a panoramic image ID of the panoramic image corresponding to the partial image;
  • the first thread processes the multiple partial image data in real time, and sends the processed multiple partial image data to the image parsing unit, so that the image parsing unit parses the processed multiple partial image data to obtain a parsing result list;
  • Asynchronously processing the panoramic image data includes: storing the panoramic image data through a second thread, obtaining a storage address corresponding to the panoramic image data one-to-one, and updating the storage address into the target parsing result.
  • the method can improve the real-time performance of local image processing.
  • the image processing method, image processing apparatus, electronic device, storage medium and computer program product of the present application are reproducible and can be applied in various industrial applications.
  • the image processing method of the present application can be applied to the technical field of data processing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Software Systems (AREA)
  • Facsimiles In General (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种图像处理方法、图像处理装置、电子设备和存储介质。所述图像处理方法包括:获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID;通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;异步处理所述全景图像数据,包括:通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中。采用该方法能够提高局部图像处理的实时性。

Description

图像处理方法、图像处理装置、电子设备和存储介质
相关申请的交叉引用
本申请要求于2021年1月19日提交中国国家知识产权局的申请号为202110069556.6、名称为“图像处理方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,特别是涉及一种图像处理方法、图像处理装置、电子设备、存储介质和计算机程序产品。
背景技术
安全防范技术中涉及的图像通常包括成对的全景图像和局部图像,其中局部图像是从全景图像中截取的包含有关注对象的部分。相关技术中,通过第三方系统(例如安装在各种场所的摄像头、相机、存储有图片的数据库)获取局部图像和全景图像,并在获取图像后对局部图像和全景图像实时进行存储、解析等处理。然而,由于全景图像尺寸较大、对全景图像的处理耗时长,当存在多个包含局部图像-全景图像的图像对时,上述技术难以保证对排位靠后的图像对中局部图像处理的实时性。
发明内容
基于此,有必要针对上述技术问题,提供一种能够提高局部图像处理实时性的图像处理方法、图像处理装置、电子设备、存储介质和计算机程序产品。
一种图像处理方法,该图像处理方法可以包括:
获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据中包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;
通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
在其中一个实施例中,所述通过第一线程实时处理所述多个局部图像数据可以包括:通过第一线程对所述多个局部图像数据进行实时存储和/或进行格式转换。
在其中一个实施例中,通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中,可以包括:
通过第二线程逐一取出取出全景图像数据;
存储当前取出的全景图像数据对应的全景图像,得到当前存储地址;
从图像解析单元获取所述解析结果列表;
判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;
若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
在其中一个实施例中,通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中,可以包括:
通过第二线程逐一取出全景图像数据;
从图像解析单元获取所述解析结果列表;
判断所述解析结果列表中是否存在与当前取出的全景图像数据对应的目标解析结果;
若存在,则存储当前取出的全景图像数据对应的全景图像,得到当前存储地址;将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
在其中一个实施例中,在通过第二线程存储所述全景图像数据、得到与所述全景图像数据一一对应的存储地址、将所述存储地址更新到目标解析结果中之前,所述图像处理方法还可以包括:
将所述全景图像数据放入第一缓冲队列;
相应地,通过所述第二线程逐一取出全景图像数据可以包括:
通过所述第二线程从所述第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据。
在其中一个实施例中,在通过第二线程存储所述全景图像数据、得到与所述全景图像数据一一对应的存储地址、将所述存储地址更新到目标解析结果中之前,所述图像处理方法还可以包括:
将所述全景图像数据放入第一缓冲队列;
相应地,若所述解析结果列表中不存在与当前取出的所述全景图像数据对应的目标解析结果,所述图像处理方法还包括:
将当前取出的所述全景图像数据放入所述第一缓冲队列的队尾。
在其中一个实施例中,通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中,可以包括:
通过第二线程逐一存储所述全景图像数据对应的全景图像,得到存储地址;
将所述存储地址放入第二缓冲队列;
逐一从所述第二缓冲队列中取出存储地址;
从图像解析单元获取所述解析结果列表;
判断所述解析结果列表中是否存在与当前取出的存储地址对应的目标解析结果;
若存在,则将当前取出的所述存储地址更新到与当前取出的所述当前存储地址对应的目标解析结果中;
若不存在,则将当前取出的所述存储地址放入所述第二缓冲队列的队尾。
在其中一个实施例中,所述图像处理方法还可以包括:
接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;
通过第三线程根据所述优先全景图像ID,取出所述优先全景图像ID对应的优先全景图像数据;
存储所述优先全景图像数据对应的全景图像,得到优先存储地址;
将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
在其中一个实施例中,所述图像处理方法还可以包括:
接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;
通过第三线程根据所述优先全景图像ID,从所述第二缓冲队列中取出所述优先全景图像ID对应的优先存储地址;
将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
在其中一个实施例中,所述获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据可以包括:
通过数据接入处理服务从图像数据源获取多个局部图像数据;
通过所述数据接入处理服务从所述图像数据源获取与每个所述局部图像数据对应的全景图像数据。
一种图像处理装置,该图像处理装置可以包括:
获取模块,所述获取模块可以配置成用于获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;
第一处理模块,所述第一处理模块可以配置成用于通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中可以包括与局部图像数据一一对应的解析结果,所述解析结果可以包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
第二处理模块,所述第二处理模块可以配置成用于异步处理每个所述全景图像数据,包括:通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果可以为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
一种电子设备,该电子设备可以包括存储器和处理器,所述存储器可以存储有计算机程序,所述处理器执行所述计算机程序时可以实现以下步骤:
获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;
通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
一种计算机可读存储介质,该计算机可读存储介质上可以存储有计算机程序,所述计算机程序被处理器执行时可以实现以下步骤:
获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;
通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
一种计算机程序产品,该计算机程序产品可以包括计算机程序,当该计算机程序被处理器执行时可以实现以下步骤:
获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;
通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
上述图像处理方法、图像处理装置、电子设备、存储介质和计算机程序产品,采用两个不同的线程分别对局部图像数据和全景图像数据进行处理,可以对局部图像数据实时处理,对全景图像数据异步处理,这样可以提升对局部图像数据进行处理的时效性,即可以保证对局部图像数据处理的实时性,从而 可以提高业务系统的稳定性。
附图说明
图1为一个实施例中图像处理方法的应用环境图;
图2为一个实施例中图像处理方法的流程示意图;
图3为另一个实施例中图像处理方法的流程示意图;
图4为又一个实施例中图像处理方法的流程示意图;
图5为一个实施例中图像处理装置的结构框图;
图6为一个实施例中电子设备的内部结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
目前,图像数据源(例如安装在各种场所的摄像头、存储有图像的数据库等)在给图像解析系统传输图片时,通常是将局部图像和其关联的全景图像一起传输给图像解析单元进行处理。通常图片检索、分析等业务流程只针对局部图像进行,这就要求保证局部图像的处理的实时性,希望在局部图像接入图像解析单元后快速对其进行解析,以用于后续的图像检索、分析,而对于全景图像来说,只有在必要时,才对全景图像进行查看,没有必要实时解析。而全景图片在传输或处理过程中会占用大量的计算机资源,这样就会导致单个局部图像-全景图像图像对的处理时间过长,对全景图像的处理将影响局部图像的实时性。也就是说,目前对局部图像、全景图像的处理方式难以保证对局部图像处理时的实时性。因此本申请提供一种图像处理方法、图像处理装置、电子设备、存储介质和计算机程序产品,可以解决上述技术问题。
本申请提供的图像处理方法可以应用于如图1所示的应用环境中。其中,图像数据源101(可以为摄像头等图像采集设备,也可以为存储有图像数据的数据库、云端等)通过网络与图像解析单元102进行通信。其中,图像数据源将图像数据发送至图像解析单元102,图像数据可以为视频或图像,可以包括局部图像数据和全景图像数据。当然还可以包括数据接入处理设备103,该数据接入处理设备103可以配置成用于对采集设备101采集的图像源进行数据存储和/或格式转换等处理,并将处理后的图像数据传输给图像解析单元102进行解析。可选地,替代于图像解析单元102对处理后的图像数据进行解析,数据接入处理设备103可以配置成用于对处理后的图像数据进行解析。图像解析单元102可以是在终端或服务器上安装的可以对图像进行解析、并对解析后的图像进行检索、分析等业务处理的设备。数据接入处理设备103可以是电子设备,可以包括终端或服务器。
需要说明的是,本申请实施例的方法可以应用于图像解析单元,也可以应用于数据接入处理设备,下述实施例将以数据接入处理设备,即计算机设备作为执行主体来进行说明。
在一个实施例中,提供了一种图像处理方法,本实施例涉及的是如何分别存储局部图像数据和全景图像数据,以及优先对局部图像数据进行处理的具体过程。如图2所示,该图像处理方法可以包括以下步骤:
S202,获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据可以包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据可以包括全景图像ID。
在一例中,局部图像可以为从全景图像中截取关注对象部分得到的关注对象图像。例如,关注对象为人脸时,局部图像可以为人脸图像。全景图像可以为摄像头拍摄的全画幅图像。当一张全景图包含一张或多张人脸,因此局部图像数据和全景图像数据是一对一或多对一的关系。
其中,从图像数据源获取的图像数据可以包括图像(例如base64数据)和/或图像地址(例如图像在图像数据源的存储地址),还可以包括图像ID、局部图像拍摄的时间、地点(例如拍摄相机ID)。局部图像数据中还可以包括其对应的全景图像ID,表明局部图像和全景图像的关联关系。类似的,全景图像数据中也可以包括其对应的局部图像ID,表明局部图像和全景图像的关联关系。可以理解的是,局部图像数据和全景图像数据中的至少一个可以同时包含相互关联的局部图像ID-全景图像ID即可,可通过局部图像ID-全景图像ID找到二者的关联关系。在一例中,局部图像数据和全景图像数据中都可以包含全景图像ID,局部图像数据中还包含全景图像ID,如此可建立局部图像数据和全景图像数据的对应关系。此时,局部图像数据中可以包括:局部图像ID,全景图像ID,局部图像、局部图像存储地址(局部图像和局部图像地址可以存在一者或二者同时存在),局部图像拍摄时间、局部图像拍摄相机。
数据接入处理设备可以通过FTP(File Transfer Protocol,文件传输协议)文件传输、KAFKA消息、HTTP(Hyper Text Transfer Protocol,超文本传输协议)接口等形式从图像数据源获取图像数据。
S204,通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中可以包括与局部图像数据一一对应的解析结果,所述解析结果可以包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID。
在接收到局部图像数据后,通过第一线程对局部图像数据进行实时处理并发送给图像解析单元,以保证在局部图像产生后尽快用于解析。
对局部图像数据的处理可以包括存储和/或格式转换,当同时包括存储和格式转换时,二者的顺序可根据需要设置。一例中,格式转换可以包括两次,存储和格式转换的顺序为格式转换-存储-格式转换,其中,第一次格式转换将来自图像数据源的图像数据转换成可存储的格式,第二次格式转换将数据转换为图像解析单元匹配的格式。图像数据源、数据接入处理设备交互时使用的图像数据格式通常可以与数据接入处理设备、图像解析单元交互时使用的图像数据格式不同,可通过数据接入处理设备对来自图像数据源的数据转换为图像解析单元匹配的格式后发送给图像解析单元。
当局部图像数据包括局部图像时,对局部图像数据的处理可以包括存储和格式转换。一例中,可以首先将局部图像存储在文件系统,得到文件系统中的局部图像地址,再将局部图像地址和局部图像数据中的其他信息例如局部图像ID、全景图像ID等转换为图像解析单元匹配的格式。如此,在后续向图像解析单元进行图像数据传输时,可以传输数据量更小的图像地址而非数据量更大的图像,从而保证数据传输速度。
当然,当局部图像数据包括图像时,对局部图像数据的处理也可以包括格式转换而不包括存储,此时传输的数据包括图像。
当局部图像数据包括局部图像地址时,对局部图像数据的处理可以包括格式转换而不包括存储,也可以包括存储和格式转换。一例中,局部图像数据包括的局部图像地址可以是局部图像在第三方的存储地址,数据接入处理设备可根据局部图像在第三方的存储地址将局部图像下载下来,再将局部图像上传至文件存储系统,得到局部图像地址在文件存储系统中的局部图像地址。如此,可使局部图像存储在与图像解析单元同属一个局部网或网段的文件存储系统,相比于存储在第三方的存储系统,能够提高图像解析单元根据地址获取图像的速度。随后,数据接入处理设备可以将局部图像地址和局部图像数据中的其他信息例如局部图像ID、全景图像ID等转换为图像解析单元匹配的格式。
收到来自数据接入处理设备发送的处理后的局部图像数据后,图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中可以包括与局部图像数据一一对应的解析结果,所述解析结果可以包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID。
局部图像数据A中包括与其对应的全景图像数据的全景图像ID,因此数据接入处理设备对局部图像数据A进行处理,得到的处理后的局部图像数据B中仍包括全景图像ID,图像解析单元对数据B进行解析,得到的解析结果C中仍包括全景图像ID。解析结果列表包括解析结果。如果图像解析单元对某个处理后的局部图像数据已解析完毕,将得到与该局部图像数据对应的解析结果,从解析结果列表中能够查找到对应该局部图像数据的解析结果。如果图像解析单元尚未对某个处理后的局部图像数据解析完毕,则无法从解析结果列表中能够查找到对应该局部图像数据的解析结果。
对局部图像数据的解析可以包括特征提取、属性识别等,例如,局部图像数据对应的关注对象为人脸时,解析结果可以包括通过属性识别获得的人脸位置、年龄、性别等信息。解析结果中还可以包括局部图像ID、全景图像ID、图像数据抓拍时间。解析结果还可以包括预留的局部图像数据对应的全景图像数据的存储地址,以便在需要时根据该地址拉取局部图像对应的全景图像。在未向解析结果中写入全景图像数据地址时,局部图像数据对应的全景图像数据的存储地址可以为空、无意义值或代表该地址尚未得到更新的值。
其中,这里的第一线程可以是数据接入处理设备在处理局部图像数据时使用的线程,可以是任意设定的一个线程。
S206,异步处理所述全景图像数据,可以包括:通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果可以为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
如前所述,图像解析单元对图像的解析、检索、分析大多是针对局部图像数据进行的,只有当某个局部图像数据作为检索、分析结果展示给用户时,才有可能响应于用户查看该局部图像对应全景图像的需求,调取该局部图像对应的全景图像。可见,图像解析单元使用全景图像是小概率事件,而且使用全景图像必然以该全景图像对应的局部图像数据已经被解析完毕、已被应用于检索、分析且被作为检索、分析的结果为前提。因此,对全景图像数据处理的实时性要求较低,可对其进行异步处理,将更多的资 源用于处理局部图像数据。
对全景图像数据的处理可以包括存储和将全景图像的存储更新到解析结果中,因此异步处理可以是存储过程中的异步处理,也可以是存储地址更新过程中的异步处理。对全景图像数据的处理包括还可以包括存储前的图像压缩。
与局部图像数据类似,全景图像数据可以包括全景图像,也可以包括全景图像在第三方的存储地址,对全景图像数据的存储同对局部图像数据的存储类似,在此不再赘述。需要说明的是,这里存储全景图像数据的文件存储系统可以和上述存储局部图像数据的文件存储系统相同或不同。
将全景图像的存储地址更新到其对应的解析结果中后,当用户对解析结果进行查看时(通常在解析结果作为检索或分析结果展示给用户后,用户才会对解析结果对应的全景图像进行查看),即可通过全景图像的存储地址获取到全景图像。
其中,这里的第二线程可以和上述的第一线程不同,可以是数据接入处理设备在处理全景图像数据时的线程,可以是在设置好第一线程之后,从设备其余的线程中任意选定的线程。另外,由于全景图像的数据大小大于局部图像,对全景图像的处理速度慢于对局部图像的处理,当第二线程存储全景图像时,通常该全景图像对应的局部图像已经被推送至图像解析单元进行图像处理。
上述图像处理方法采用两个不同的线程分别对局部图像数据和全景图像数据进行处理,可以对局部图像数据实时处理,对全景图像数据异步处理,这样可以提升对局部图像数据进行处理的时效性,即可以保证对局部图像数据处理的实时性,从而可以提高业务系统的稳定性。
在一例中,步骤S206可以通过如下方式实现:
方式一:
步骤SA1:将全景图像数据放入第一缓冲队列;
步骤SA2:通过第二线程逐一从第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据;
步骤SA3:存储当前全景图像数据对应的全景图像,得到当前存储地址;
可以理解的是,当全景图像数据中包含的是全景图像时,在文件系统中存储当前全景图像数据包含的当前全景图像,得到当前全景图像数据对应的全景图像在文件系统中的当前存储地址;当全景图像数据中包含的是全景图像在第三方存储系统中的存储地址时,根据第三方存储系统中的存储地址获取当前全景图像,在文件系统中存储当前全景图像,得到当前全景图像数据对应的全景图像在文件系统中的当前存储地址。
步骤SA4:从图像解析单元获取所述解析结果列表;
步骤SA5:判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;
步骤SA6:若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
方式二:
步骤S B1:将所述全景图像数据放入第一缓冲队列;
步骤S B2:通过第二线程逐一从第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当 前全景图像数据;
步骤S B3:从图像解析单元获取所述解析结果列表;
步骤S B4:判断解析结果列表中是否存在与所述当前全景图像数据对应的目标解析结果;
步骤S B5:若存在,则存储所述当前全景图像数据,得到当前存储地址(具体步骤同SA3);将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中;若不存在,则将所述当前全景图像数据放入所述第一缓冲队列的队尾。
以上两种方式,在存储步骤中实现异步处理,存储步骤是资源占用较大的步骤,对存储步骤进行异步处理能够将更多资源用于处理局部图像数据。其中方式二在判断当前全景图像数据已经解析完毕后才对其进行存储。
以上两种方式也可以实施为:
在其中一个实施例中,通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中,可以包括:
通过第二线程逐一取出取出全景图像数据;
存储当前取出的全景图像数据对应的全景图像,得到当前存储地址;
从图像解析单元获取所述解析结果列表;
判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;
若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
在其中一个实施例中,通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中,可以包括:
通过第二线程逐一取出全景图像数据;
从图像解析单元获取所述解析结果列表;
判断所述解析结果列表中是否存在与当前取出的全景图像数据对应的目标解析结果;
若存在,则存储当前取出的全景图像数据对应的全景图像,得到当前存储地址;将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
在其中一个实施例中,在通过第二线程存储所述全景图像数据、得到与所述全景图像数据一一对应的存储地址、将所述存储地址更新到目标解析结果中之前,所述图像处理方法还可以包括:
将所述全景图像数据放入第一缓冲队列;
相应地,通过所述第二线程逐一取出全景图像数据可以包括:
通过所述第二线程从所述第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据。
在其中一个实施例中,在通过第二线程存储所述全景图像数据、得到与所述全景图像数据一一对应的存储地址、将所述存储地址更新到目标解析结果中之前,所述图像处理方法还可以包括:
将所述全景图像数据放入第一缓冲队列;
相应地,若所述解析结果列表中不存在与当前取出的所述全景图像数据对应的目标解析结 果,所述图像处理方法还包括:
将当前取出的所述全景图像数据放入所述第一缓冲队列的队尾。
方式三:
步骤S C1:通过第二线程逐一存储所述全景图像数据,得到存储地址(具体步骤同SA3);
步骤S C2:将所述存储地址放入第二缓冲队列;
步骤S C3:逐一从第二缓冲队列中取出存储地址,将取出的存储地址作为当前存储地址;
步骤S C4:从图像解析单元获取所述解析结果列表;
步骤S C5:判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;
步骤S C6:若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中;
若不存在,则将当前存储地址放入所述第二缓冲队列的队尾。
该方式中,在地址更新的步骤中实现异步处理。
针对不同性能的系统,方式一到方式三效率不同,可根据需要选择。
在一例中,图像处理方法还可以包括:
步骤S208:接收优先处理信息,所述优先处理信息可以包括优先全景图像ID和所述优先全景图像ID对应的解析结果。
图像解析单元针对局部图像数据进行解析,获得解析结果,之后可针对解析结果进行检索、分析。例如,解析结果可以包括目标的拍摄时间、拍摄地点。用户可在解析结果的拍摄时间字段中检索拍摄时间在t1-t2之间的解析结果,即可获得满足检索条件的解析结果所对应的局部图像数据。用户希望对某个局部图像数据对应的全景图像进行查看时,则需要拉取其对应的全景图像。
当用户希望对某解析结果对应的全景图像数据进行查看、且该解析结果中的全景图像数据地址不为空、无意义数或代表地址未更新的值时,说明该全景图像数据地址已经更新到解析结果中,此时可以按照解析结果中包含的全景图像数据地址从文件存储系统拉取对应的全景图像数据展示给用户。
当用户希望对某解析结果对应的全景图像数据进行查看、但该解析结果中的全景图像数据地址为空、无意义数或代表地址未更新的值时,说明该全景图像数据地址尚未更新到解析结果、仍在排队更新中,此时需要立即获取全景图像数据地址,才能保证及时将全景图像数据展示给用户。在这种情形下,图像解析单元会向数据接入处理设备发出发送优先处理信息,通知数据接入处理设备对该全景图像数据进行插队处理。
与方式一和方式二对应,数据接入处理设备通过方式四对该全景图像数据进行插队处理。
步骤S D1:通过第三线程根据优先全景图像ID,从第一缓冲队列中取出所述优先全景图像ID对应的优先全景图像数据;
步骤S D2:存储所述优先全景图像数据,得到优先存储地址(存储方式参见步骤SA3);
步骤S D3:将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
与方式三对应,数据接入处理设备通过方式五对该全景图像数据进行插队处理。
步骤S E1:通过第三线程根据优先全景图像ID,从第二缓冲队列中取出优先全景图像ID对应的优先 存储地址;
步骤S E2:将优先存储地址更新到优先全景图像ID对应的解析结果中。
方式五中,全景图像数据已存储完毕但未更新,此时只需要插队更新即可。
可以理解的是,数据接入处理设备将优先存储地址更新到优先全景图像ID对应的解析结果中后,可以将更新后的解析结果发送给图像解析单元,以使图像解析单元可根据解析结果中包括的优先存储地址获取全景图像展示给用户。
在另一个实施例中,提供了另一种图像处理方法,本实施例涉及的是如何对局部图像数据以及全景图像数据进行存储以及格式转换的具体过程。一例中,如图3所示,上述S204中的“通过第一线程实时处理所述多个局部图像数据”可以包括以下步骤:
S302,通过上述第一线程逐一存储上述多个局部图像数据,得到每个上述局部图像数据对应的第一存储地址。
在本步骤中,一般从图像数据源提供格式的图像数据中一般不能直接提取出图像或地址并存入文件存储系统,所以在存储各局部图像数据以及各全景图像数据之前,可以先对获取到的各局部图像数据以及各全景图像数据的数据格式进行格式转换,将各局部图像数据以及各全景图像数据的数据格式转换为扩展坞数据格式(记为Docking数据格式,即Docking Data格式)。
之后,可以通过第一线程将各个局部图像数据依次存储到文件存储系统上(具体步骤见步骤S A3),在存储好之后,文件存储系统可以为每个局部图像分配一个存储地址,记为第一存储地址,即每个存储好的局部图像数均会获得一个第一存储地址。
S304,对每个上述第一存储地址以及每个上述局部图像数据中包含的其他信息进行封装,得到各上述局部图像数据对应的局部图像封装数据。
这里的其他信息例如可以是局部图像ID、全景图像ID。这里得到局部图像封装数据可以记为Capture数据格式,即Captuer Data格式。
另一例中,上述S206中的“通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址”可以包括以下步骤:
步骤A1,通过上述第二线程逐一存储上述全景图像数据,得到每个上述全景图像数据对应的第二存储地址。
在本步骤中,与上述局部图像数据相同的,在存储前,可以对各全景图像数据的数据格式进行格式转换。
之后,可以通过第二线程将格式转换后的各个全景图像数据中获取全景图像或全景图像地址,并将全景图像依次存储到文件服务器上,在存储好之后,文件服务器可以为每个全景图像分配一个存储地址,记为第二存储地址,即每个存储好的全景图像均会获得一个第二存储地址。
步骤A2,对每个上述全景图像ID和对应的第二存储地址进行封装,得到各上述全景图像数据对应的全景图像封装数据。
在本步骤中,在对全景图像数据进行封装时,可以将每个全景图像ID和其对应的第二存储地址封 装在一起,得到每个全景图像数据对应的全景图像封装数据。
本实施例的图像处理方法,可以通过第一线程逐一存储各个局部图像数据,得到每个局部图像数据的第一存储地址,并对第一存储地址和局部图像数据中包含的其他信息(包括局部图像ID和其关联的全景图像ID)封装,得到各个局部图像封装数据。在本实施例中,由于可以对局部图像数据的存储地址以及局部图像ID和其关联的全景图像ID进行封装,这样可以便于后续图像处理时,快速通过存储地址以及全景图像ID找到全景图像ID对应的局部图像数据,提高数据查找的效率。
在又一个实施例中,提供了又一种图像处理方法,本实施例涉及的是如何获取多个局部图像数据和多个全景图像数据的具体过程。在上述实施例的基础上,如图4所示,上述S202可以包括以下步骤:
S402,通过数据接入处理服务从图像数据源获取多个局部图像数据。
S404,通过上述数据接入处理服务从上述图像数据源获取与上述多个局部图像数据对应的多个全景图像数据。
在S402至S404中,图像数据源(例如图像采集设备、存储图像、视频的数据库等)可以仅存在全景图像,也可以既存在包含人脸或其他目标的局部图像,也包含关注对象的局部图像所在的全景图像。在一例中,图像数据源可以仅存在全景图像、全景图像标识和全景图像拍摄的时间、地点信息,并将这些信息作为全景图像数据;之后对该全景图像进行人脸识别并进行人脸抠图,就可以得到局部图像,同时也可以为局部图像添加ID,并将局部图像及其ID、其所在全景图像的拍摄时间、地点等作为局部图像数据。然后第三方采集设备可以将该局部图像数据和全景图像数据发送至数据接入处理设备,数据接入处理设备就可以通过数据接入处理服务接收到该多个局部图像数据和多个全景图像数据并将其转换为图像解析单元所匹配的格式。
本实施例的图像处理方法,可以通过数据接入处理服务从图像数据源获取多个局部图像数据以及对应的多个全景图像数据,这样可以快速获取到局部图像数据以及全景图像数据,为后续图像处理提供数据源,同时提高后续业务的处理效率。
应该理解的是,虽然图2至图4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-4中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图5所示,提供了一种图像处理装置,该图像处理装置可以包括:获取模块10、第一处理模块11和第二处理模块12,其中:
获取模块10可以配置成用于获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据可以包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据可以包括全景图像ID;
第一处理模块11可以配置成用于通过第一线程实时处理所述多个局部图像数据,并将处理后的多 个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中可以包括与局部图像数据一一对应的解析结果,所述解析结果可以包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
第二处理模块12可以配置成:通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果可以为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
关于图像处理装置的具体限定可以参见上文中对于图像处理方法的限定,在此不再赘述。
在另一个实施例中,提供了另一种图像处理装置,在上述实施例的基础上,上述第一处理模块11具体可以用于通过第一线程对所述多个局部图像数据进行实时存储和/或进行格式转换。
在另一个实施例中,提供了另一种图像处理装置,在上述实施例的基础上,上述第二处理模块12可以包括第一放入单元、第一取出单元、第一存储单元、第一获取单元、第一判断单元和更新单元,其中:
第一放入单元可以配置成用于将所述全景图像数据放入第一缓冲队列;
第一取出单元可以配置成用于通过第二线程逐一从第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据;
第一存储单元可以配置成用于存储所述当前全景图像数据对应的全景图像,得到当前存储地址;
第一获取单元可以配置成用于从图像解析单元获取所述解析结果列表;
第一判断单元可以配置成用于判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;
更新单元可以配置成用于:若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
在另一个实施例中,提供了另一种图像处理装置,在上述实施例的基础上,上述第二处理模块12可以包括第二放入单元、第二取出单元、第二获取单元、第二判断单元和存储单元,其中:
第二放入单元可以配置成用于将所述全景图像数据放入第一缓冲队列;
第二取出单元可以配置成用于通过第二线程逐一从第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据;
第二获取单元可以配置成用于从图像解析单元获取所述解析结果列表;
第二判断单元可以配置成用于判断解析结果列表中是否存在与所述当前全景图像数据对应的目标解析结果;
存储放入单元可以配置成用于:若存在,则存储所述当前全景图像数据对应的全景图像,得到当前存储地址;将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中;若不存在,则将所述当前全景图像数据放入所述第一缓冲队列的队尾。
在另一个实施例中,提供了另一种图像处理装置,在上述实施例的基础上,上述第二处理模块12可以包括第三存储单元、第三放入单元、第三取出单元、第三获取单元、第三判断单元、更新放入单元, 其中:
第三存储单元可以配置成用于通过第二线程逐一存储所述全景图像数据对应的全景图像,得到存储地址;
第三放入单元可以配置成用于将所述存储地址放入第二缓冲队列;
第三取出单元可以配置成用于逐一从第二缓冲队列中取出存储地址,将取出的存储地址作为当前存储地址;
第三获取单元可以配置成用于从图像解析单元获取所述解析结果列表;
第三判断单元可以配置成用于判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;
更新放入单元可以配置成用于:若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中;若不存在,则将当前存储地址放入所述第二缓冲队列的队尾。
在另一个实施例中,提供了另一种图像处理装置,在上述实施例的基础上,上述装置还可以包括:第一接收模块、第一取出模块、存储模块和第一更新模块,其中:
第一接收模块可以配置成用于接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;
第一取出模块可以配置成用于通过第三线程根据所述优先全景图像ID,从第一缓冲队列中取出所述优先全景图像ID对应的优先全景图像数据;
存储模块可以配置成用于存储所述优先全景图像数据对应的全景图像,得到优先存储地址;
第一更新模块可以配置成用于将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
在另一个实施例中,提供了另一种图像处理装置,在上述实施例的基础上,上述装置还可以包括:第二接收模块、第二取出模块和第二更新模块,其中:
第二接收模块可以配置成用于接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;
第二取出模块可以配置成用于通过第三线程根据所述优先全景图像ID,从第二缓冲队列中取出所述优先全景图像ID对应的优先存储地址;
第二更新模块可以配置成用于将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
在另一个实施例中,提供了另一种图像处理装置,在上述实施例的基础上,上述获取模块10可以包括局部获取单元和全局获取单元,其中:
局部获取单元可以配置成用于通过数据接入处理服务从图像数据源获取多个局部图像数据;
全局获取单元可以配置成用于通过所述数据接入处理服务从所述图像数据源获取与所述局部图像数据对应的全景图像数据。
关于图像处理装置的具体限定可以参见上文中对于图像处理方法的限定,在此不再赘述。上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器 调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种电子设备,该电子设备可以是计算机设备,例如终端,可以是数据接入处理设备的一部分或直接作为数据接入处理设备,其内部结构图可以如图6所示。计算机设备可以包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器可以用于提供计算和控制能力。该计算机设备的存储器可以包括非易失性存储介质、内存储器。该非易失性存储介质可以存储有操作系统和计算机程序。该内存储器可以为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口可以用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时可以实现一种图像处理方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图6中示出的结构仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一种电子设备,该电子设备可以包括存储器和处理器,存储器中可以存储有计算机程序,该处理器执行计算机程序时可以实现以下步骤:
获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;异步处理所述全景图像数据,包括:通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
在一个实施例中,处理器执行计算机程序时还可以实现以下步骤:
通过第一线程对所述多个局部图像数据进行实时存储和/或进行格式转换。
在一个实施例中,处理器执行计算机程序时还可以实现以下步骤:
将所述全景图像数据放入第一缓冲队列;通过第二线程逐一从第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据;存储所述当前全景图像数据对应的全景图像,得到当前存储地址;从图像解析单元获取所述解析结果列表;判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
在一个实施例中,处理器执行计算机程序时还可以实现以下步骤:
将所述全景图像数据放入第一缓冲队列;通过第二线程逐一从第一缓冲队列中取出全景图像数据, 将取出的全景图像数据作为当前全景图像数据;从图像解析单元获取所述解析结果列表;判断解析结果列表中是否存在与所述当前全景图像数据对应的目标解析结果;若存在,则存储所述当前全景图像数据对应的全景图像,得到当前存储地址;将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中;若不存在,则将所述当前全景图像数据放入所述第一缓冲队列的队尾。
在一个实施例中,处理器执行计算机程序时还可以实现以下步骤:
通过第二线程逐一存储所述全景图像数据对应的全景图像,得到存储地址;将所述存储地址放入第二缓冲队列;逐一从第二缓冲队列中取出存储地址,将取出的存储地址作为当前存储地址;从图像解析单元获取所述解析结果列表;判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中;若不存在,则将当前存储地址放入所述第二缓冲队列的队尾。
在一个实施例中,处理器执行计算机程序时还可以实现以下步骤:
接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;通过第三线程根据所述优先全景图像ID,从第一缓冲队列中取出所述优先全景图像ID对应的优先全景图像数据;存储所述优先全景图像数据对应的全景图像,得到优先存储地址;将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
在一个实施例中,处理器执行计算机程序时还可以实现以下步骤:
接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;通过第三线程根据所述优先全景图像ID,从第二缓冲队列中取出所述优先全景图像ID对应的优先存储地址;将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
在一个实施例中,处理器执行计算机程序时还可以实现以下步骤:
通过数据接入处理服务从图像数据源获取多个局部图像数据;通过所述数据接入处理服务从所述图像数据源获取与所述局部图像数据对应的全景图像数据。
在一个实施例中,提供了一种计算机可读存储介质,该计算机可读存储介质上可以存储有计算机程序,计算机程序被处理器执行时可以实现以下步骤:
获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;异步处理所述全景图像数据,包括:通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
在一个实施例中,计算机程序被处理器执行时还可以实现以下步骤:
通过第一线程对所述多个局部图像数据进行实时存储和/或进行格式转换。
在一个实施例中,计算机程序被处理器执行时还可以实现以下步骤:
将所述全景图像数据放入第一缓冲队列;通过第二线程逐一从第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据;存储所述当前全景图像数据对应的全景图像,得到当前存储地址;从图像解析单元获取所述解析结果列表;判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
在一个实施例中,计算机程序被处理器执行时还可以实现以下步骤:
将所述全景图像数据放入第一缓冲队列;通过第二线程逐一从第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据;从图像解析单元获取所述解析结果列表;判断解析结果列表中是否存在与所述当前全景图像数据对应的目标解析结果;若存在,则存储所述当前全景图像数据对应的全景图像,得到当前存储地址;将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中;若不存在,则将所述当前全景图像数据放入所述第一缓冲队列的队尾。
在一个实施例中,计算机程序被处理器执行时还可以实现以下步骤:
通过第二线程逐一存储所述全景图像数据对应的全景图像,得到存储地址;将所述存储地址放入第二缓冲队列;逐一从第二缓冲队列中取出存储地址,将取出的存储地址作为当前存储地址;从图像解析单元获取所述解析结果列表;判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中;若不存在,则将当前存储地址放入所述第二缓冲队列的队尾。
在一个实施例中,计算机程序被处理器执行时还可以实现以下步骤:
接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;通过第三线程根据所述优先全景图像ID,从第一缓冲队列中取出所述优先全景图像ID对应的优先全景图像数据;存储所述优先全景图像数据对应的全景图像,得到优先存储地址;将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
在一个实施例中,计算机程序被处理器执行时还可以实现以下步骤:
接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;通过第三线程根据所述优先全景图像ID,从第二缓冲队列中取出所述优先全景图像ID对应的优先存储地址;将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
在一个实施例中,计算机程序被处理器执行时还可以实现以下步骤:
通过数据接入处理服务从图像数据源获取多个局部图像数据;通过所述数据接入处理服务从所述图像数据源获取与所述局部图像数据对应的全景图像数据。
在一个实施例中,提供了一种计算机程序,所述计算机程序可以包括计算机可读代码,当所述计算机可读代码在计算处理设备上运行时,所述计算处理设备可以执行以下步骤:
获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;
通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。
工业实用性
本申请公开了一种图像处理方法、图像处理装置、电子设备、存储介质和计算机程序产品。图像处理方法包括:获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID;通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;异步处理所述全景图像数据,包括:通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中。采用本方法能够提高局部图像处理的实时性。
此外,可以理解的是,本申请的图像处理方法、图像处理装置、电子设备、存储介质和计算机程序产品是可以重现的,并且可以应用在多种工业应用中。例如,本申请的图像处理方法可以应用于数据处理技术领域。

Claims (14)

  1. 一种图像处理方法,其特征在于,所述图像处理方法包括:
    获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,每个所述局部图像数据包含与该局部图像对应的全景图像的全景图像ID,每个所述全景图像数据包括全景图像ID;
    通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
    通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
  2. 根据权利要求1所述的图像处理方法,其特征在于,所述通过第一线程实时处理所述多个局部图像数据包括:通过第一线程对所述多个局部图像数据进行实时存储和/或进行格式转换。
  3. 根据权利要求1或2所述的图像处理方法,其特征在于,通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中,包括:
    通过第二线程逐一取出全景图像数据;
    存储当前取出的全景图像数据对应的全景图像,得到当前存储地址;
    从图像解析单元获取所述解析结果列表;
    判断所述解析结果列表中是否存在与所述当前存储地址对应的目标解析结果;
    若存在,则将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
  4. 根据权利要求1或2所述的图像处理方法,其特征在于,通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中,包括:
    通过第二线程逐一取出全景图像数据;
    从图像解析单元获取所述解析结果列表;
    判断所述解析结果列表中是否存在与当前取出的全景图像数据对应的目标解析结果;
    若存在,则存储当前取出的全景图像数据对应的全景图像,得到当前存储地址;将所述当前存储地址更新到与所述当前存储地址对应的目标解析结果中。
  5. 根据权利要求3或4所述的图像处理方法,其特征在于,在通过第二线程存储所述全景图像数据、得到与所述全景图像数据一一对应的存储地址、将所述存储地址更新到目标解析结果中之前,所述图像处理方法还包括:
    将所述全景图像数据放入第一缓冲队列;
    相应地,通过所述第二线程逐一取出全景图像数据包括:
    通过所述第二线程从所述第一缓冲队列中取出全景图像数据,将取出的全景图像数据作为当前全景图像数据。
  6. 根据权利要求4所述的图像处理方法,其特征在于,在通过第二线程存储所述全景图像数据、得到与所述全景图像数据一一对应的存储地址、将所述存储地址更新到目标解析结果中之前,所述图像处理方法还包括:
    将所述全景图像数据放入第一缓冲队列;
    相应地,若所述解析结果列表中不存在与当前取出的所述全景图像数据对应的目标解析结果,所述图像处理方法还包括:
    将当前取出的所述全景图像数据放入所述第一缓冲队列的队尾。
  7. 根据权利要求1或2所述的图像处理方法,其特征在于,通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中,包括:
    通过第二线程逐一存储所述全景图像数据对应的全景图像,得到存储地址;
    将所述存储地址放入第二缓冲队列;
    逐一从所述第二缓冲队列中取出存储地址;
    从图像解析单元获取所述解析结果列表;
    判断解析结果列表中是否存在与当前取出的存储地址对应的目标解析结果;
    若存在,则将当前取出的所述存储地址更新到与当前取出的所述存储地址对应的目标解析结果中;
    若不存在,则将当前取出的所述存储地址放入所述第二缓冲队列的队尾。
  8. 根据权利要求3至6中的任一项所述的图像处理方法,其特征在于,所述图像处理方法还包括:
    接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;
    通过第三线程根据所述优先全景图像ID,取出所述优先全景图像ID对应的优先全景图像数据;
    存储所述优先全景图像数据对应的全景图像,得到优先存储地址;
    将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
  9. 根据权利要求7所述的图像处理方法,其特征在于,所述图像处理方法还包括:
    接收优先处理信息,所述优先处理信息包括优先全景图像ID和所述优先全景图像ID对应的解析结果;
    通过第三线程根据所述优先全景图像ID,从所述第二缓冲队列中取出所述优先全景图像ID对应的优先存储地址;
    将所述优先存储地址更新到所述优先全景图像ID对应的解析结果中。
  10. 根据权利要求1至9中的任一项所述的图像处理方法,其特征在于,所述获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据包括:
    通过数据接入处理服务从图像数据源获取多个局部图像数据;
    通过所述数据接入处理服务从所述图像数据源获取与所述多个局部图像数据对应的全景图像数据。
  11. 一种图像处理装置,其特征在于,所述图像处理装置包括:
    获取模块,所述获取模块配置成用于获取多个局部图像数据以及每个所述局部图像数据所对应的全景图像数据;其中,所述多个局部图像数据中的每个局部图像数据包含与该局部图像对应的全景图像的全景图像ID,所述全景图像数据中的每个全景图像数据包括全景图像ID;
    第一处理模块,所述第一处理模块配置成用于通过第一线程实时处理所述多个局部图像数据,并将处理后的多个局部图像数据发送至图像解析单元,以使图像解析单元对处理后的多个局部图像数据进行解析得到解析结果列表;其中,所述解析结果列表中包括与局部图像数据一一对应的解析结果,所述解析结果包含与其对应的局部图像数据所对应的全景图像数据的全景图像ID;
    第二处理模块,第二处理模块配置成:通过第二线程存储所述全景图像数据,得到与所述全景图像数据一一对应的存储地址,将所述存储地址更新到目标解析结果中;所述目标解析结果为包含所述存储地址所对应的全景图像数据的全景图像ID的解析结果。
  12. 一种电子设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现根据权利要求1至10中的任一项所述的图像处理方法的步骤。
  13. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现根据权利要求1至10中的任一项所述的图像处理方法的步骤。
  14. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序,当所述计算机程序被处理器执行时实现根据权利要求1至10中的任一项所述的图像处理方法的步骤。
PCT/CN2021/133248 2021-01-19 2021-11-25 图像处理方法、图像处理装置、电子设备和存储介质 WO2022156355A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110069556.6A CN112819683B (zh) 2021-01-19 2021-01-19 图像处理方法、装置、计算机设备和存储介质
CN202110069556.6 2021-01-19

Publications (1)

Publication Number Publication Date
WO2022156355A1 true WO2022156355A1 (zh) 2022-07-28

Family

ID=75870094

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/133248 WO2022156355A1 (zh) 2021-01-19 2021-11-25 图像处理方法、图像处理装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN112819683B (zh)
WO (1) WO2022156355A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112819683B (zh) * 2021-01-19 2023-05-26 北京格视科技有限公司 图像处理方法、装置、计算机设备和存储介质
CN113806577A (zh) * 2021-08-24 2021-12-17 浙江大华技术股份有限公司 一种图像搜索方法、装置、存储介质和电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070073900A1 (en) * 2005-09-29 2007-03-29 Electronics And Telecommunications Research Institute Parsing apparatus and method for shortening download time delay of data broadcasting application
CN110719332A (zh) * 2019-10-17 2020-01-21 北京旷视科技有限公司 数据传输方法、装置、系统、计算机设备和存储介质
CN111753743A (zh) * 2020-06-28 2020-10-09 武汉虹信技术服务有限责任公司 一种基于网闸的人脸识别方法及系统
CN112819683A (zh) * 2021-01-19 2021-05-18 武汉旷视金智科技有限公司 图像处理方法、装置、计算机设备和存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108111749B (zh) * 2017-12-06 2020-02-14 Oppo广东移动通信有限公司 图像处理方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070073900A1 (en) * 2005-09-29 2007-03-29 Electronics And Telecommunications Research Institute Parsing apparatus and method for shortening download time delay of data broadcasting application
CN110719332A (zh) * 2019-10-17 2020-01-21 北京旷视科技有限公司 数据传输方法、装置、系统、计算机设备和存储介质
CN111753743A (zh) * 2020-06-28 2020-10-09 武汉虹信技术服务有限责任公司 一种基于网闸的人脸识别方法及系统
CN112819683A (zh) * 2021-01-19 2021-05-18 武汉旷视金智科技有限公司 图像处理方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN112819683A (zh) 2021-05-18
CN112819683B (zh) 2023-05-26

Similar Documents

Publication Publication Date Title
WO2022156355A1 (zh) 图像处理方法、图像处理装置、电子设备和存储介质
CN109168026B (zh) 即时视频显示方法、装置、终端设备及存储介质
WO2017156793A1 (zh) 基于地理位置的视频处理方法
CN106302996B (zh) 消息显示方法及装置
CN111273999B (zh) 数据处理方法、装置、电子设备及存储介质
US11928152B2 (en) Search result display method, readable medium, and terminal device
WO2022042609A1 (zh) 提取热词的方法、装置、电子设备及介质
WO2020124966A1 (zh) 节目搜索方法、装置、设备及介质
WO2021115348A1 (zh) 提供预览功能的云存储系统及预览方法、装置
JP2023528398A (ja) ライブ配信ルームの作成方法、装置、電子機器及び記憶媒体
CN111694866A (zh) 数据搜索及存储方法、数据搜索系统、装置、设备及介质
WO2021196551A1 (zh) 图像检索方法、装置、计算机设备和存储介质
WO2020044094A1 (zh) 资源推荐方法、装置、电子设备以及计算机可读介质
CN112039936B (zh) 数据传输方法、第一数据处理设备及监控系统
US9282331B2 (en) Image processing method and electronic device
CN114584808B (zh) 一种视频流获取方法、装置、系统、设备和介质
WO2019085591A1 (zh) 智能硬件设备、磁盘数据智能处理方法和存储介质
CN112016280B (zh) 一种文件编辑方法、装置及计算机可读介质
CN113014986A (zh) 互动信息处理方法、装置、设备及介质
CN112351420A (zh) 终端设备的组网身份创建方法、设备及可读存储介质
US11250267B2 (en) Method and apparatus for processing information associated with video, electronic device, and storage medium
CN110175256B (zh) 一种图像数据检索方法、装置、设备和存储介质
US20240089560A1 (en) Video generation method, apparatus, electronic device and storage medium
WO2023125163A1 (zh) 一种图像特效处理方法、装置、设备及介质
CN112291209B (zh) 一种前端设备目录获取方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21920731

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21920731

Country of ref document: EP

Kind code of ref document: A1