Picture display method and apparatus
By cropping and scoring the original images of points of interest in multiple dimensions, the problem of information loss in image display is solved, achieving more accurate and comprehensive information delivery and improving user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2022-08-24
- Publication Date
- 2026-07-24
AI Technical Summary
In the process of image display, how to accurately select images to convey more accurate and comprehensive information, and avoid information loss due to cropping.
For each point of interest, several original images are acquired, cropped according to various image specifications, and the point of interest information is preserved through saliency detection and text recognition technologies. A cropping score is determined, and the target cropped image that meets the expectations is selected for display.
Ensure the integrity and quality of cropped image information, improve the accuracy of image display, and enhance the user's browsing experience.
Smart Images

Figure CN115457560B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of image processing technology, and in particular to a method and apparatus for displaying images. Background Technology
[0002] Images, as a means of information dissemination, are widely used in displaying information in many scenarios, including products, locations, culture, and technology. Images can provide users with rich and realistic information. Therefore, how to accurately select images to deliver more accurate and comprehensive information to users has become a pressing technical problem to be solved. Summary of the Invention
[0003] In view of this, this specification provides a method and apparatus for displaying images.
[0004] Specifically, this specification is implemented through the following technical solution:
[0005] A method for displaying images, comprising:
[0006] For each point of interest, obtain several original images corresponding to that point of interest;
[0007] With the goal of retaining the most point of interest information, each original image is cropped according to various image specifications to obtain several cropped images corresponding to each image specification;
[0008] For each image specification, determine the cropping score for each cropped image corresponding to that image specification;
[0009] Based on the cropping score, a target cropping image whose cropping effect meets expectations is determined from several cropped images corresponding to the image specifications.
[0010] In response to an image display request for the point of interest, based on the image specifications specified in the image display request, a target cropped image corresponding to the specified image specifications is determined and transmitted to the client for display.
[0011] Optionally, the step of cropping each original image according to various image specifications, with the goal of retaining the most point-of-interest information, includes:
[0012] For each original image, a saliency detection is performed on the original image to obtain the original saliency feature map of the original image;
[0013] Identify the text regions in the original image that are related to the point of interest;
[0014] The text regions in the original saliency feature map are marked with saliency to obtain a new saliency feature map;
[0015] According to various image specifications, a salient region search is performed in the new salient feature map to determine the salient region corresponding to each image specification;
[0016] The original image is cropped based on the salient region to obtain cropped images corresponding to each image size.
[0017] Optionally, identifying the text region in the original image related to the point of interest includes:
[0018] The text contained in the image was identified using OCR technology;
[0019] For each identified text segment, determine the similarity between the text and the point of interest;
[0020] The text regions containing texts whose similarity meets the relevance requirements are identified as text regions related to the points of interest.
[0021] Optionally, the step of saliency annotation of the text region in the original saliency feature map includes:
[0022] The pixel values of the pixels located in the text region in the original saliency feature map are modified to preset saliency pixel values to achieve saliency annotation.
[0023] Optionally, the step of searching for salient regions in the new salient feature map according to various image specifications to determine the salient region corresponding to each image specification includes:
[0024] For each image specification, determine the search box size and search step size based on the image specifications;
[0025] Starting from the initial position of the new saliency feature map after saliency annotation, the new saliency feature map is traversed based on the search box size and search step size to obtain several saliency sub-maps;
[0026] Determine the significance factor of each significance subplot;
[0027] The region to which the salient subgraph corresponding to the largest subgraph salient factor belongs is determined as the salient region corresponding to the image specification.
[0028] Optionally, before cropping the original image based on the salient region, the method further includes:
[0029] Determine the default cropping area obtained after cropping the original image using the default cropping method;
[0030] Determine the default saliency factor for the default clipping region;
[0031] Determine whether the difference between the default significance factor and the maximum subplot significance factor is less than or equal to a difference threshold;
[0032] If the difference between the default significance factor and the maximum subgraph significance factor is less than or equal to the difference threshold, then the original image is cropped based on the default cropping method;
[0033] If the difference between the default saliency factor and the maximum subgraph saliency factor is greater than the difference threshold, then the step of cropping the original image based on the saliency region is performed.
[0034] Optional, where the saliency factor is the pixel value and value of each pixel in the corresponding region.
[0035] Optionally, before cropping the original image based on the salient region, the method further includes:
[0036] Determine the main subject region in the original image;
[0037] Determine whether the main body region is located at the edge of the salient region;
[0038] When the main body region is located at the edge of the salient region, the position of the salient region is adjusted so that the main body region moves closer to the center of the salient region.
[0039] Optionally, determining the cropping score for each cropped image corresponding to the image specifications includes:
[0040] For each cropped image, a machine learning model is used to predict the quality score and content category probability of the cropped image.
[0041] Calculate the saliency percentage of the cropped image;
[0042] The cropping score of the cropped image is determined based on the quality score, the content category probability, and the salience percentage.
[0043] A method for displaying images, comprising:
[0044] Receive image display requests from users and determine the image specifications of the images to be displayed;
[0045] Obtain the target cropped image that matches the specified image specifications from the server;
[0046] The target cropped image is displayed, wherein the target cropped image is cropped based on the aforementioned method.
[0047] A picture display device, comprising:
[0048] The image acquisition unit acquires several original images corresponding to each point of interest.
[0049] The image cropping unit aims to retain the most point of interest information and crops each original image according to various image specifications to obtain several cropped images corresponding to each image specification.
[0050] The cropping scoring unit determines the cropping score for each cropped image corresponding to each image specification for each image specification.
[0051] The target determination unit determines, based on the cropping score, a target cropping image whose cropping effect meets expectations from among several cropped images corresponding to the image specifications;
[0052] The image display unit, in response to an image display request for the point of interest, determines a target cropped image corresponding to the specified image specifications based on the image specifications specified in the image display request, and transmits it to the client for display.
[0053] An electronic device, comprising:
[0054] processor;
[0055] Memory used to store processor-executable instructions;
[0056] The processor implements the aforementioned method by running the executable instructions.
[0057] A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the aforementioned method.
[0058] A computer program product, when executed by a processor, implements the aforementioned method.
[0059] Using the above implementation method, for each point of interest, each original image corresponding to that point of interest can be cropped according to the image specifications with the goal of retaining the most point of interest information, to obtain cropped images corresponding to each image specification. Then, for each image specification, each cropped image can be scored, and the target cropped image that meets the expected cropping effect can be determined based on the cropping score of the cropped image for subsequent display.
[0060] By adopting the image display scheme provided in this manual, the original image is first cropped with the goal of retaining the most points of interest information. This can greatly avoid information loss caused by image cropping and ensure the integrity of the cropped image information. Then, the cropped image is scored to determine the target cropped image for display. This ensures the quality and relevance of the target cropped image, improves the accuracy of subsequent image display, and can convey more accurate and comprehensive information to users, thereby enhancing the user's image browsing experience. Attached Figure Description
[0061] Figure 1 This is a flowchart illustrating an exemplary embodiment of an image display method as shown in this specification.
[0062] Figure 2 This is a flowchart illustrating an exemplary embodiment of an image cropping method described in this specification.
[0063] Figure 3 This is a flowchart illustrating an exemplary embodiment of a salient region search method.
[0064] Figure 4 This is a schematic diagram illustrating a subject region edge detection according to an exemplary embodiment of this specification.
[0065] Figure 5 This is a flowchart illustrating an exemplary embodiment of the present specification of a method for determining a cropping score for a cropped image.
[0066] Figure 6 This is a flowchart illustrating another method for displaying images, as shown in an exemplary embodiment of this specification.
[0067] Figure 7 This is a hardware structure diagram of an electronic device containing an image display device, as illustrated in an exemplary embodiment of this specification.
[0068] Figure 8 This is a block diagram illustrating an exemplary embodiment of the present specification, showing a picture display device. Detailed Implementation
[0069] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0070] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0071] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0072] Images, as a means of information dissemination, are widely used in displaying information in many scenarios, including products, locations, culture, and technology. Images can provide users with rich and realistic information. Therefore, how to accurately select images to deliver more accurate and comprehensive information to users has become a pressing technical problem to be solved.
[0073] This specification provides an image display method. For each point of interest, the original image can be cropped with the maximum retention of point of interest information as the target. The target cropped image corresponding to the point of interest can be determined based on the cropping score of the cropped images after cropping different original images, thereby selecting a more accurate image for display and improving the accuracy of image display.
[0074] Figure 1 This is a flowchart illustrating an exemplary embodiment of an image display method as shown in this specification.
[0075] Please refer to Figure 1 The image display method can be applied to the server side and includes the following steps:
[0076] Step 102: For each point of interest, obtain several original images corresponding to that point of interest.
[0077] In this specification, the original images can be uploaded by the user. Taking electronic map software as an example, for each point of interest (POI), the user can upload relevant images of that POI. The images uploaded by the user vary in size and quality and need to be cropped before they can be used.
[0078] For example, suppose a POI is restaurant A. The staff of restaurant A can upload pictures of the restaurant's storefront, dishes, etc. Then, when users view restaurant A, electronic map software can display these pictures of restaurant A so that users can intuitively understand the relevant information about restaurant A.
[0079] In this specification, the original images can also be obtained by searching the Internet. Taking restaurant A as an example, different images of restaurant A can be searched on the Internet as original images. These original images often have different sizes and qualities and need to be cropped before they can be used.
[0080] Of course, the above scenarios are merely illustrative examples, and this manual does not limit the application scenarios of the image display solution or the application software.
[0081] In this manual, for each point of interest, multiple original images corresponding to that point of interest can often be obtained.
[0082] Step 104: With the goal of retaining the most point of interest information, crop each original image according to various image specifications to obtain several cropped images corresponding to each image specification.
[0083] In this manual, even for the same point of interest, the required image specifications will often differ when displaying images, and multiple image specifications are generally preset. For example, on the point of interest list page, the image specifications for each point of interest are often smaller, while on the point of interest details page, the image specifications for each point of interest are often larger.
[0084] In this specification, for each point of interest and each image specification, each original image is cropped with the goal of retaining the maximum amount of point of interest information, resulting in a cropped image corresponding to the original image and image specification.
[0085]
[0086] Table 1
[0087] Please refer to the example in Table 1. Taking Restaurant A (Point of Interest) as an example, Table 1 shows two original images of Restaurant A. For each original image, it is cropped according to specifications 1-3 with the goal of retaining the most information about Restaurant A, resulting in corresponding cropped images. Taking original image 1 as an example, we can obtain cropped image 1-1 corresponding to image specification 1, cropped image 1-2 corresponding to image specification 2, and cropped image 1-3 corresponding to image specification 3.
[0088] In this specification, saliency detection and text recognition technologies can be combined to crop the original image in order to preserve the point of interest information to the greatest extent. The specific cropping process will be described in detail in subsequent embodiments.
[0089] Step 106: For each image specification, determine the cropping score of each cropped image corresponding to that image specification.
[0090] Based on the aforementioned step 104, after obtaining cropped images from different original images corresponding to each image specification, each cropped image can be scored to obtain the corresponding cropping score.
[0091] Taking Restaurant A (Point of Interest) in Table 1 as an example, for image specification 1, there are two cropped images: Cropped Image 1-1 and Cropped Image 2-1. In this step, we need to score these two cropped images separately to obtain the corresponding cropping scores. Other image specifications are similar and will not be described in detail here.
[0092] The scoring process for cropped images will be described in detail in subsequent embodiments.
[0093] Step 108: Based on the cropping score, determine the target cropping image whose cropping effect meets expectations from among several cropped images corresponding to the image specifications.
[0094] Based on the aforementioned step 106, after obtaining the cropping score for each cropped image, a target cropped image whose cropping effect meets expectations can be determined. The expected cropping effect can be preset, and meeting expectations can result in the highest cropping score.
[0095]
[0096] Table 2
[0097] Taking Restaurant A in Table 1 as an example, in this step, the target cropped image corresponding to image specification 1 is determined to be cropped image 1-1 from the original image 1, the target cropped image corresponding to image specification 2 is cropped image 1-2 from the original image 1, and the target cropped image corresponding to image specification 3 is cropped image 2-3 from the original image 2.
[0098] Step 110: In response to the image display request for the point of interest, determine the target cropped image corresponding to the specified image specifications based on the image specifications specified in the image display request, and transmit it to the client for display.
[0099] In this specification, users can initiate a viewing request for a point of interest through the client. After receiving the viewing request, the client can determine the image specifications of the image of the point of interest to be displayed, and then send an image display request for the point of interest to the server. The image specifications can be carried in the image display request, and the image specifications are usually preset in the client.
[0100] In this specification, after receiving the image display request sent by the client, the server can determine the target cropped image corresponding to the point of interest according to the image specifications, and return the target cropped image to the client for display to the user.
[0101] The processing and implementation of this part can be found in relevant technologies, and will not be elaborated on in this manual.
[0102] As can be seen from the above description, this manual can crop each original image corresponding to a point of interest according to the image specifications, with the goal of retaining the most point of interest information, to obtain cropped images corresponding to each image specification. Then, for each image specification, each cropped image can be scored, and the target cropped image that meets the expected cropping effect can be determined based on the cropping score for subsequent display.
[0103] By adopting the image display scheme provided in this manual, the original image is first cropped with the goal of retaining the most points of interest information. This can greatly avoid information loss caused by image cropping and ensure the integrity of the cropped image information. Then, the cropped image is scored to determine the target cropped image for display. This ensures the quality and relevance of the target cropped image, improves the accuracy of subsequent image display, and delivers more accurate and comprehensive information to users, thereby enhancing the user's image browsing experience.
[0104] The image display method provided in this manual will be described in detail below with reference to specific embodiments, focusing on image cropping and scoring.
[0105] I. Image Cropping
[0106] Please refer to Figure 2 The process of cropping the original image with the goal of retaining the most point of interest information, as described in this manual, may include the following steps:
[0107] Step 202: For each original image, perform saliency detection on the original image to obtain the original saliency feature map of the original image.
[0108] In this specification, for each original image corresponding to a certain point of interest, a saliency detection can be performed on the original image to obtain a saliency feature map corresponding to the original image. For ease of distinction, this saliency feature map can be referred to as the original saliency feature map.
[0109] The original image can be saliency detected using models such as PiCANet (Pixel-wise Contextual Attention network) and BASNet (Boundary-Aware Salient Object Detection).
[0110] The original saliency feature map is a grayscale image that can distinguish saliency regions from non-saliency regions by the pixel values of each pixel. The pixel value of each pixel in the original saliency feature map ranges from 0 to 255. The larger the pixel value, the higher its saliency, and the smaller the pixel value, the lower its saliency.
[0111] Step 204: Identify the text regions in the original image that are related to the points of interest.
[0112] In this specification, for the original image, OCR (Optical Character Recognition) technology can be used to identify the text segments included in the image, as well as the regions where each text segment is located. Then, the text similarity between each text segment and the corresponding point of interest in the original image can be determined, and the regions where the text similarity meets the relevance requirements can be identified as text regions related to the point of interest.
[0113] The relevance requirement can be preset, and can be a similarity greater than a similarity threshold, such as a similarity greater than 80%. Algorithms used to calculate text similarity may include: cosine similarity algorithm, edit distance algorithm, Euclidean algorithm, etc.
[0114] For example, suppose OCR technology identifies two text segments in an original image: "Restaurant A West Lake Branch" and "47 Hupao Road". The point of interest (POI) corresponding to the original image is Restaurant A. Through similarity calculation and relevance assessment, it can be determined that the similarity between the text "Restaurant A West Lake Branch" and the POI "Restaurant A" meets the relevance requirement. Therefore, the area containing the text "Restaurant A West Lake Branch" can be identified as the text region related to the POI.
[0115] In this specification, the text region related to the corresponding point of interest identified from the original image may be one, multiple, or none at all, meaning that a text region related to the corresponding point of interest cannot be identified from the original image. Examples include the original image not containing any text, or the text segments in the original image having low similarity to their corresponding points of interest. For these original images where no text region related to the corresponding point of interest can be identified, the subsequent steps in this specification are unnecessary; the cropping methods provided in related technologies can be used to crop them.
[0116] Step 206: Perform saliency annotation on the text region in the original saliency feature map to obtain a new saliency feature map.
[0117] In this specification, the text regions identified in step 204 often reflect the points of interest information carried by the original image, such as "Restaurant A West Lake Branch," which can represent the restaurant name. Since the original saliency feature map cannot reflect the saliency of the text information in the image, this step can integrate the text information in the original image into the original saliency feature map. The resulting new saliency feature map can reflect both the original saliency features of the original image and the text features of the original image.
[0118] In this specification, the text region in the original saliency feature map can be marked with saliency, thereby updating the original saliency feature map and obtaining a new saliency feature map. Since the pixel value in the saliency feature map can reflect the saliency of the corresponding pixel, this step can achieve saliency marking by modifying the pixel value of each pixel in the text region identified in step 204. For example, the pixel value of each pixel in the text region in the original saliency feature map can be modified to a preset saliency pixel value to achieve saliency marking. The saliency pixel value can be a maximum pixel value of 255, or a relatively large pixel value such as 150, 160, or 180.
[0119] Step 208: Perform a salient region search on the new salient feature map according to various image specifications to determine the salient region corresponding to each image specification.
[0120] In this specification, the salient regions of the original image can be determined based on the new salient feature map obtained after salient annotation in step 206. Since there are multiple preset image specifications, this step can determine a corresponding salient region for each image specification.
[0121] In this specification, the size of the search box used for salient region search can be determined first. Then, based on the search box size, a sub-image matching the search box size is searched in the new salient feature map. The salientity of each sub-image is then determined, and the sub-image with the highest salientity is found. The region where the sub-image with the highest salientity is located is determined as the salient region of the original image.
[0122] The search box size can be calculated based on the size of the original image and various preset image specifications. For each image specification, the corresponding search box size can be calculated. Subsequent searches based on the search box size can obtain the salient region corresponding to that image specification.
[0123] In one example, all subgraphs in the new salient feature map that match the search box size can be found by traversing each pixel.
[0124] In another example, when the original image is large, the computational cost of searching for subgraphs by traversing pixels as described above is high. In this case, the search step size can be determined based on the size of the original image, and then the subgraph search can be performed based on the search box size and the search step size.
[0125] The method for determining the salient region in this step will be discussed later. Figure 3 The embodiments shown are described in detail.
[0126] Step 210: Crop the original image based on the salient region to obtain cropped images corresponding to each image size.
[0127] In this specification, after determining the salient region of the original image corresponding to each image size, the original image can be cropped based on the salient region. For example, the salient region can be cropped from the original image to obtain a cropped image corresponding to each image size for use in subsequent scenarios.
[0128] As described above, this specification can, on the one hand, perform saliency detection on the original image to obtain the original saliency feature map of the original image; on the other hand, it can also identify text regions related to their corresponding points of interest from the original image. Then, it can perform saliency annotation on the text regions in the original saliency feature map to fuse the text expressing point of interest information into the original saliency feature map, obtaining a new saliency feature map. Next, it performs a saliency region search in the new saliency feature map and crops the original image based on the searched saliency regions.
[0129] By using the image cropping scheme provided in this specification, salient regions can be searched and cropped in a new salient feature map that integrates image and text information. This greatly avoids the loss of point of interest information caused by image cropping, thereby ensuring the integrity of the image information after cropping and improving the accuracy of image cropping.
[0130] Figure 3 This is a flowchart illustrating an exemplary embodiment of a salient region search method.
[0131] Please refer to Figure 3 The search method for salient regions may include the following steps:
[0132] Step 302: Determine the search box size and search step size based on the dimensions of the original image.
[0133] In this embodiment, the search box size and search step size for saliency search can be calculated first based on preset image specifications. The preset image specifications can be the aspect ratio of the cropped image (hereinafter referred to as the cropped image), such as 2:1, 3:2, etc., and can be preset according to the application scenario of the cropped image.
[0134] In this specification, when calculating the search box size, the quotient of the original image's height and the aforementioned preset aspect ratio can be compared with the width of the original image; that is, the comparison can be made between H / ratio and W. Here, H represents the height of the original image, W represents the width of the original image, and ratio represents the preset aspect ratio.
[0135] If H / ratio ≤ W, then SearchW = H / ratio, SearchH = H;
[0136] If H / ratio > W, then SearchW = W, SearchH = W × ratio;
[0137] Here, SearchW represents the width of the search box, and SearchH represents the height of the search box.
[0138] Assuming the preset aspect ratio is 2:1, the original image has a height of 2200 and a width of 1000, then the H / ratio is 1100. Since the H / ratio is greater than the width of the original image (1000), referring to the formula above, the search box height SearcH is 2000, and the search box width SearcW is 1000, meaning the search box size is 2000×1000.
[0139] In this manual, after calculating the search box size, the search step size can be calculated using the following formula:
[0140] StepW = SearchW / q + 1; and
[0141] StepH = SearchH / q + 1.
[0142] In the formula above, StepW represents the step size in the width direction during the search, StepH represents the step size in the height direction, and q is a preset parameter. Using this formula to calculate the search step size ensures translation invariance, symmetry of the search results, and stability of search time. Symmetry of the search results typically refers to the main subject being centered as much as possible in the search results, and stability of search time means that the search time does not change significantly with changes in the original image size.
[0143] Of course, the above methods for calculating the search box size and search step size are merely illustrative examples. Other formulas can also be used to calculate the search box size and search step size based on the original image size. This specification does not impose any special restrictions on this.
[0144] In this manual, a set of search box sizes and search steps can be determined for each image specification.
[0145] Step 304: Starting from the initial position of the new saliency feature map after saliency annotation, traverse the new saliency feature map based on the search box size and search step size to obtain several saliency sub-maps.
[0146] Based on the aforementioned step 302, for each image specification, after calculating the corresponding search box size and search step size, the new saliency feature map can be traversed from the initial position in the new saliency feature map to obtain multiple sub-maps, which are referred to as saliency sub-maps in this specification. The size of each saliency sub-map is the same as the size of the search box.
[0147] There can be two initial positions, such as the top left corner and the bottom right corner, or the bottom left corner and the top right corner. Of course, in other examples, when the height and width of the original image are not significantly different, only one initial position can be set, and this specification does not impose any special restrictions on this.
[0148] Step 306: Determine the subplot significance factor for each significance subplot.
[0149] Based on each saliency subgraph obtained in step 304 above, the subgraph saliency factor of the saliency subgraph can be determined, and the subgraph saliency factor represents the overall saliency of the corresponding subgraph.
[0150] For example, the sum of the pixel values of each pixel in the saliency sub-image can be calculated as the saliency factor of the sub-image.
[0151] For example, the average pixel value of each pixel in the saliency sub-image can also be calculated as the saliency factor of the sub-image.
[0152] Step 308: Determine the region to which the salient subgraph corresponding to the largest subgraph salient factor belongs as the salient region corresponding to the image specification.
[0153] In this embodiment, since the larger the pixel value of a pixel in the new saliency feature map, the higher its saliency, and the larger the sub-graph saliency factor calculated in step 306, the higher the overall saliency of the corresponding saliency sub-graph, that is, the overall saliency of the saliency sub-graph corresponding to the largest saliency factor is the largest among all saliency sub-graphs, this step can determine the region to which the saliency sub-graph corresponding to the largest sub-graph saliency factor belongs as the saliency region corresponding to the image specification.
[0154] This completes the process of determining the salient region.
[0155] Optionally, in another example of this specification, after determining the salient region of the original image, this salient region can be compared with the region obtained by cropping the original image using the default cropping method, and then a better cropping method can be selected. The default cropping method can be the center cropping method used in traditional image cropping, that is, cropping the center region of the original image according to preset image specifications. For ease of distinction, the region obtained after cropping the original image using the default cropping method can be called the default cropping region.
[0156] In this example, for each image specification, the difference between the saliency of the default cropped region and the determined saliency region can be compared to determine whether the difference between the saliency factor of the default cropped region (hereinafter referred to as the default saliency factor) and the aforementioned maximum saliency factor is less than or equal to the difference threshold.
[0157] If the difference between the default saliency factor and the maximum saliency factor is less than or equal to the difference threshold, it indicates that the cropping result using the default cropping method is not significantly different from the cropping result using the cropping method provided in this specification. Therefore, the default cropping method can be used to crop the original image to obtain the final cropped result. This is because, although saliency detection can detect each subject in the original image, it cannot distinguish between different subjects, that is, it cannot distinguish which subjects are related to the points of interest corresponding to the original image. To ensure that the cropped image does not contain too many subjects unrelated to the points of interest, the default cropping method can be used to crop the original image in this case.
[0158] If the difference between the default saliency factor and the maximum saliency factor is greater than the difference threshold, it indicates that the cropping result using the cropping method provided in this specification is better, and the original image can then be cropped based on the aforementioned saliency region.
[0159] The difference threshold can be a predetermined proportion of the maximum significance factor, such as 80%, 90%, etc.
[0160] Optionally, in another example of this specification, after determining the salient region of the original image, it is also possible to detect whether the main body region of the original image is located at the edge of the salient region. If the main body region is located at the edge of the salient region, the salient region can be appropriately adjusted so that the main body region is as close as possible to the center of the salient region, thereby improving the visual appeal of the cropped image.
[0161] The main body region is the area where the points of interest to be displayed in the original image are located, and it can be determined during the aforementioned salient region search process. The main body region can be a rectangle.
[0162] Please refer to Figure 4 For example, rectangle GHJK is the original image, which shows a tall tower on the left as the main subject, with some mountain peaks and grasslands on the right. Other content in the image is not shown to improve the clarity of the illustration.
[0163] Please continue to refer to this. Figure 4 The main subject of the image, the tower, is located in rectangle ABCD. The salient region is rectangle MNPQ. In this example, we can determine whether the main subject is located on the edge of the salient region by judging whether rectangle ABCD is located on the edge of rectangle MNPQ.
[0164] When performing edge detection, it is necessary to make judgments in all four directions: up, down, left, and right. Taking the left direction as an example, we can calculate the distance D1 between the left boundary AB of the main body region and the left boundary MN of the salient region, and the distance D2 between the right boundary CD of the main body region and the center line EF of the salient region MNPQ. Then we can determine whether D1 is less than D2. If D1 is less than D2, it can be determined that the main body region is located on the edge of the salient region. If D1 is greater than or equal to D2, it can be determined that the main body is not located on the edge of the salient region.
[0165] In this example, if the main subject region is determined to be located on the edge of the salient region, the position of the salient region can be adjusted by translation to bring the main subject region as close as possible to the center of the salient region. A simpler approach is to directly translate the salient region to the far left of the original image, that is, to make the left boundary MN of the salient region coincide with the left boundary GH of the original image. Of course, in practical applications, the salient region can also be translated a certain distance to the left, without necessarily coinciding with the left boundary GH of the original image; this specification does not impose any special restrictions on this.
[0166] As can be seen from the above description, after determining the salient area of the original image, this manual can also detect whether the main body area of the original image is located at the edge of the salient area. If the main body area is located at the edge of the salient area, the position of the salient area can be adjusted so that the main body area is as close as possible to the center of the salient area, thereby improving the visual appeal of the cropped image.
[0167] II. Scoring of cropped images
[0168] Please refer to Figure 5 The process of determining the cropping score of a cropped image may include the following steps:
[0169] Step 502: For each cropped image, a machine learning model is used to predict the quality score and content category probability of the cropped image.
[0170] In this specification, the quality score represents the image quality of the cropped image and can be evaluated using a machine learning model, such as a quality score evaluation model. The quality score evaluation model can be an NIMA (Neural Image Assessment) model, a PSNR (Peak Signal to Noise Ratio) model, etc.
[0171] The content category probability represents the content classification result of the cropped image, and the content category can be preset according to the application scenario. Taking a point of interest in an electronic map as an example, its content category may include: storefront, logo, food, etc. This embodiment can also use a machine learning model to preset the content category probability of the cropped image, such as a classification model like EfficientNet (Rethinking Model Scaling for Convolutional Neural Networks). For example, the content category probability of a cropped image could be storefront -95%, logo -4.8%, food -0.2%, etc.
[0172] Step 504: Calculate the saliency percentage of the cropped image.
[0173] In this specification, the saliency ratio reflects the saliency of the cropped image. The saliency ratio can be calculated by taking the sum of pixel values in the cropped image as the proportion of the sum of pixel values in the new saliency feature map. The saliency ratio can be calculated using the following formula:
[0174]
[0175] Among them, P significance The saliency percentage of the cropped image is (i, j), where (i, j) is a pixel in the cropped image, and a i,j It is the pixel value of pixel (i, j). It represents the pixel values of each pixel in the cropped image, where (m, n) is a pixel in the new salient feature map, and a m,n It is the pixel value of pixel (m, n). It is the pixel value and value of each pixel in the new salient feature map.
[0176] Step 506: Determine the cropping score of the cropped image based on the quality score, the content category probability, and the salience percentage.
[0177] In this embodiment, for each cropped image, a cropping score can be determined based on its quality score, content category probability, and salience percentage. For example, the cropping score can be calculated using a weighted summation method, where the weights of each item can be preset according to the application scenario.
[0178] Taking the three scoring dimensions of quality score, content category probability, and significance percentage as an example, weights can be pre-assigned to these three dimensions. For instance, the weight of quality score is P1, the weight of content category probability is P2, and the weight of significance percentage is P3. Regarding content categories, since there are often multiple content categories, weights can be assigned to each category based on P2. For example, if the point of interest is "hotel," a weight of P2-1 can be pre-assigned to the content category "storefront," a weight of P2-2 to the content category "logo," and a weight of P2-3 to the content category "food." P2-1 can be greater than P2-2, and P2-2 can be greater than P2-3.
[0179] Of course, the above method for calculating the cropping score of cropped images is only an illustrative example. In other examples, other scoring criteria may be introduced, and this specification does not impose any special restrictions on this.
[0180] After calculating the cropping score for each cropped image, the images can be sorted from highest to lowest score. The image ranked first can then be selected as the cropping image that meets the expected cropping effect. In other words, the cropping image with the highest score can be selected as the target cropping image.
[0181] Optionally, in other examples, to adapt to specific scenario requirements, a supplementary strategy for selecting the target cropped image can be set, and the target cropped image can be selected in combination with the supplementary strategy. The supplementary strategy can reflect the special requirements for the cropped image in the corresponding scenario.
[0182] For example, for restaurant-related points of interest, food images are more representative than storefront images. The alternative strategy could be to select the cropped image with the highest cropping score from among cropped images with a quality score greater than or equal to a quality score threshold. In practical applications, after determining the cropped image with the highest cropping score, it can be further determined whether the quality score of this cropped image is greater than or equal to the quality score threshold. If it is, the cropped image with the highest cropping score can be determined as the target cropped image; if the quality score of this cropped image is less than the quality score threshold, the cropped image with the second highest cropping score can be selected, and then the quality score of the second highest cropping image can be determined, and so on. Alternatively, cropped images with a quality score greater than or equal to the quality score threshold can be selected first, and then the cropping scores of these selected cropped images can be sorted, and the cropped image with the highest cropping score can be selected.
[0183] For hotel-related points of interest, storefront images are more representative. The proposed replacement strategy can be to select the cropped image with the highest cropping score from the cropped images whose storefront probability is greater than or equal to the probability threshold. The specific selection process can be referred to the target cropped image selection process for restaurant-related points of interest mentioned above, and will not be repeated here.
[0184] As can be seen from the above description, this manual crops each original image with the goal of retaining the most interest point information, thereby obtaining cropped images with more image information. Then, it can determine the cropping score of each cropped image and determine the target cropped image for that interest point based on the cropping score. Finally, it selects the target cropped image with the best comprehensive score in terms of quality, salience ratio, content category matching degree, etc. from multiple cropped images, so that the quality and content accuracy of the selected target cropped image are both guaranteed.
[0185] This manual also provides a method for displaying images on the client side; please refer to it. Figure 6 The method for displaying this image may include the following steps:
[0186] Step 602: Receive an image display request from the user and determine the image specifications of the image to be displayed.
[0187] Step 604: Obtain the target cropped image that matches the image specifications from the server.
[0188] Step 606: Display the target cropped image.
[0189] In this specification, users can initiate a viewing request for a point of interest through the client. After receiving the viewing request, the client can determine the image specifications of the image of the point of interest to be displayed, and then send an image display request for the point of interest to the server. The image specifications can be carried in the image display request, and the image specifications are usually preset in the client.
[0190] In this specification, after receiving the image display request from the client, the server can determine the target cropped image corresponding to the point of interest based on the image specifications, and return the target cropped image to the client for display to the user. The target cropped image can be based on this specification. Figure 1 The image display method shown is determined to ensure the quality and relevance of the target cropped image, improve the accuracy of subsequent image display, and deliver more accurate and comprehensive information to users, thereby enhancing their image browsing experience.
[0191] Corresponding to the embodiments of the aforementioned image display method, this specification also provides embodiments of the image display device.
[0192] The embodiments of the device illustrated in the figures of this specification can be applied in electronic devices. These device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of the electronic device loading corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 7 The diagram shown is a hardware structure diagram of an electronic device containing the illustrated device described in this specification. (Except for...) Figure 7 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in which the device is located in the embodiment may also include other hardware depending on the actual function of the electronic device, which will not be described in detail here.
[0193] Figure 8 This is a block diagram illustrating an exemplary embodiment of the present specification, showing a picture display device.
[0194] Please refer to Figure 8 The image display device can be applied to Figure 7 The electronic device shown includes:
[0195] The image acquisition unit acquires several original images corresponding to each point of interest.
[0196] The image cropping unit aims to retain the most point of interest information and crops each original image according to various image specifications to obtain several cropped images corresponding to each image specification.
[0197] The cropping scoring unit determines the cropping score for each cropped image corresponding to each image specification for each image specification.
[0198] The target determination unit determines, based on the cropping score, a target cropping image whose cropping effect meets expectations from among several cropped images corresponding to the image specifications;
[0199] The image display unit, in response to an image display request for the point of interest, determines a target cropped image corresponding to the specified image specifications based on the image specifications specified in the image display request, and transmits it to the client for display.
[0200] Optionally, the step of cropping each original image according to various image specifications with the goal of retaining the most point of interest information includes:
[0201] For each original image, a saliency detection is performed on the original image to obtain the original saliency feature map of the original image;
[0202] Identify the text regions in the original image that are related to the point of interest;
[0203] The text regions in the original saliency feature map are marked with saliency to obtain a new saliency feature map;
[0204] According to various image specifications, a salient region search is performed in the new salient feature map to determine the salient region corresponding to each image specification;
[0205] The original image is cropped based on the salient region to obtain cropped images corresponding to each image size.
[0206] Optionally, the step of identifying the text region in the original image related to the point of interest includes:
[0207] The text contained in the image was identified using OCR technology;
[0208] For each identified text segment, determine the similarity between the text and the point of interest;
[0209] The text regions containing texts whose similarity meets the relevance requirements are identified as text regions related to the points of interest.
[0210] Optionally, the step of saliency annotation of the text region in the original saliency feature map includes:
[0211] The pixel values of the pixels located in the text region in the original saliency feature map are modified to preset saliency pixel values to achieve saliency annotation.
[0212] Optionally, the step of searching for salient regions in the new salient feature map according to various image specifications to determine the salient region corresponding to each image specification includes:
[0213] For each image specification, determine the search box size and search step size based on the image specifications;
[0214] Starting from the initial position of the new saliency feature map after saliency annotation, the new saliency feature map is traversed based on the search box size and search step size to obtain several saliency sub-maps;
[0215] Determine the significance factor of each significance subplot;
[0216] The region to which the salient subgraph corresponding to the largest subgraph salient factor belongs is determined as the salient region corresponding to the image specification.
[0217] Optionally, before cropping the original image based on the salient region, the method further includes:
[0218] Determine the default cropping area obtained after cropping the original image using the default cropping method;
[0219] Determine the default saliency factor for the default clipping region;
[0220] Determine whether the difference between the default significance factor and the maximum subplot significance factor is less than or equal to a difference threshold;
[0221] If the difference between the default significance factor and the maximum subgraph significance factor is less than or equal to the difference threshold, then the original image is cropped based on the default cropping method;
[0222] If the difference between the default saliency factor and the maximum subgraph saliency factor is greater than the difference threshold, then the step of cropping the original image based on the saliency region is performed.
[0223] Optional, where the saliency factor is the pixel value and value of each pixel in the corresponding region.
[0224] Optionally, before cropping the original image based on the salient region, the method further includes:
[0225] Determine the main subject region in the original image;
[0226] Determine whether the main body region is located at the edge of the salient region;
[0227] When the main body region is located at the edge of the salient region, the position of the salient region is adjusted so that the main body region moves closer to the center of the salient region.
[0228] Optionally, the step of determining the cropping score of each cropped image corresponding to the image specifications includes:
[0229] For each cropped image, a machine learning model is used to predict the quality score and content category probability of the cropped image.
[0230] Calculate the saliency percentage of the cropped image;
[0231] The cropping score of the cropped image is determined based on the quality score, the content category probability, and the salience percentage.
[0232] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0233] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0234] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0235] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0236] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0237] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0238] Corresponding to the embodiments of the aforementioned image display method, this specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps:
[0239] For each point of interest, obtain several original images corresponding to that point of interest;
[0240] With the goal of retaining the most point of interest information, each original image is cropped according to various image specifications to obtain several cropped images corresponding to each image specification;
[0241] For each image specification, determine the cropping score for each cropped image corresponding to that image specification;
[0242] Based on the cropping score, a target cropping image whose cropping effect meets expectations is determined from several cropping images corresponding to the image specifications.
[0243] In response to an image display request for the point of interest, based on the image specifications specified in the image display request, a target cropped image corresponding to the specified image specifications is determined and transmitted to the client for display.
[0244] Optionally, the step of cropping each original image according to various image specifications with the goal of retaining the most point of interest information includes:
[0245] For each original image, a saliency detection is performed on the original image to obtain the original saliency feature map of the original image;
[0246] Identify the text regions in the original image that are related to the point of interest;
[0247] The text regions in the original saliency feature map are marked with saliency to obtain a new saliency feature map;
[0248] According to various image specifications, a salient region search is performed in the new salient feature map to determine the salient region corresponding to each image specification;
[0249] The original image is cropped based on the salient region to obtain cropped images corresponding to each image size.
[0250] Optionally, the step of identifying the text region in the original image related to the point of interest includes:
[0251] The text contained in the image was identified using OCR technology;
[0252] For each identified text segment, determine the similarity between the text and the point of interest;
[0253] The text regions containing texts whose similarity meets the relevance requirements are identified as text regions related to the points of interest.
[0254] Optionally, the step of saliency annotation of the text region in the original saliency feature map includes:
[0255] The pixel values of the pixels located in the text region in the original saliency feature map are modified to preset saliency pixel values to achieve saliency annotation.
[0256] Optionally, the step of searching for salient regions in the new salient feature map according to various image specifications to determine the salient region corresponding to each image specification includes:
[0257] For each image specification, determine the search box size and search step size based on the image specifications;
[0258] Starting from the initial position of the new saliency feature map after saliency annotation, the new saliency feature map is traversed based on the search box size and search step size to obtain several saliency sub-maps;
[0259] Determine the significance factor of each significance subplot;
[0260] The region to which the salient subgraph corresponding to the largest subgraph salient factor belongs is determined as the salient region corresponding to the image specification.
[0261] Optionally, before cropping the original image based on the salient region, the method further includes:
[0262] Determine the default cropping area obtained after cropping the original image using the default cropping method;
[0263] Determine the default saliency factor for the default clipping region;
[0264] Determine whether the difference between the default significance factor and the maximum subplot significance factor is less than or equal to a difference threshold;
[0265] If the difference between the default significance factor and the maximum subgraph significance factor is less than or equal to the difference threshold, then the original image is cropped based on the default cropping method;
[0266] If the difference between the default saliency factor and the maximum subgraph saliency factor is greater than the difference threshold, then the step of cropping the original image based on the saliency region is performed.
[0267] Optional, where the saliency factor is the pixel value and value of each pixel in the corresponding region.
[0268] Optionally, before cropping the original image based on the salient region, the method further includes:
[0269] Determine the main subject region in the original image;
[0270] Determine whether the main body region is located at the edge of the salient region;
[0271] When the main body region is located at the edge of the salient region, the position of the salient region is adjusted so that the main body region moves closer to the center of the salient region.
[0272] Optionally, the step of determining the cropping score of each cropped image corresponding to the image specifications includes:
[0273] For each cropped image, a machine learning model is used to predict the quality score and content category probability of the cropped image.
[0274] Calculate the saliency percentage of the cropped image;
[0275] The cropping score of the cropped image is determined based on the quality score, the content category probability, and the salience percentage.
[0276] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0277] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. A method for displaying images, comprising: For each point of interest, obtain several original images corresponding to that point of interest; With the goal of retaining the most point of interest information, each original image is cropped according to various image specifications to obtain several cropped images corresponding to each image specification; For each image specification, determine the cropping score for each cropped image corresponding to that image specification; Based on the cropping score, a target cropping image whose cropping effect meets expectations is determined from several cropping images corresponding to the image specifications. In response to an image display request for the point of interest, based on the image specifications specified in the image display request, a target cropped image corresponding to the specified image specifications is determined and transmitted to the client for display; The goal is to retain the most point-of-interest information, and each original image is cropped according to various image specifications, including: For each original image, a saliency detection is performed on the original image to obtain the original saliency feature map of the original image; Identify the text regions in the original image that are related to the point of interest; The text regions in the original saliency feature map are marked with saliency to obtain a new saliency feature map; According to various image specifications, a salient region search is performed in the new salient feature map to determine the salient region corresponding to each image specification; The original image is cropped based on the salient region to obtain cropped images corresponding to each image size.
2. The method according to claim 1, wherein identifying the text region in the original image related to the point of interest includes: The text contained in the image was identified using OCR technology; For each identified text segment, determine the similarity between the text and the point of interest; The text regions containing texts whose similarity meets the relevance requirements are identified as text regions related to the points of interest.
3. The method according to claim 1, wherein the saliency annotation of the text region in the original saliency feature map includes: The pixel values of the pixels located in the text region in the original saliency feature map are modified to preset saliency pixel values to achieve saliency annotation.
4. The method according to claim 1, wherein the step of performing a salient region search in the new salient feature map according to multiple image specifications to determine the salient region corresponding to each image specification includes: For each image specification, determine the search box size and search step size based on the image specifications; Starting from the initial position of the new saliency feature map after saliency annotation, the new saliency feature map is traversed based on the search box size and search step size to obtain several saliency sub-maps; Determine the significance factor of each significance subplot; The region to which the salient subgraph corresponding to the largest subgraph salient factor belongs is determined as the salient region corresponding to the image specification.
5. The method according to claim 4, further comprising, before cropping the original image based on the salient region: Determine the default cropping area obtained after cropping the original image using the default cropping method; Determine the default saliency factor for the default clipping region; Determine whether the difference between the default significance factor and the maximum subplot significance factor is less than or equal to a difference threshold; If the difference between the default significance factor and the maximum subgraph significance factor is less than or equal to the difference threshold, then the original image is cropped based on the default cropping method; If the difference between the default saliency factor and the maximum subgraph saliency factor is greater than the difference threshold, then the step of cropping the original image based on the saliency region is performed.
6. The method according to claim 4 or 5, wherein, The saliency factor is the sum of the pixel values of each pixel in the corresponding region.
7. The method according to claim 1, further comprising, before cropping the original image based on the salient region: Determine the main subject region in the original image; Determine whether the main body region is located at the edge of the salient region; When the main body region is located at the edge of the salient region, the position of the salient region is adjusted so that the main body region moves closer to the center of the salient region.
8. The method according to claim 1, wherein determining the cropping score of each cropped image corresponding to the image specification includes: For each cropped image, a machine learning model is used to predict the quality score and content category probability of the cropped image. Calculate the saliency percentage of the cropped image; The cropping score of the cropped image is determined based on the quality score, the content category probability, and the salience percentage.
9. A method for displaying images, comprising: Receive image display requests from users and determine the image specifications of the images to be displayed; Obtain the target cropped image that matches the specified image specifications from the server; The target cropped image is displayed, wherein the target cropped image is cropped based on the method described in any one of claims 1-8.
10. A picture display device, comprising: The image acquisition unit acquires several original images corresponding to each point of interest. The image cropping unit aims to retain the most point of interest information and crops each original image according to various image specifications to obtain several cropped images corresponding to each image specification. The cropping scoring unit determines the cropping score for each cropped image corresponding to each image specification for each image specification. The target determination unit determines, based on the cropping score, a target cropping image whose cropping effect meets expectations from among several cropped images corresponding to the image specifications; The image display unit, in response to an image display request for the point of interest, determines a target cropped image corresponding to the specified image specifications based on the image specifications specified in the image display request, and transmits it to the client for display. The step of cropping each original image according to various image specifications with the goal of retaining the most point of interest information includes: For each original image, a saliency detection is performed on the original image to obtain the original saliency feature map of the original image; Identify the text regions in the original image that are related to the point of interest; The text regions in the original saliency feature map are marked with saliency to obtain a new saliency feature map; According to various image specifications, a salient region search is performed in the new salient feature map to determine the salient region corresponding to each image specification; The original image is cropped based on the salient region to obtain cropped images corresponding to each image size.
11. An electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1-9 by executing the executable instructions.
12. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the steps of the method as claimed in any one of claims 1-9.
13. A computer program product, which, when executed by a processor, implements the method as described in any one of claims 1-9.