Image segmentation processing method and processing system
By setting selection lines on the picture and adjusting the position of the selection box, the problem of difficulty in identifying picture content and moving the cropping frame in the existing technology is solved, achieving accurate acquisition of information content and simplification of operations, and is suitable for chat records and electronic documents. image processing.
Patent Information
- Application Number
- CN202011592196.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-29
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-12-29
AI Technical Summary
Existing image cropping technology cannot identify the image content, resulting in the separation of information content, affecting the authenticity and reliability of chat records, and the position of the cropping frame cannot be moved, making the operation complicated.
By setting selection lines on the picture, the position of the selection frame is adjusted to avoid information content segmentation, and the automatic generation and movement of the selection frame is realized to adapt to the interception of different image information and simplify operations.
It effectively avoids the segmentation of information content, improves the accuracy of information acquisition and the reliability of chat records, simplifies the operation process of adjusting the position of the cropping box, and is suitable for image processing of chat records and electronic documents.
Smart Images

Figure CN112541919B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a picture segmentation processing method and a processing system. Background Art
[0002] With the development of the Internet and image technology, people are increasingly communicating with each other through pictures. When communicating through pictures, not all information in the picture needs to be sent to the other party, so the picture needs to be cropped. The prior art provides a picture cropping method, which specifically includes: determining a current editing area selected by a user (i.e., a selected picture area), and cropping the current editing area selected by the user to form a new picture.
[0003] A Chinese patent document with application number 201010229385.0 and publication date 2016.2.3 discloses a method and system for cropping a picture. The method provides a method and system for cropping a picture, and the method specifically includes the following steps: determining a picture area selected by a user; obtaining an outer dimension value of the picture area; and dynamically adjusting a display position of the outer dimension value according to a positional relationship between the picture area selected by the user and the picture.
[0004] However, when cropping an image, the cropping method and system cannot identify the information content of the image, which may result in the same information content on the image being separated into upper and lower parts, which may make it impossible to accurately obtain information content from the image. In particular, when cropping a chat record image of the software, if the information content is cut into two parts, the information in the chat record will be confused, which will affect the authenticity and reliability of the chat record. At the same time, after the cropping method and system selects the capture position through the cropping frame, the position of the cropping frame cannot be moved. If the position of the capture frame needs to be adjusted, the capture position needs to be reselected on the image, which makes the operation complicated. Summary of the invention
[0005] The present invention provides a picture segmentation processing method and a processing system which can recognize text on a picture and avoid segmenting the text into upper and lower parts when cutting the picture.
[0006] To achieve the above object, the technical solution of the present invention is: a picture segmentation processing method, comprising the following steps.
[0007] (1) Add pictures to be processed.
[0008] (2-1). Determine the width and height of the selection box.
[0009] (4) If you are performing operation 2, proceed to step (8).
[0010] (8) Set the first selection line on the left side of the image to be processed; set the second selection line according to the selection box width value.
[0011] (9) Set a third selection line starting from the top of the image to be processed, and then move along the up and down direction of the image; determine the preset position of the next third selection line according to the height value of the selection box; after completion, proceed to step (9.1).
[0012] (9.1). Determine whether the preset position of the third selection line is located on the information content; if not, generate a selection box and proceed to step (9.3); if yes, proceed to step (9.2).
[0013] (9.2). If the preset position of the third selection line is close to the top of the information content, the third selection line is moved upward so that the third selection line is located above the information content; if the preset position of the third selection line is close to the bottom of the information content, the third selection line is moved downward so that the third selection line is located below the information content; and a selection box is generated; the moved third selection line is used as the starting point.
[0014] (9.3). Set the next third selection line according to the height value of the pre-selected box; then repeat step (9.2); when the selection box completes the segmentation of the image to be processed, proceed to step (11).
[0015] (11). Output image information.
[0016] The above method changes the interception position of the selection box on the image to be processed by adjusting the position of the third selection line; in this way, different image information can be intercepted; at the same time, when intercepting the chat record image, adjusting the preset position of the third selection line will not appear above the information content, so that the acquisition effect of the information content is good; at the same time, it can avoid the ambiguity of the information expressed in the chat record due to the failure to intercept the complete information content; at the same time, operation 2 generates a selection box through the selection box width value and the selection box height value, and then judges whether the third selection line on the selection box divides the information content on the image up and down; changes the position of the third selection line; and then generates the next selection box with the position of the third selection line as the starting point; in this way, the selection box is automatically generated and the operation is convenient; the position of the selection box on the image to be processed is changed by adjusting the selection box position movement value, so that the intercepted information of the selection box can be changed; when the interception position on the image to be processed needs to be changed, there is no need to regenerate the selection box, and the operation is simple and efficient; this scheme can intercept the upper information of the image to be processed to generate image information for storage.
[0017] Furthermore, step (8) is specifically as follows: the number of selection boxes is n, the adjustment heights of m selection boxes are set, the m selection boxes are located at the front end of the n selection boxes, if the height values of the first m selection boxes need to be set to be different from the selection box height value; then the adjustment heights of the first m selection boxes are set; if the height values of the first m selection boxes do not need to be set; a first selection line is set on the left side of the image to be processed; a direction of movement along the first selection line toward the right side of the image to be processed; a second selection line is set according to the selection box width value; and then step (9) is performed.
[0018] In the above method, because the picture information will be saved in the electronic document; and the headers will need to be set for the first few pages in the electronic document; the height of a page of the electronic document with a header will be reduced; by setting the height values of the first m selection boxes; changing the height values of the first m selection boxes; the image information generated in this way does not need to be resized again when saved in the electronic document; and the generated image information is convenient to use.
[0019] Furthermore, if it is necessary to set the height values of the first m selection boxes to be different from the height value of the selection box; the following steps are included.
[0020] (8.1). Input the value of m and adjust the height.
[0021] (8.2). Set a first selection line on the left side of the image to be processed; set a second selection line along the first selection line according to the selection box width value.
[0022] (8.3) Set a third selection line starting from the top of the image to be processed, and then follow the up and down direction of the image; determine the preset position of the next third selection line according to the adjusted height value; after completion, proceed to step (8.4).
[0023] (8.4). Determine whether the preset position of the third selection line is located on the information content; if not, generate a selection box and proceed to step (8.6); if yes, proceed to step (8.5).
[0024] (8.5) If the preset position of the third selection line is close to the top of the information content, the third selection line is moved upwards so that the preset position of the third selection line is above the information content; if the preset position of the third selection line is close to the bottom of the information content, the third selection line is moved downwards so that the preset position of the third selection line is below the information content; and a selection box is generated; the moved third selection line is used as the starting point.
[0025] (8.6). Set the next third selection line according to the preset adjustment height value of the mth selection box; then repeat step (8.4); when the m third selection lines are set, take the last third selection line as the starting point and set the next third selection line according to the preset height values of the n selection boxes; after the setting is completed, proceed to steps (9.1) to (11).
[0026] The above method adjusts the width of the adjacent third selection lines according to the value of m and the adjustment height value; thereby changing the height of the selection box; thus, the height adjustment of the first m selection boxes is achieved; after the m third selection lines are set, the last third selection line is used as the starting point, and the next third selection line is set according to the preset selection box height value until the selection box is set; thus, the value of m is set according to the number of pages on which the electronic document needs to set the header; thus, the image information saved in the electronic document does not need to be resized again.
[0027] Furthermore, step (11) is specifically as follows: capturing the image data within the selection box; generating naming data of the order in which the images are arranged in the upper and lower directions of the picture; and combining the naming data with the image data to generate image information output.
[0028] The above method generates naming data according to the arrangement sequence of the selection box and saves it in combination with the image data captured in the arrangement sequence of the selection box; this makes it convenient to check the position of the image information on the processed image.
[0029] Furthermore, after step (1), the method further includes:
[0030] (2) If the width of the image to be processed needs to be adjusted, enter the width value of the image after adjustment; if the height of the selection box needs to be adjusted, enter the height value of the selection box.
[0031] (3) If you need to adjust the selection box width, enter the selection box width value.
[0032] (4) If operation 1 is performed, proceed to step (5).
[0033] (5) Set a first selection line on the left side of the image to be processed; move along the first selection line toward the right side of the image to be processed; and set a second selection line according to the selection box width value.
[0034] (6) Set a third selection line starting from the top of the image to be processed, and then set multiple third selection lines along the up and down direction of the image; set multiple third selection lines according to the selection box height value; and generate a selection box; the selection box height value is the distance between adjacent third selection lines.
[0035] (7) Adjust the position of the third selection line along the up and down direction of the image; after all the third selection lines are adjusted, proceed to step (11).
[0036] The above method can adjust the size of the picture and the size of the selection box; at the same time, the selection box is translated to the right starting from the left side of the picture to be processed; the size of the selection box does not change during the movement; the picture can be adjusted by the width value after the picture is adjusted, and the picture to be captured can be enlarged or reduced; it is easy to use according to the usage situation; the operation of this solution is to generate a selection box through the selection box width value and the selection box height value, which is convenient for generating a fixed selection box.
[0037] Furthermore, the step (11) also includes: step (10). If the position of the selection box needs to be adjusted, the selection box position movement value is input; all selection boxes start from the left side of the image to be processed; and are shifted to the right according to the selection box position movement value. The above method can facilitate the overall movement of the position of the selection box.
[0038] Furthermore, in step (2): if the width of the image to be processed needs to be adjusted, then the adjusted width value of the image is input; specifically: according to the adjusted width value of the image, the image is scaled proportionally with the left fixed point of the image to be processed as the origin, so as to facilitate the adjustment of the image size.
[0039] The present invention also provides an image segmentation processing system, including an image processing module; the image processing module includes a selection box width and height preset module, a selection box width and height processing module, a selection box position processing module, an output module and a selection box, the selection box width and height preset module is connected to the selection box width and height processing module and the selection box, the selection box position processing module is connected to the selection box, and the selection box width and height processing module is connected to the output module.
[0040] The selection box is composed of a first selection line, a second selection line and a third selection line; there is more than one third selection line; the third selection line is located between the first selection line and the second selection line and is connected to the first selection line and the second selection line; the width of the selection box is the distance between the first selection line and the second selection line; the height of the selection box is the distance between adjacent third selection lines.
[0041] The selection box width and height preset module is used to preset the selection box width and height values; the selection box width and height processing module is used to set the first selection line on the left side of the image to be processed; set the second selection line according to the selection box width value; set a third selection line at the top of the image to be processed as the starting point, and then along the up and down direction of the image; determine the preset position of the next third selection line according to the selection box height value; determine whether the preset position of the third selection line is located on the information content; if not, generate a selection box, set the next third selection line according to the pre-selected box height value; if so, determine the preset position of the third selection line, if the preset position of the third selection line is close to the top of the information content, move the third selection line upward; make the third selection line above the information content; if the preset position of the third selection line is close to the bottom of the information content, move the third selection line downward; make the third selection line below the information content; and generate a selection box; the moved third selection line is used as the starting point to generate the selection box.
[0042] The selection box position processing module is used to move the position of the selection box if the selection box needs to be adjusted.
[0043] The output module is used to intercept the image data in the selection box, generate the naming data of the image arrangement order in the upper and lower directions of the picture, and output the naming data in combination with the image data.
[0044] The above settings adjust the width and height of the selection box and generate the selection box through the selection box width and height processing; in this way, the size of the selection box can be adjusted according to the size of the image to be captured; the selection box is moved on the image to be processed with the left side of the image to be processed as the starting point through the selection box position processing module; when the capture position on the image to be processed needs to be changed, there is no need to regenerate the selection box, and the operation is simple; at the same time, the size of the selection box does not change during the movement.
[0045] Furthermore, it also includes a picture width processing module and a manual adjustment module, and the manual adjustment module is connected to the selection box and the selection box width and height processing module.
[0046] The selection box height and width processing module is also used to adjust the selection box width and height if the selection box needs to adjust the selection box width and height, and regenerate the selection box.
[0047] The image width processing module is used to adjust the width of the image to be processed if the width of the image to be processed needs to be adjusted.
[0048] The manual adjustment module is used to adjust the position of the third selection line along the up and down direction of the picture if the position of the third selection line needs to be adjusted.
[0049] The above settings adjust the image to be processed through the image processing module; can enlarge or reduce the image to be captured; and are easy to use according to the usage situation; the adjustment of the position of the third selection line in operation one is achieved through the manual adjustment module; the capture position of the selection box on the image to be captured is changed; in this way, different image information can be captured; at the same time, when capturing the chat record image, the position of the third selection line is adjusted to achieve a good effect in obtaining the information content; at the same time, it can avoid ambiguity in the information expressed in the chat record due to failure to capture the complete information content.
[0050] Furthermore, it also includes a height adjustment module connected to the selection box width and height processing module, which is used for setting the number of selection boxes to n, setting m selection boxes as the front end of the n selection boxes, and if the height value of the first m selection boxes needs to be set to be different from the height value of the selection boxes; then the height adjustment size of the first m selection boxes is set. With the above setting, the height of a page with a header in the electronic document will be reduced; by setting the height adjustment module, the height values of the first m selection boxes are set; in this way, the image information generated in this way does not need to be resized again when it is saved in the electronic document. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 The flowchart of the processing method of the present invention is shown in FIG.
[0052] Figure 2 It is a schematic diagram of the structure of the present invention.
[0053] Figure 3 The figure is a schematic diagram of the structure for adjusting the position of the selection box of the present invention.
[0054] Figure 4 A schematic diagram of the structure for setting the height adjustment of the first m selection boxes of the present invention. DETAILED DESCRIPTION
[0055] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0056] like Figure 1-4 As shown; a picture segmentation processing system, including a picture processing module and a modification module; the picture processing module includes a selection box width and height preset module, a picture width processing module, a selection box width and height processing module, a selection box position processing module, a manual adjustment module, a height adjustment module, an output module and a selection box 2. The selection box width and height preset module is connected to the selection box width and height processing module and the selection box, the selection box position processing module is connected to the selection box, and the selection box width and height processing module is connected to the output module.
[0057] The selection box width and height preset module is used to preset the selection box width and height values.
[0058] The image width processing module is used to adjust the width of the image to be processed if the width of the image 1 to be processed needs to be adjusted.
[0059] The marquee width and height processing module generates a marquee and if the marquee needs to adjust the marquee width and marquee height, adjust the marquee width and marquee height, and regenerate the marquee. The marquee width and height processing module is also used to set a first selection line on the left side of the image to be processed; set a second selection line according to the marquee width value; set a third selection line at the top of the image to be processed as the starting point, and then along the up and down direction of the image; determine the preset position of the next third selection line according to the marquee height value; determine whether the preset position of the third selection line is located on the information content; if not, generate a marquee, set the next third selection line according to the pre-marquee height value; if so, determine the preset position of the third selection line, if the preset position of the third selection line is close to the top of the information content, move the third selection line upward; make the third selection line above the information content; if the preset position of the third selection line is close to the bottom of the information content, move the third selection line downward; make the third selection line below the information content; and generate a marquee; the moved third selection line is used as the starting point to generate a marquee.
[0060] The selection box position processing module is used to move the position of the selection box if the selection box needs to be adjusted.
[0061] The manual adjustment module is used to adjust the position of the third selection line along the up and down direction of the picture if the position of the third selection line needs to be adjusted.
[0062] The height adjustment module is connected to the selection box width and height processing module; the height adjustment module is used for setting the number of selection boxes to be n, setting the m selection boxes as the front end of the n selection boxes, and if the height values of the first m selection boxes need to be set to be different from the selection box height value; then the height adjustment size of the first m selection boxes is set. In this embodiment, m is 2.
[0063] The output module is used to intercept the image data in the selection box, generate the naming data of the image arrangement order in the upper and lower directions of the picture, and output the naming data in combination with the image data.
[0064] The selection box is composed of a first selection line 21, a second selection line 22 and a third selection line 23; there are more than one third selection line; the third selection line is located between the first selection line and the second selection line and is connected to the first selection line and the second selection line; the width of the selection box is the distance between the first selection line and the second selection line; the height of the selection box is the distance between adjacent third selection lines.
[0065] The image to be processed is adjusted by the image processing module; the image to be intercepted can be enlarged or reduced; it is easy to operate according to the usage situation; the width and height of the selection box are adjusted by the selection box width and height processing and the selection box is generated; in this way, the size of the selection box can be adjusted according to the size of the image to be intercepted; the selection box is moved on the image to be processed with the left side of the image to be processed as the starting point by the selection box position processing module; when the interception position on the image to be processed needs to be changed, there is no need to regenerate the selection box, and the operation is simple; at the same time, the size of the selection box does not change during the movement; the adjustment of the position of the third selection line in operation one is realized by the manual adjustment module; the interception position of the selection box on the image to be processed is changed; in this way, different image information can be intercepted; at the same time, when intercepting the chat record image, the position of the third selection line is adjusted to obtain a good effect on the information content; at the same time, it can avoid that the information expressed in the chat record is ambiguous due to the failure to intercept the complete information content; because the height of a page with a header in the electronic document will be reduced; the height values of the first n selection boxes are set by setting the height adjustment module; in this way, the image information generated in this way does not need to be resized again when it is saved in the electronic document.
[0066] The modification module includes a document modification module, an image modification module, a name modification module and a storage module; the document modification module is used to add a document if the document information is modified, and save the modified document in the storage module; the image modification module is used to process the width and height of more than one image if it is necessary to process the width and height of more than one image, and save the modified image in the storage module; the name modification module is used to modify the name of the document or image if it is necessary to modify the name of the document or image.
[0067] The document modification module determines the key information before the document is modified and the key information after the document is modified. The key information before the document is modified includes the content before the document is modified; the key information after the document is modified includes the content after the document is modified; in another embodiment, the key information before modification also includes the name of the subject to which the content before modification belongs, and the search scope is narrowed by limiting the subject name, so that the search efficiency is high.
[0068] The picture modification module includes a picture height conversion module, a picture width conversion module and a picture format conversion module; the picture height conversion module is used to adjust the height of the picture if the picture needs to be adjusted in height; the picture width conversion module is used to adjust the width of the picture if the picture needs to be adjusted in width; the picture format conversion module is used to select the output format of the picture if the picture format needs to be changed.
[0069] like Figure 1 As shown; the present invention comprises the following steps:
[0070] (1) Add pictures to be processed.
[0071] (2-1). Determine the width and height of the selection box.
[0072] (2) If the width of the image to be processed needs to be adjusted, enter the width value of the image after adjustment; if the height of the selection box needs to be adjusted, enter the height value of the selection box.
[0073] (3) If you need to adjust the selection box width, enter the selection box width value.
[0074] (4) If operation 1 is performed, proceed to step (5); if operation 2 is performed, proceed to step (8).
[0075] (5) Set a first selection line on the left side of the image to be processed; move along the first selection line toward the right side of the image to be processed; and set a second selection line according to the selection box width value.
[0076] (6) Set a third selection line starting from the top of the image to be processed, and then set multiple third selection lines along the up and down direction of the image; set multiple third selection lines according to the selection box height value; and generate a selection box; the selection box height value is the distance between adjacent third selection lines.
[0077] (7) Adjust the position of the third selection line along the up and down direction of the image; after all the third selection lines are adjusted, proceed to step (11).
[0078] (8). Set the first selection line on the left side of the image to be processed; set the second selection line according to the selection box width value.
[0079] (9) Set a third selection line starting from the top of the image to be processed, and then move along the up and down direction of the image; determine the preset position of the next third selection line according to the height value of the selection box; after completion, proceed to step (9.1).
[0080] (9.1). Determine whether the preset position of the third selection line is located on the information content; if not, generate a selection box and proceed to step (9.3); if yes, proceed to step (9.2).
[0081] (9.2). If the preset position of the third selection line is close to the top of the information content, the third selection line is moved upward so that the third selection line is located above the information content; if the preset position of the third selection line is close to the bottom of the information content, the third selection line is moved downward so that the third selection line is located below the information content; and a selection box is generated; the moved third selection line is used as the starting point.
[0082] (9.3). Set the next third selection line according to the height value of the pre-selected box; then repeat step (9.2); when the selection box completes the segmentation of the image to be processed, proceed to step (10).
[0083] (10) If you need to adjust the position of the selection box, enter the selection box position movement value; all selection boxes start from the left side of the image to be processed; move to the right according to the selection box position movement value. The above method can easily move the position of the selection box as a whole.
[0084] (11). Output image information.
[0085] (12) If the document needs to be modified, determine the content of the document before and after the modification, as well as the subject content of the document before the modification, and then replace the content of the document before the modification with the content of the document after the modification.
[0086] (13) If you need to modify the image sizes in batches, modify the sizes of one or more images to the size of the modified images based on the determined size of the modified images.
[0087] The above method can adjust the size of the picture and the size of the selection box; at the same time, the selection box is translated to the right starting from the left side of the picture to be processed; the size of the selection box does not change during the movement; the picture can be adjusted by the width value after the picture is adjusted, and the picture to be captured can be enlarged or reduced; it is easy to use according to the usage situation; the operation of this solution is to generate a selection box through the selection box width value and the selection box height value, which is convenient for generating a fixed selection box. By adjusting the position of the third selection line, the interception position of the selection box on the image to be processed is changed; in this way, different image information can be intercepted; at the same time, when intercepting the chat record image, adjusting the preset position of the third selection line will not appear above the information content, so that the acquisition effect of the information content is good; at the same time, it can avoid that the complete information content is not intercepted, which leads to ambiguity in the information expressed in the chat record; at the same time, operation 2 generates a selection box through the selection box width value and the selection box height value, and then judges whether the third selection line on the selection box divides the information content on the image up and down; changes the position of the third selection line; and then generates the next selection box with the position of the third selection line as the starting point; in this way, the selection box is automatically generated and the operation is convenient; by adjusting the selection box position movement value, the position of the selection box on the image to be processed is changed, so that the intercepted information of the selection box can be changed; when the interception position on the image to be processed needs to be changed, there is no need to regenerate the selection box, and the operation is simple and efficient; this scheme can intercept the upper information of the image to be processed to generate image information for storage.
[0088] The information content includes text, pictures, videos and / or emoticon information in the image to be processed. In another embodiment, if the information content includes two kinds of information contents arranged in parallel, the uppermost end of the two kinds of information contents arranged in parallel is taken as the uppermost end of the information content, and the lowermost end of the two kinds of information contents arranged in parallel is taken as the lowermost end of the information content. Then, the positions of the uppermost end and the lowermost end are determined as the content range of the information content. For example, if a row in the image includes images and texts, and the height of the upper end of the image is higher than the height of the upper end of the texts, and the height of the lower end of the image is lower than the height of the lower end of the texts, then the uppermost end of the information content is defined as the top of the image, and the lowermost end of the information content is defined as the bottom of the image. This facilitates the moving operation in step (9.2).
[0089] The above method:
[0090] In step (2): if the image to be processed needs to be adjusted in width, then input the width value of the image after adjustment; specifically, scale the image proportionally based on the width value of the image after adjustment with the left fixed point of the image to be processed as the origin, so as to facilitate the adjustment of the image size.
[0091] Step (8) is specifically as follows: the number of selection boxes is n, the adjustment heights of m selection boxes are set, the m selection boxes are located at the front end of the n selection boxes, if the height values of the first m selection boxes need to be set to be different from the selection box height value; then the adjustment heights of the first m selection boxes are set; if the height values of the first m selection boxes do not need to be set; a first selection line is set on the left side of the image to be processed; a direction of movement along the first selection line toward the right side of the image to be processed; a second selection line is set according to the selection box width value; and then step (9) is performed.
[0092] In the above method, because the picture information will be saved in the electronic document; and the headers will need to be set for the first few pages in the electronic document; the height of a page of the electronic document with a header will be reduced; by setting the height values of the first m selection boxes; changing the height values of the first m selection boxes; the image information generated in this way does not need to be resized again when saved in the electronic document; and the generated image information is convenient to use.
[0093] Step (8) is specifically: if it is necessary to set the height values of the first m selection boxes to be different from the height value of the selection box; it includes the following steps;
[0094] (8.1). Input the value of m and adjust the height.
[0095] (8.2). Set a first selection line on the left side of the image to be processed; set a second selection line along the first selection line according to the selection box width value.
[0096] (8.3) Set a third selection line starting from the top of the image to be processed, and then follow the up and down direction of the image; determine the preset position of the next third selection line according to the adjusted height value; after completion, proceed to step (8.4).
[0097] (8.4). Determine whether the preset position of the third selection line is located on the information content; if not, generate a selection box and proceed to step (8.6); if yes, proceed to step (8.5).
[0098] (8.5) If the preset position of the third selection line is close to the top of the information content, the third selection line is moved upwards so that the preset position of the third selection line is above the information content; if the preset position of the third selection line is close to the bottom of the information content, the third selection line is moved downwards so that the preset position of the third selection line is below the information content; and a selection box is generated; the moved third selection line is used as the starting point.
[0099] (8.6). Set the next third selection line according to the preset adjustment height value of the mth selection box; then repeat step (8.4); after the m third selection lines are set, take the last third selection line as the starting point and set the next third selection line according to the preset height values of the n selection boxes; after the setting is completed, proceed to steps (9.1) to (11).
[0100] In this embodiment, m is 2; the width of the adjacent third selection lines is adjusted according to the value of m and the adjustment height value; thereby changing the height of the selection box; in this way, the height adjustment of the first m selection boxes is achieved; when the m third selection lines are set, the last third selection line is used as the starting point, and the next third selection line is set according to the selection box height value until the selection box is set; in this way, the value of m is set according to the number of pages on which the electronic document needs to set the header; the image information saved in the electronic document does not need to be resized again.
[0101] Step (11) specifically includes: intercepting the image data in the selection box; generating the naming data of the arrangement order of the image in the upper and lower directions of the picture; and combining the naming data and the image data to generate the image information output. When outputting, the output format of the image data is selected. In this embodiment, the output format includes JPG format, PNG format, GIF format, BMP format and TIF format; the naming data is generated according to the arrangement order of the selection box and combined with the image data intercepted in the arrangement order of the selection box to save; this makes it convenient to check the position of the image information on the processed picture. The method of outputting different formats is a prior art and will not be described here.
[0102] The information content includes text, pictures, videos or emoticon information in the image to be processed, etc. If there are multiple information contents between the two third selection lines, it is determined whether the preset position of the third selection line in step (8.5) and step (9.2) is close to the top of the topmost information content or the bottom of the bottommost information content.
Claims
1. A picture segmentation processing method, characterized in that: The following steps are involved: (1). Add pictures to be processed; After step (1), the method further includes: (2) If the image to be processed needs to be adjusted in width, enter the width value of the image after adjustment; if the selection box height needs to be adjusted, enter the selection box height value; (3) If you need to adjust the selection box width, enter the selection box width value; (4). If operation 1 is performed, proceed to step (5); (5) Set a first selection line on the left side of the image to be processed; move along the first selection line toward the right side of the image to be processed; set a second selection line according to the selection box width value; (6) Set a third selection line starting from the top of the image to be processed, and then set multiple third selection lines along the up and down direction of the image according to the selection box height value; and generate a selection box; the selection box height value is the distance between adjacent third selection lines; (7). Adjust the position of the third selection line along the vertical direction of the image; after all the third selection lines are adjusted, proceed to step (11); (2-1). Determine the width and height of the selection box; (4). If operation 2 is performed, proceed to step (8); (8). Set the first selection line on the left side of the image to be processed; set the second selection line according to the selection box width value; Step (8) is specifically as follows: the number of selection boxes is n, the adjustment heights of m selection boxes are set, the m selection boxes are located at the front of the n selection boxes, if the height values of the first m selection boxes need to be set to be different from the selection box height value; then the adjustment heights of the first m selection boxes are set; if the height values of the first m selection boxes do not need to be set; a first selection line is set on the left side of the image to be processed; a second selection line is set along the first selection line according to the selection box width value; and then step (9) is performed; If the height values of the first m selection boxes need to be set to be different from the height value of the selection box; the following steps are included; (8.1). Input the value of m and adjust the height value; (8.2). Set a first selection line on the left side of the image to be processed; set a second selection line along the first selection line according to the value of the selection box width; (8.3) Set a third selection line starting from the top of the image to be processed, and then follow the up and down direction of the image; determine the preset position of the next third selection line according to the adjusted height value; after completion, proceed to step (8.4); (8.4). Determine whether the preset position of the third selection line is located on the information content; if not, generate a selection box and proceed to step (8.6); if yes, proceed to step (8.5); (8.5). If the preset position of the third selection line is close to the top of the information content, the third selection line is moved upwards, so that the preset position of the third selection line is located above the information content; if the preset position of the third selection line is close to the bottom of the information content, the third selection line is moved downwards, so that the preset position of the third selection line is located below the information content; and a selection box is generated; the moved third selection line is used as the starting point; (8.6). Set the next third selection line according to the preset adjustment height value of the mth selection box; then repeat step (8.4); after the m third selection lines are set, take the last third selection line as the starting point and set the next third selection line according to the preset height values of the n selection boxes; after the setting is completed, proceed to step (9.1)-step (11); The value of m is set according to the number of pages of the electronic document that need to set the header; (9). Set a third selection line starting from the top of the image to be processed, and then move along the up and down direction of the image; determine the preset position of the next third selection line according to the height value of the selection box; after completion, proceed to step (9.1); (9.1). Determine whether the preset position of the third selection line is located on the information content; if not, generate a selection box and proceed to step (9.3); if yes, proceed to step (9.2); (9.2). If the preset position of the third selection line is close to the top of the information content, the third selection line is moved upwards so that the third selection line is located above the information content; if the preset position of the third selection line is close to the bottom of the information content, the third selection line is moved downwards so that the third selection line is located below the information content; and a selection box is generated; the moved third selection line is used as the starting point; (9.3). Set the next third selection line according to the height value of the pre-selected box; then repeat step (9.2); when the selection box has completed the segmentation of the image to be processed, proceed to step (11); (11). The information on the image to be processed is captured to generate image information and saved.
2. The image segmentation processing method according to claim 1, characterized in that: Step (11) specifically includes: capturing the image data within the selection box; generating naming data of the order in which the images are arranged in the upper and lower directions of the picture; and combining the naming data with the image data to generate image information output.
3. The image segmentation processing method according to claim 1, characterized in that: The step (11) also includes: step (10). If the selection box position needs to be adjusted, a selection box position movement value is input; all selection boxes start from the left side of the image to be processed; and are shifted to the right according to the selection box position movement value.
4. The image segmentation processing method according to claim 1, characterized in that: In step (2): if the image to be processed needs to be adjusted in width, then input the width value of the image after adjustment; specifically: scale the image proportionally based on the width value of the image after adjustment with the left fixed point of the image to be processed as the origin.
5. A picture segmentation processing system, characterized in that: It includes an image processing module; the image processing module includes a selection box width and height preset module, a selection box width and height processing module, a selection box position processing module, an output module and a selection box, the selection box width and height preset module is connected to the selection box width and height processing module and the selection box, the selection box position processing module is connected to the selection box, and the selection box width and height processing module is connected to the output module; The selection frame is composed of a first selection line, a second selection line and a third selection line; there is more than one third selection line; the third selection line is located between the first selection line and the second selection line and connected to the first selection line and the second selection line; the selection frame width is the distance between the first selection line and the second selection line; the selection frame height is the distance between adjacent third selection lines; The selection box width and height preset module is used to preset the selection box width and height values; The selection box width and height processing module is used to set a first selection line on the left side of the image to be processed; set a second selection line according to the selection box width value; set a third selection line starting from the top of the image to be processed, and then along the up and down direction of the image; determine the preset position of the next third selection line according to the selection box height value; determine whether the preset position of the third selection line is located on the information content; if not, generate a selection box, and set the next third selection line according to the preset selection box height value; if so, determine the preset position of the third selection line, and if the preset position of the third selection line is close to the top of the information content, the third selection line moves upward; The third selection line is positioned above the information content; if the preset position of the third selection line is close to the bottom of the information content, the third selection line is moved downward; Position the third selection line below the information content; And generate a selection box; the moved third selection line is used as the starting point to generate a selection box; The selection box position processing module is used to move the position of the selection box if the selection box needs to be adjusted; The output module is used to intercept the image data in the selection box, generate the naming data of the order in which the image is arranged in the upper and lower directions of the picture, and output the naming data in combination with the image data; It also includes a picture width processing module and a manual adjustment module, and the manual adjustment module is connected to the selection box and the selection box width and height processing module; The selection box height and width processing module is also used to adjust the selection box width and the selection box height if the selection box needs to adjust the selection box width and the selection box height, and regenerate the selection box; The image width processing module is used to adjust the width of the image to be processed if the image to be processed needs to adjust its width; The manual adjustment module is used to adjust the position of the third selection line along the up and down direction of the picture if the position of the third selection line needs to be adjusted; It also includes a height adjustment module connected to the selection box width and height processing module, which is used for setting the number of selection boxes to be n, setting the m selection boxes as the front end of the n selection boxes, and if the height values of the first m selection boxes need to be set to be different from the height value of the selection box; then setting the adjustment height size of the first m selection boxes; The value of m is set according to the number of pages of the electronic document for which headers need to be set.
Citation Information
Patent Citations
Picture cropping method and system
CN102339457A
Picture capturing method and picture capturing device
CN103927178A
Picture cutting method and device
CN104504649A
Picture processing method and device
CN104504712A
Photo shooting processing method and device
CN104836957A
