Image processing methods, devices, electronic devices and media in the session
By determining the relevance of images and identifying the target image within instant messaging sessions, the problem of session fragmentation and information confusion caused by image errors is solved, enabling smoother communication.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2026-03-06
AI Technical Summary
In instant messaging software conversations, incorrect and corrected images are mixed with other information, resulting in disjointed conversations, fragmented content, and information confusion, which affects the user's communication effectiveness.
By displaying the first image in the session interface and determining that its correlation with the already sent second image exceeds a threshold, the target image is identified and sent to the session. The target image can be an image stitched together from the first image and the second image or the first image itself. Unnecessary images are withdrawn.
It reduces content fragmentation and information confusion in conversations, and improves the ease of use of instant messaging software.
Smart Images

Figure CN116647529B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing, and specifically relates to an image processing method, apparatus, electronic device, and storage medium in a session. Background Technology
[0002] Instant messaging software allows two or more people to converse and exchange text messages, files, voice messages, and images in real time, enabling real-time communication between people. Because images can display more intuitive and colorful content, they have gradually become an important part of communication in these conversations.
[0003] In some cases, if a user sends an incorrect or incomplete image during a session, it is necessary to correct the image that has already been sent. Therefore, the correct image will be sent after the incorrect image. In this way, other users can combine the multiple images they receive and understand the content that the user wants to convey.
[0004] However, if there is a lot of content in the conversation, the incorrect images, the corrected images, and other information will be mixed together without any connection. This will not only make it difficult to correct the errors, but will also cause the conversation content to be fragmented and the information to be chaotic, thus affecting the communication between users. Summary of the Invention
[0005] The purpose of this application is to provide an image processing method, apparatus, electronic device, and storage medium for use in a chat session. This method can solve the problem that if erroneous images, corrected images, and other information are mixed together in a chat session without any continuity, it will not only be difficult to correct errors, but will also lead to fragmented chat content, chaotic information, and affect the communication between users.
[0006] In a first aspect, embodiments of this application provide an image processing method in a session, applied to a first electronic device, the method comprising:
[0007] Display the first image in the chat interface;
[0008] If the correlation between the first image and the second image exceeds a threshold, a target image is determined, wherein the second image is an image that the first electronic device has already sent in the corresponding session of the session interface;
[0009] The target image is sent to the session.
[0010] Optionally, before determining the target image when the correlation between the first image and the second image exceeds a threshold, the method further includes:
[0011] If the image similarity between the first image and the second image is greater than a first threshold, it is determined that the correlation between the first image and the second image exceeds the threshold.
[0012] Alternatively, if the image type indicated by the first image matches the image type indicated by the second image, it is determined that the correlation between the first image and the second image exceeds a threshold.
[0013] Optionally, before determining the target image when the correlation between the first image and the second image exceeds a threshold, the method further includes:
[0014] Retrieve messages from the session corresponding to the session interface;
[0015] If the content of the message indicates that the second image meets the preset update conditions, determine that the correlation between the first image and the second image exceeds a threshold, or perform the step of determining the target image if the correlation between the first image and the second image exceeds the threshold.
[0016] Optionally, determining the target image includes:
[0017] The image obtained by stitching the first image and the second image together is determined as the target image;
[0018] Alternatively, the first image may be identified as the target image.
[0019] Optionally, after sending the target image to the session, the method further includes:
[0020] If the first image has been sent to the session and the target image is a composite image of the first image and the second image, then the first image and the second image shall be withdrawn.
[0021] Alternatively, if the first image has been sent to the session and the target image is the first image, the second image may be withdrawn.
[0022] Alternatively, the second image may be withdrawn if the first image has not been sent to the session.
[0023] Secondly, embodiments of this application provide an apparatus for image processing during a session, applied to a first electronic device, the apparatus comprising:
[0024] The display module is used to display the first image in the session interface;
[0025] The determination module is used to determine a target image when the correlation between the first image and the second image exceeds a threshold, wherein the second image is an image that the first electronic device has already sent in the corresponding session of the session interface;
[0026] The sending module is used to send the target image to the session.
[0027] Optionally, the determining module is specifically used for:
[0028] If the image similarity between the first image and the second image is greater than a first threshold, it is determined that the correlation between the first image and the second image exceeds the threshold.
[0029] Alternatively, if the image type indicated by the first image matches the image type indicated by the second image, it is determined that the correlation between the first image and the second image exceeds a threshold.
[0030] Optionally, the determining module is specifically used for:
[0031] Retrieve messages from the session corresponding to the session interface;
[0032] If the content of the message indicates that the second image meets the preset update conditions, determine that the correlation between the first image and the second image exceeds a threshold, or perform the step of determining the target image if the correlation between the first image and the second image exceeds the threshold.
[0033] Optionally, the determining module is specifically used for:
[0034] The image obtained by stitching the first image and the second image together is determined as the target image;
[0035] Alternatively, the first image may be identified as the target image.
[0036] Optionally, the sending module is further configured to:
[0037] If the first image has been sent to the session and the target image is a composite image of the first image and the second image, then the first image and the second image shall be withdrawn.
[0038] Alternatively, if the first image has been sent to the session and the target image is the first image, the second image may be withdrawn.
[0039] Alternatively, the second image may be withdrawn if the first image has not been sent to the session.
[0040] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.
[0041] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0042] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0043] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0044] In this embodiment of the application, the first electronic device displays a first image in the session interface; if the correlation between the first image and the second image exceeds a threshold, a target image is determined, wherein the second image is an image that the first electronic device has already sent in the corresponding session of the session interface; and the target image is sent to the session.
[0045] In this way, during a conversation, after the first electronic device displays the first image in the conversation interface, the correlation between the first image and the second image already sent by the first electronic device in the conversation can be determined. If the correlation information exceeds a threshold, the first image can be considered as an image used to correct the second image. Therefore, the target image can be determined based on the first image and the second image and sent to the conversation. Then, the target image determined based on the first image and the second image can be directly displayed in the conversation. Users can obtain the correct information based on the target image, thereby reducing the fragmentation of content and the confusion of information in the conversation, and improving the ease of use of instant messaging software. Attached Figure Description
[0046] Figure 1 This is a flowchart illustrating an image processing method in a session according to an exemplary embodiment;
[0047] Figure 2 This is a schematic diagram illustrating how a user corrects an already sent image during a session in related technologies;
[0048] Figure 3This is a schematic diagram illustrating, according to an exemplary embodiment, the stitching of a first image and a second image based on overlapping regions to obtain a target image;
[0049] Figure 4 This is a schematic diagram illustrating a user correcting an already sent image during a session, according to an exemplary embodiment.
[0050] Figure 5 This is a logical schematic diagram illustrating an image processing method in a session according to an exemplary embodiment;
[0051] Figure 6 This is a block diagram illustrating an image processing apparatus in a session according to an exemplary embodiment;
[0052] Figure 7 A block diagram of an image processing electronic device in a session, according to an exemplary embodiment;
[0053] Figure 8 This is a block diagram illustrating an apparatus for image processing in a session, according to an exemplary embodiment. Detailed Implementation
[0054] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0055] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0056] The image processing method in the session provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0057] Figure 1 This is a flowchart illustrating an image processing method in a session according to an exemplary embodiment, applied to a first electronic device, the image processing method in the session including the following steps.
[0058] In step S11, the first image is displayed in the session interface.
[0059] Instant messaging software allows two or more people to converse and exchange text messages, files, voice messages, and images in real time, enabling real-time communication between people. In some cases, users may send incorrect or incomplete images during a conversation, requiring correction. Therefore, the corrected image will be sent after the incorrect one.
[0060] like Figure 2 The illustration shows a scenario in related technologies where a user corrects a sent image during a conversation. Teacher Wang first sent the upper half of a lotus flower image, then, finding the screenshot incomplete, sent the lower half. Later, noticing the disorganized information in the conversation, he needed to send the complete lotus flower image again. This results in a large amount of content in the conversation, with erroneous and corrected images mixed with other information, lacking coherence, fragmented conversation content, and disorganized information, thus affecting the usability of the instant messaging software. Therefore, this application provides an image processing method for use in conversations, enabling users to conveniently and quickly correct images during a conversation.
[0061] In this application, each electronic device can participate in multiple different sessions. Each session may include one electronic device or multiple electronic devices. For ease of description, the electronic device that displays the first image is referred to as the first electronic device.
[0062] The first image displayed in the session interface can be an image input into the input bar of the first electronic device but not yet sent to the session, or it can be an image that has been sent to the session; the first image can be image data of any file format, and the content of the first image can be a photograph of an object, or a screenshot of a device, etc., and this application does not limit it in this regard.
[0063] In step S12, if the correlation between the first image and the second image exceeds a threshold, a target image is determined, wherein the second image is an image that the first electronic device has already sent in the corresponding session of the session interface.
[0064] In this step, the first electronic device can compare the correlation between the first image and the second image, and then determine whether the first image is used to correct the second image based on the correlation. Generally, if the correlation between the two is strong, the first image is likely to be used to correct the second image. Then, if the correlation exceeds a threshold, the target image can be further determined based on the first image and the second image.
[0065] The second image is an image that the first electronic device has sent in the corresponding session of the session interface. It can be any image sent by the first electronic device in the session, or it can be limited to the last one or several images sent by the first client to the session before sending the first image, or one or several images sent to the session within a preset time period, thereby reducing the corresponding amount of computation. The specific details are not limited.
[0066] In one implementation, before determining the target image if the correlation between the first image and the second image exceeds a threshold, the method further includes:
[0067] If the image similarity between the first image and the second image is greater than a first threshold, it is determined that the correlation between the first image and the second image exceeds the threshold.
[0068] Alternatively, if the image type indicated by the first image matches the image type indicated by the second image, the correlation between the first image and the second image is determined to exceed a threshold.
[0069] In other words, the image similarity between the first image and the second image can be used as the criterion for judging whether there is a correlation between them. If the similarity between the first image and the second image is higher than the second preset threshold, then it can be considered that the two images have similar features. Since the possibility of repeatedly sending two similar images in a session is low, it can be determined that the first image is used to correct the second image. Therefore, it can be determined that the correlation between the first image and the second image exceeds the threshold, and then the subsequent steps can be executed.
[0070] For example, if the image similarity between the first image and the second image is greater than a first threshold, determining that the correlation between the first image and the second image exceeds the threshold includes:
[0071] By comparing the first image and the second image, the overlapping area between the first image and the second image is determined; if the number of pixels included in the overlapping area is greater than a third threshold, or if the area ratio between the overlapping area and the second image is greater than a fourth threshold, the correlation between the first image and the second image is determined to exceed the threshold.
[0072] It is understandable that if the first image and the second image have overlapping areas, then there is a certain relationship between the two. For example, it could be the left two-thirds and the right two-thirds of an image, or it could be the context of a chat screenshot, and so on.
[0073] If the number of pixels in the overlapping area is greater than the third threshold, it can be considered that the first image and the second image have a large overlap. Since the probability of repeatedly sending two largely overlapping images in a session is low, it can be determined that the first image is used to correct the second image, that is, the correlation between the first image and the second image exceeds the threshold.
[0074] Alternatively, for example, algorithms such as cosine similarity, histogram, or hash algorithm can be used to calculate the image similarity between the first image and the second image, without any specific limitation.
[0075] Alternatively, the correlation between the first and second images can be determined based on their respective image types. If the image types match, the content of the two images is considered to be the same or similar. In this case, the first image may have been sent incorrectly, and the correlation between the first and second images can be determined to exceed a threshold, thus triggering subsequent steps. For example, the first and second images might be scanned copies of different versions of documents, or different photos of the same person, etc.
[0076] In one implementation, before determining the target image if the correlation between the first image and the second image exceeds a threshold, the method further includes:
[0077] Obtain messages within the corresponding session on the session interface; if the message content indicates that the second image meets the preset update conditions, determine that the correlation between the first image and the second image exceeds a threshold, or, if the correlation between the first image and the second image exceeds a threshold, perform the step of determining the target image.
[0078] In other words, the message in the conversation can be used as a reference for judgment. Specifically, the content of the message can be used to directly determine whether the target image needs to be determined based on the first image and the second image. Alternatively, a preliminary judgment can be made based on the content of the message, and then further processing can be carried out based on the determination of the correlation between the first image and the second image. No specific limitations are imposed.
[0079] The messages within the session can be either text or voice messages, without specific limitations. For example, the second image will only be considered to meet the preset update conditions if the message content includes semantics such as "modify" or "correct." Otherwise, the first image is assumed not to be the image being corrected for the second image, and therefore no further processing is performed. This reduces the possibility of erroneous operations, improves the accuracy of image correction, and also increases the efficiency of image processing.
[0080] In this step, the target image is determined, including:
[0081] The image obtained by stitching the first image and the second image together is determined as the target image;
[0082] Alternatively, the first image can be designated as the target image.
[0083] In other words, the target image can be a new image obtained by stitching together the first image and the second image, or the first image can be directly determined as the target image. The specific judgment and processing can be made according to different application scenarios to adapt to different application scenarios.
[0084] For example, if the first image and the second image have an overlapping area, and the number of pixels in the overlapping area is greater than a third threshold, and normally two images with a large overlapping area are not sent repeatedly in a session, then the first image can be considered as the image used to correct the second image.
[0085] Therefore, overlapping areas can be stitched together to obtain a complete target image. Compared to two separate images with overlapping areas, a complete target image is obviously more conducive to smooth user communication and conversation.
[0086] For example, such as Figure 3 As shown, this is a schematic diagram of stitching together a first image and a second image based on the overlapping area to obtain a target image. The second image is the upper half of a lotus flower image, and the first image is the lower half of the same lotus flower image. The flower stems of the two images overlap. Therefore, by stitching the images together, the second image can be corrected to obtain a complete lotus flower image, which can be used as the target image.
[0087] Alternatively, if the image similarity between the first image and the second image is greater than a first threshold, then the first image might be based on the second image with added icons or annotation boxes, or it might be that some elements in the second image have been adjusted, and so on. In this way, through image fusion, a target image can be obtained that supplements or modifies the information in the second image based on the first image, while not affecting the integrity of the information in the original second image, which is beneficial for user communication and smooth conversation.
[0088] Furthermore, if the first and second images match in image type, then the two images can be considered to contain the same or similar content. For example, the first and second images might be scanned copies of different versions of documents, or different photos of the same person, etc. In this case, there is no need to merge the first and second images; it can be determined that the second image was likely sent by mistake. Therefore, the first image can be directly identified as the target image.
[0089] Furthermore, the specific method for determining the target image can refer to the messages in the conversation. For example, if the message in the conversation is: "This is the lower half of the previous image", then the images can be stitched together with the second image on top and the first image on the bottom to obtain the target image; or, if the message in the conversation is: "I changed the color of the petals", then the petal color in the second image can be changed according to the petal color in the first image to obtain the target image; or, if the message in the conversation is: "The file I just sent was sent incorrectly", then the first image can be directly determined as the target image, and so on, without any specific limitations.
[0090] In step S13, the target image is sent to the session.
[0091] In this step, the first electronic device sends the target image to the session. Specifically, it can push the target image to other electronic devices participating in the session, or it can push the target image to the session management device, which then pushes the target image to other electronic devices, and so on. The specific method is not limited. In this way, other electronic devices in the session can receive the complete and corrected target image, thereby reducing the fragmentation of content and information confusion in the target session and improving the ease of use of instant messaging software.
[0092] In one implementation, after sending the target image to the session, the method further includes:
[0093] If the first image has been sent to the session and the target image is a composite image of the first and second images, the first and second images can be withdrawn.
[0094] Alternatively, if the first image has been sent to the session and the target image is the first image, the second image can be withdrawn;
[0095] Alternatively, the second image can be withdrawn if the first image is not sent to the session.
[0096] In other words, while pushing the target image, the second image in the session will also be withdrawn. It can be understood that the target image is the complete and corrected image, and therefore, the content of the second image is irrelevant and redundant information. This can further reduce the situation of fragmented content and confusing information in the target session.
[0097] Specifically, if the first image is an image that has already been sent to the session, and the target image is an image that is stitched together from the first image and the second image, that is, the target image is a new image that has not been sent to the session, in other words, the content of the first image is also redundant information, then the first image and the second image can be withdrawn at the same time to further reduce redundant information in the session;
[0098] If the first image is an image that has already been sent to the session, and the target image is the first image, then after withdrawing the second image, there is no need to withdraw the first image and resend it, thereby reducing redundant computation.
[0099] If the first image is an image entered into the input field of the first electronic device but not yet sent to the session, then other electronic devices in the session have not received the first image, and the second image can simply be withdrawn in the session.
[0100] Furthermore, the image processing method provided in this application can be used to correct images in a session. This can be any electronic device participating in the session, or an electronic device with a specific identity within the session, such as a session administrator or group owner. Therefore, after the first electronic device sends the target image to the session, the session management device can, upon receiving the target image sent by the first electronic device in the session, determine the identity of the first electronic device. If it confirms that the first electronic device has the corresponding authority to use the image processing method provided in this application, it can then push the target image to other electronic devices in the session.
[0101] like Figure 4 The image shown illustrates how a user corrects an already sent image during a session, compared to... Figure 2 As shown in the diagram, after applying the image processing solution of this application, Teacher Wang first sent the upper half of the lotus flower image through the first electronic device. Then, realizing that the screenshot was incomplete, he planned to send the lower half of the lotus flower image. At this point, the first electronic device, based on the correlation between the upper and lower halves of the lotus flower image, stitched the two together to obtain the complete lotus flower image, which was then sent to the conversation as the target image. Simultaneously, the upper half of the lotus flower image was withdrawn. In this way, the fragmented content and chaotic information in the conversation were alleviated, the conversation became smoother, and the usability of instant messaging software was improved.
[0102] For example, such as Figure 5 The diagram shown is a logical schematic of an image processing method in a session according to an exemplary embodiment. This application mainly includes the following three steps:
[0103] Step 1: Retrieve and identify users who are in a chat state;
[0104] This case deals with a chat scenario where a first electronic device establishes contact with other electronic devices through instant messaging software, exchanging text, screenshots, videos, and other messages, thus entering a chat state.
[0105] Step 2: Identify the original erroneous screenshot associated with the content of the corrected screenshot;
[0106] After entering chat mode, the corrected screenshot is usually sent after the incorrect screenshot has been sent. After the incorrect screenshot is identified, the corrected screenshot is sent. In order to accurately identify the corrected screenshot, the subsequent screenshot can be compared with the previous screenshot by pixels, that is, the first image and the second image are compared. If the correlation between the subsequent screenshot and the previous screenshot exceeds a threshold, the correct screenshot, that is, the target screenshot, is further determined.
[0107] Step 3: Uncover the original incorrect screenshot and display the corrected screenshot;
[0108] The corrected screenshot and the original incorrect screenshot are interspersed with other information from various chat participants. This information divides the original incorrect screenshot and the corrected screenshot into two parts. If there is a lot of this interspersed information, it will make the separation between the two parts of the screenshot more serious. Therefore, this solution can highlight the relationship between the corrected screenshot and the original incorrect screenshot, and display the corrected screenshot without changing the original chat sequence and content.
[0109] This allows for the association between corrected screenshots and the original incorrect screenshots during chat. Furthermore, when correcting a screenshot, the original incorrect screenshot can be automatically retracted, and the corrected screenshot can be automatically retrieved and corrected into a complete and accurate screenshot. This makes it convenient for users to send screenshots during chat and improves the user experience.
[0110] As can be seen from the above, the technical solution provided by the embodiments of this application allows for the determination of the correlation between the first image and the second image already sent by the first electronic device in the session after the first electronic device displays the first image in the session during the session. If the correlation information exceeds a threshold, the first image can be considered as an image used to correct the second image. Therefore, a target image can be determined based on the first image and the second image, and the target image can be sent to the session. Then, the target image determined based on the first image and the second image can be directly displayed in the session, and the user can obtain the correct information based on the target image, thereby reducing the fragmentation of content and the confusion of information in the session, and improving the ease of use of instant messaging software.
[0111] The image processing method in a session provided in this application can be executed by an image processing device in a session. This application uses an image processing device in a session executing the image processing method in a session as an example to illustrate the apparatus for the image processing method in a session provided in this application.
[0112] Figure 6 This is a block diagram of an image processing apparatus in a session according to an exemplary embodiment, applied to a first electronic device, the apparatus comprising:
[0113] Display module 201 is used to display the first image in the session interface;
[0114] The determining module 202 is used to determine a target image when the correlation between the first image and the second image exceeds a threshold, wherein the second image is an image that the first electronic device has sent in the corresponding session of the session interface;
[0115] The sending module 203 is used to send the target image to the session.
[0116] Optionally, the determining module 202 is specifically used for:
[0117] If the image similarity between the first image and the second image is greater than a first threshold, it is determined that the correlation between the first image and the second image exceeds the threshold.
[0118] Alternatively, if the image type indicated by the first image matches the image type indicated by the second image, it is determined that the correlation between the first image and the second image exceeds a threshold.
[0119] Optionally, the determining module 202 is specifically used for:
[0120] Retrieve messages from the session corresponding to the session interface;
[0121] If the content of the message indicates that the second image meets the preset update conditions, determine that the correlation between the first image and the second image exceeds a threshold, or perform the step of determining the target image if the correlation between the first image and the second image exceeds the threshold.
[0122] Optionally, the determining module 202 is specifically used for:
[0123] The image obtained by stitching the first image and the second image together is determined as the target image;
[0124] Alternatively, the first image may be identified as the target image.
[0125] Optionally, the sending module 203 is further configured to:
[0126] If the first image has been sent to the session and the target image is a composite image of the first image and the second image, then the first image and the second image shall be withdrawn.
[0127] Alternatively, if the first image has been sent to the session and the target image is the first image, the second image may be withdrawn.
[0128] Alternatively, the second image may be withdrawn if the first image has not been sent to the session.
[0129] As can be seen from the above, the technical solution provided by the embodiments of this application allows for the determination of the correlation between the first image and the second image already sent by the first electronic device in the session after the first electronic device displays the first image in the session during the session. If the correlation information exceeds a threshold, the first image can be considered as an image used to correct the second image. Therefore, a target image can be determined based on the first image and the second image, and the target image can be sent to the session. Then, the target image determined based on the first image and the second image can be directly displayed in the session, and the user can obtain the correct information based on the target image, thereby reducing the fragmentation of content and the confusion of information in the session, and improving the ease of use of instant messaging software.
[0130] The image processing device in the session in this application embodiment can be an electronic device or a component of an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope.
[0131] The image processing device in the session in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems, and this application embodiment does not specifically limit it.
[0132] The image processing device in the session provided in this application embodiment can achieve... Figures 1 to 5 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0133] Optionally, such as Figure 7As shown, this application embodiment also provides an electronic device 500, including a processor 501 and a memory 502. The memory 502 stores a program or instructions that can run on the processor 501. When the program or instructions are executed by the processor 501, they implement the various steps of the image processing method embodiment in the above session and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0134] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0135] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0136] The electronic device 1000 includes, but is not limited to, components such as: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.
[0137] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0138] The display unit 1006 is used to display the first image in the session interface;
[0139] The processor 1010 is configured to determine a target image when the correlation between the first image and the second image exceeds a threshold, wherein the second image is an image that the first electronic device has already sent in the corresponding session of the session interface; and send the target image to the session.
[0140] Optionally, the processor 1010 is also used for:
[0141] If the image similarity between the first image and the second image is greater than a first threshold, it is determined that the correlation between the first image and the second image exceeds the threshold.
[0142] Alternatively, if the image type indicated by the first image matches the image type indicated by the second image, it is determined that the correlation between the first image and the second image exceeds a threshold.
[0143] Optionally, the processor 1010 is also used for:
[0144] Retrieve messages from the session corresponding to the session interface;
[0145] If the content of the message indicates that the second image meets the preset update conditions, determine that the correlation between the first image and the second image exceeds a threshold, or perform the step of determining the target image if the correlation between the first image and the second image exceeds the threshold.
[0146] Optionally, the processor 1010 is also used for:
[0147] The image obtained by stitching the first image and the second image together is determined as the target image;
[0148] Alternatively, the first image may be identified as the target image.
[0149] Optionally, the processor 1010 is also used for:
[0150] If the first image has been sent to the session and the target image is a composite image of the first image and the second image, then the first image and the second image shall be withdrawn.
[0151] Alternatively, if the first image has been sent to the session and the target image is the first image, the second image may be withdrawn.
[0152] Alternatively, the second image may be withdrawn if the first image has not been sent to the session.
[0153] As can be seen from the above, the technical solution provided by the embodiments of this application allows for the determination of the correlation between the first image and the second image already sent by the first electronic device in the session after the first electronic device displays the first image in the session during the session. If the correlation information exceeds a threshold, the first image can be considered as an image used to correct the second image. Therefore, a target image can be determined based on the first image and the second image, and the target image can be sent to the session. Then, the target image determined based on the first image and the second image can be directly displayed in the session, and the user can obtain the correct information based on the target image, thereby reducing the fragmentation of content and the confusion of information in the session, and improving the ease of use of instant messaging software.
[0154] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0155] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0156] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.
[0157] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the image processing method embodiments in the above session and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0158] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0159] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the image processing method embodiment in the above session, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0160] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0161] This application provides a computer program product that is stored in a storage medium and executed by at least one processor to implement the various processes of the image processing method embodiment described above, and to achieve the same technical effect. To avoid repetition, further details are omitted here.
[0162] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0163] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0164] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An image processing method in a session, applied to a first electronic device, characterized in that, The method comprises the following steps: displaying a first image in a conversation interface; determining a target image when the relevance between the first image and a second image exceeds a threshold, wherein the second image is an image that has been sent by the first electronic device in a conversation corresponding to the conversation interface, and the first image is an image that is corrected by a user from the second image; sending the target image to the conversation; the determination of the target image comprises: determining the image obtained by splicing the first image and the second image as the target image; or determining the first image as the target image.
2. The image processing method in a conversation according to claim 1, wherein, Before the determination of the target image when the relevance between the first image and the second image exceeds the threshold, the method further comprises the following steps: determining that the relevance between the first image and the second image exceeds the threshold when the image similarity between the first image and the second image is greater than a first threshold; or determining that the relevance between the first image and the second image exceeds the threshold when the image type indicated by the first image matches the image type indicated by the second image.
3. The image processing method in a conversation according to claim 1, wherein, Before the determination of the target image when the relevance between the first image and the second image exceeds the threshold, the method further comprises the following steps: obtaining a message in the conversation corresponding to the conversation interface; determining that the relevance between the first image and the second image exceeds the threshold when the content of the message indicates that the second image meets a preset update condition.
4. The image processing method in a conversation according to claim 1, wherein, After the sending of the target image to the conversation, the method further comprises the following steps: withdrawing the first image and the second image when the first image has been sent to the conversation and the target image is the image obtained by splicing the first image and the second image; or withdrawing the second image when the first image has been sent to the conversation and the target image is the first image; or withdrawing the second image when the first image has not been sent to the conversation.
5. An image processing apparatus in a conversation, applied to a first electronic device, characterized in that, The device comprises: a display module configured to display a first image in a conversation interface; a determination module configured to determine a target image when the relevance between the first image and a second image exceeds a threshold, wherein the second image is an image that has been sent by the first electronic device in a conversation corresponding to the conversation interface, and the first image is an image that is corrected by a user from the second image; a sending module configured to send the target image to the conversation. The determination module is specifically configured to: determine the image obtained by splicing the first image and the second image as the target image; or determine the first image as the target image.
6. The image processing apparatus in a conversation according to claim 5, wherein, The determination module is specifically configured to: determine that the relevance between the first image and the second image exceeds the threshold when the image similarity between the first image and the second image is greater than a first threshold; or determine that the relevance between the first image and the second image exceeds the threshold when the image type indicated by the first image matches the image type indicated by the second image.
7. The image processing apparatus in a conversation according to claim 5, wherein, The determination module is specifically configured to: obtain a message in the conversation corresponding to the conversation interface; and determine that the relevance between the first image and the second image exceeds the threshold when the content of the message indicates that the second image meets a preset update condition. In a case where the content of the message indicates that the second image meets a preset update condition, it is determined that the relevance of the first image and the second image exceeds a threshold value.
8. The image processing apparatus in a conversation according to claim 5, wherein, The sending module is further configured to: In a case where the first image has been sent to the session and the target image is an image obtained by splicing the first image and the second image, the first image and the second image are withdrawn; Or, in a case where the first image has been sent to the session and the target image is the first image, the second image is withdrawn; Or, in a case where the first image has not been sent to the session, the second image is withdrawn.
9. An electronic device, comprising: A processor and a memory are included, the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the image processing method in a session as claimed in any one of claims 1-4.
10. A readable storage medium, characterized by, The readable storage medium stores programs or instructions thereon, and the programs or instructions, when executed by a processor, implement the steps of the image processing method in a session as claimed in any one of claims 1-4.
Citation Information
Patent Citations
An image stitching method and terminal
CN108984677A
Message processing method and device and electronic equipment
CN113518026A