Image processing apparatus

文档序号:1409725 发布日期:2020-03-06 浏览:26次 中文

阅读说明:本技术 图像处理装置 (Image processing apparatus ) 是由 O·海克 N·沙哈姆 Z·法恩伯格 E·韦尔纳 于 2017-10-16 设计创作,主要内容包括:在示例中,包括图像处理器的装置被配置成:对图像执行边缘检测以检测多个边缘;基于检测到的多个边缘自动地识别横穿图像的路径;基于确定的路径将图像分割为两个相邻的子图像;并生成第一和第二打印数据使打印设备打印两个相邻的子图像。(In an example, an apparatus comprising an image processor is configured to: performing edge detection on the image to detect a plurality of edges; automatically identifying a path traversing the image based on the detected plurality of edges; segmenting the image into two adjacent sub-images based on the determined path; and generating first and second print data to cause the printing device to print two adjacent sub-images.)

1. A method of generating print data for a printing device, the method comprising:

receiving image data for an image, the image being non-printable on a single print of the printing device;

performing edge detection on the image to detect a plurality of edges;

automatically identifying a path traversing the image based on the detected plurality of edges;

segmenting the image into two adjacent sub-images based on the determined path; and

generating first print data and second print data to cause the printing device to print the two adjacent sub-images.

2. The method of claim 1, wherein identifying a path traversing the image based on the detected plurality of edges further comprises:

converting each edge of the plurality of edges into a profile;

generating a graph of the plurality of contours, wherein each contour is represented by a node in the graph, the graph having a plurality of arcs between the nodes, each arc representing a shortest distance between two nodes connected by the arc;

determining a shortest path between a source node and a destination node in the graph.

3. The method of claim 2, wherein generating the graph further comprises, for each node in the graph, identifying a predetermined number of nearest other nodes, and for each identified other node, generating an arc representing the shortest distance between the node and the other node.

4. The method of claim 2, wherein determining the shortest path comprises determining the shortest path using Dijkstra's algorithm.

5. The method of claim 1, further comprising:

converting the received image data into grayscale image data; and

wherein performing edge detection on the image comprises performing edge detection on the grayscale image data.

6. The method of claim 1, further comprising:

identifying a region of the image having a highest detected edge density; and

wherein the converting, the generating, and the determining are performed on image data corresponding to the identified region of the image.

7. The method of claim 6, wherein the region of the image comprises a predetermined width.

8. The method of claim 1, wherein performing edge detection on the image comprises performing edge detection using a Canny edge detection algorithm.

9. The method of claim 1, wherein segmenting the image into two neighboring sub-images based on the determined path further comprises: constructing a first binary mask and a second binary mask based on the determined path, wherein the first binary mask is an inverse of the second binary mask.

10. The method of claim 9, wherein segmenting the image into two adjacent sub-images further comprises applying alpha blending to a bounding region of the first binary mask and the second binary mask, the bounding region corresponding to the determined path.

11. The method of claim 9, wherein segmenting the image into two adjacent sub-images further comprises multiplying the image by the first binary mask to generate a first sub-image and multiplying the image by the second binary mask to obtain a second sub-image.

12. The method of claim 1, further comprising printing the respective first and second sub-images on the printing device based on the first and second print data.

13. A non-transitory computer-readable storage medium storing instructions that, when executed by one or more processors, cause the one or more processors to:

receiving image data for an image, the image being non-printable on a single print of a printing device;

performing edge detection on the image to detect a plurality of edges;

automatically identifying a path traversing the image based on the detected plurality of edges;

segmenting the image into two adjacent sub-images based on the determined path; and

generating first print data and second print data to cause the printing device to print the two adjacent sub-images.

14. The non-transitory computer-readable medium of claim 13, wherein the instructions, when executed by the one or more processors, cause the one or more processors to:

converting each edge of the plurality of edges into a profile;

generating a graph of the plurality of contours, wherein each contour is represented by a node in the graph, the graph having a plurality of arcs between the nodes, each arc representing a shortest distance between two nodes connected by the arc;

a shortest path between a source node and a destination node is determined in the graph.

15. An apparatus, comprising:

a processor; and

a memory storing instructions for:

receiving image data for an image, the image being non-printable on a single print of a printing device;

performing edge detection on the image to detect a plurality of edges;

converting each edge of the plurality of edges into a profile;

generating a graph of the plurality of contours, wherein each contour is represented by a node in the graph, the graph having a plurality of arcs between the nodes, each arc representing a shortest distance between two nodes connected by the arc;

determining a shortest path between a source node and a destination node in the graph;

based on the determined shortest path, segmenting the image into two adjacent sub-images; and

generating first print data and second print data to cause the printing device to print the two adjacent sub-images.

Background

The printing apparatus prints an image on a medium according to image data. The printing device may print an image that exceeds the printable size of the printing device by printing two or more sub-images that form a complete image. For example, prints of wallpaper, large commercial banners, and panoramic photographs may be printed by generating image data for two or more sub-images and printing each sub-image.

Drawings

Various features of the disclosure will be apparent from the following detailed description taken in conjunction with the accompanying drawings, which together illustrate the features of the disclosure, and in which:

fig. 1 is a schematic diagram showing an apparatus that generates print data according to an example;

FIG. 2a is a diagram illustrating example image data;

FIG. 2b is a diagram illustrating edges detected in the image data of FIG. 2a, according to an example;

FIG. 2c is a diagram illustrating the determination of a region of interest in the image data of FIG. 2a according to an example;

FIG. 2d is a diagram of a transition from an edge detected in the region of interest of FIG. 2c to a contour, according to an example;

FIG. 3 is an exemplary diagram including nodes representing the contours of FIG. 2d, according to an example;

FIG. 4 is a diagram of a determined path through an image, according to an example;

FIG. 5a is a diagram of a complementary binary mask based on the path of FIG. 4 according to an example;

FIG. 5b is a diagram of the complementary binary mask of FIG. 5a applying alpha blending, according to an example;

FIG. 6 is a diagram of neighboring sub-images generated by combining the complementary mask of FIG. 5b with the example image data of FIG. 2, according to an example;

fig. 7 is a diagram illustrating a method of generating print data according to an example; and

fig. 8 is a schematic block diagram of a computer system according to an example.

Detailed Description

In the following description, for purposes of explanation, numerous specific details are set forth for certain examples. Reference in the specification to "an example" or similar language means that a particular feature, structure, or characteristic described in connection with the example is included in at least one example, but not necessarily in other examples.

Certain examples described herein provide methods and systems for generating a printed image of an image that is not printable on a single print of a printing device. For example, prints of wallpaper, large commercial banners, and wide panoramic photographs may be too large to print on a single sheet of paper. One option for printing a oversized image is to print sub-images that contain a portion of the large image and the sub-images can be stitched together to generate a print of the large image.

A convenient way of generating sub-images is to digitally represent the complete image and use image processing techniques to divide the image into overlapping sub-images. For example, the image processor may be used to select an area of a large image to obtain a plurality of sub-images that may be printed on the printing device. Unfortunately, creating overlap regions between sub-images has a number of side effects. Depending on the paper processing accuracy of the printing apparatus used to print the sub-images, these side effects may be more or less visible in the final printout of the large image. For example, if the overlap area between sub-images is too large, the splice area between sub-images may become visible in the printout. Alternatively, if the overlap area is too small, the stitching line may still appear as a narrow strip between the sub-images. A deviation as small as ± 100 μm may make the stitching between sub-images recognizable to the human eye. Moreover, the shape of the splice used does not improve this situation. For example, even if a jagged or wavy stitch is used in the overlap region between sub-images instead of a straight line, the stitch can still be resolved by the human eye in the final printout. One reason for this is that naive (naive) stitching lines between sub-images (splitting features in larger images) result in lines between printed sub-images on printouts being easily identifiable.

In some examples herein, methods are described for stitching sub-images based on properties of features of the images themselves. The method is resilient to paper handling inconsistencies of the printing device. Furthermore, the resulting output print of large images does not contain easily identifiable stitching lines in the overlap region between the sub-images. With image processing techniques, a path is automatically determined in the overlap region between the sub-images in order to select the element with the lowest detectable likelihood from the perspective of visual inspection of the printed image. In particular, the methods and systems disclosed herein select image elements that effectively spoof the "pattern recognition" capability of the human eye when the image is examined. The image processing devices described herein may use one or more image processing techniques to identify particular elements in an image that result in improved stitching between adjacent sub-images. For example, in one case, the apparatus identifies a graphic edge in the image data corresponding to the image and automatically determines a path that follows one or more detected edges. The resulting line is less visible to the human eye than, for example, a line that segments two regions of the image, with greater similarity between the image attributes of the two regions.

Fig. 1 is a simplified schematic diagram of an apparatus 100 according to an example. Some examples described herein may be implemented in the context of apparatus 100. The apparatus 100 includes an image processor 110. The image processor 110 shown in fig. 1 includes a Central Processing Unit (CPU)120, a Graphics Processing Unit (GPU)130, and a memory 140, the memory 140 storing instructions 180 for automatically segmenting an image into two adjacent sub-images based on attributes of the image data. The CPU120 is arranged to process data such as image data. In this disclosure, "image data" may include any digital representation of an image, i.e., a numerical representation of a two-dimensional image, e.g., as pixels. A "sub-image" of an image comprises at least a portion of the image. Similarly, "sub-image data" may include a subset of the image data corresponding to the sub-image.

The apparatus 100 shown in fig. 1 is arranged to generate print data according to examples described herein. The image processor 110 is shown communicatively coupled to a printing device 150. Herein, "print data" includes any data operable to cause the printing device 150 to print an image, for example, instructions to cause the printing device 150 to deposit printing fluid at a location on a substrate to produce a printed output. In the apparatus 100 shown in fig. 1, the image processor 110 or the printing device 150 may be arranged to generate print data based on the image data. For example, the CPU120 of the image processor 110 may generate print data that may be sent to a printing device via the interface 160. Alternatively, a print controller (not shown in fig. 1) in the printing apparatus 150 may generate print data using image data received from the image processor 110.

In fig. 1, CPU120 is communicatively coupled to memory 140. The memory 140 may be any volatile or non-volatile memory arranged to store data, and may be a read-only or read-write memory. The CPU120 is communicatively coupled to the GPU 130. The GPU130 is a dedicated processing unit arranged to send and receive data from the CPU 120. According to one example, the GPU130 may receive image data from the CPU120 and render graphics that may be displayed on a graphics display. The GPU may also perform general purpose and print related image processing tasks that are not limited to rendering graphics on a display. The image processor 110 further includes an interface 170 that allows one or more graphical displays to be communicatively coupled to the image processor 110 and allows a user to interact with the image processor 110.

The apparatus 100 further comprises a printing device 150, the printing device 150 being coupled to the image processor 110 via an interface 160. The printing device 150 is arranged to receive image data and/or print data from the image processor 110. When instructed by the print controller to generate a printout on the substrate, the printing device 150 may generate a printout on the substrate according to the print data.

According to the examples described herein, the printing device 150 is limited to generating printouts according to certain printing parameters specified by the printing configuration data of the printing device 150. For example, the printing device 150 may generate a printout that is limited in one or more dimensions, such as length or width, for example, a maximum size of 1m x 0.5 m. Herein, an image defined by image data is considered to be "printable" by the printing device 150 if the print data can be transmitted to the printing device such that the printing device 150 can generate a printout from the print data, and is otherwise considered to be "unprintable".

In some examples of the apparatus 100 described herein, the image processor 110 is arranged to generate printable sub-images of the non-printable image. In particular, the image processor 110 is arranged to generate printable sub-images, wherein the resulting output from the printing device makes it difficult to discern the individually printed sub-images in the composite image that constitutes the original (non-printable) image in the final printout.

In FIG. 1, apparatus 100 is configured by instructions 180 to process image data for an image that is not printable on printing device 150, as now described.

According to a first example, the apparatus 100 may be arranged to receive image data from a device external to the apparatus 100. Alternatively, the CPU120 of the image processor 110 may access image data stored in the memory 140.

Once the image data is accessed, the image is divided into sub-images. Here, "dividing" an image into sub-images is dividing the image into a plurality of individual sub-images, which together form the image. In one example, the image processor 110 is configured to generate a division of the image into at least two adjacent sub-images. At least two adjacent sub-images having intersecting regions are selected and may or may not themselves be printed on the printing device 150.

The division may be performed in such a manner to ensure that the generated at least two adjacent sub-images are printable on the printing device 150. In one case, the user may check whether the division of the image into at least two adjacent sub-images makes the sub-image printable by checking whether the sub-image of the image conforms to the printing parameters of the printing device 150. Alternatively, the image processor 110 may be arranged to receive print configuration data from the printing device 150 and determine whether at least two adjacent sub-images are printable on the printing device 150.

In operation, the apparatus 100 is configured to automatically determine a path traversing an image represented by the image data from a first side of the image to a second, opposite side of the image, such that the path divides the image into two adjacent sub-images. According to an example, if the image is a color image, the image processor 110 first converts the color image into a grayscale image as shown in fig. 2 a. An edge detection algorithm is applied to the grayscale image to identify edges in the image. Example edge detection algorithms that may be used include Canny edge detection, Deriche edge detection, Sobel operators, Prewitt operators, and the like. Fig. 2b shows an example of an edge detected when the edge detection algorithm is applied to the image shown in fig. 2 a.

Once the edges in the image are identified, the image processor 110 is arranged to identify a region of interest 200 within the image, the region of interest 200 comprising a majority of the edges (e.g. a maximum density of detected edges). Fig. 2c shows a region of interest 200 selected from the detected edges shown in fig. 2 b. The region of interest 200 may have a predefined width (e.g., 100mm), or the width of the region of interest may depend on the size of the image or the capabilities of the printing device 150. All the graphic edges within the region of interest are converted to contours, and each contour within the region of interest 200 is assigned a unique number.

As shown in fig. 2d, there is typically no uninterrupted edge or contour across the entire width of the image. Thus, to identify a path across the image, the image processor 110 may select a plurality of contours to form portions of the path. According to an example, this may be achieved by applying graph-theoretic techniques to the detected edges within the region of interest 200. To this end, the contours may be mapped to nodes of a graph having a plurality of edges or arcs, in the graph, each arc coupling two nodes and corresponding to a weight of the shortest distance between two contours represented by the nodes in the image. That is, for any two points on the corresponding graphic edge, the weight is calculated as the shortest distance between two detected graphic edges in the image. FIG. 3 illustrates an exemplary graph representing nodes and weighted arcs between nodes.

To identify a path through the image for segmenting the image into two adjacent sub-images, the image processor 110 analyzes the graph to determine the shortest path through the graph based on the weight values associated with each arc. For example, in the example graph shown in FIG. 3, the shortest path between source node "1" and destination node "2" is determined. In some examples, Dijkstra's algorithm may be used to determine the shortest path through the graph.

According to some examples, rather than providing arcs between a node and all other nodes, the outline graph may include arcs of each node to subsets of other nodes (e.g., k neighbors of the node). This may significantly reduce the computational complexity of path determination, especially when k is a relatively small number (e.g. between 2 and 4 for k values).

The image processor 110 determines a path 400 from one side of the image to the other based on the determined shortest path through the graph. For example, the path of the through-image may be generated by combining the contours identified by the selected nodes with a linear portion representing the shortest distance between adjacent contours, as shown in FIG. 4. The image processor 110 is configured to divide the image into at least two adjacent sub-images based on a path 400 traversing the image.

According to one example, the path 400 traversing the image is used to generate the complementary binary masks 500, 502 shown in FIG. 5 a. These masks may be combined with the original image, for example by multiplying the mask with the image to generate two sub-images.

According to some examples, masks may be blurred or alpha blended to provide smoother inter-frame transitions when printing sub-images. The length and density of the blend can be controlled to reduce visible artifacts in the final printed image. Fig. 5b shows complementary masks 504, 506 with an alpha blend of 3 pixels long, 33% on one side and 67% on the other side.

In a non-ideal printing device, when printing sub-images, 33% of one sub-image plus 67% of another sub-image may not equal 100% density in the final printed image. To reduce the visibility of the stitching in the final printed image, in some examples, the gray level of the original digital image (corresponding to the alpha blending length) is reduced by a factor (e.g., 80%) within the transition region.

The image processor 110 may then multiply the generated complementary mask with the original image data to generate the two sub-images 600, 602 shown in fig. 6. This results in at least two modified adjacent sub-images, each of which can be printed on the printing device 150.

The apparatus 100 is configured to generate at least first and second print data operable to cause the printing device 150 to print at least first and second prints, respectively, based on a segmentation of adjacent sub-images by the automatically determined path. As previously mentioned, the image processor 110 may be arranged to generate print data from the image data after the image is divided between at least two adjacent sub-images. In an example, based on the automatically determined path 400, image data resulting from the image splitting into the at least two modified adjacent sub-images may be sent to the printing device 150, the printing device 150 being arranged to generate print data based on the received image data, e.g. at a print controller (not shown in fig. 1).

Similar to the at least two adjacent sub-images defined by the division of the image, the image processor 110 may determine whether a modified adjacent sub-image resulting from segmenting the spanning region between the adjacent sub-images can be printed on the printing device. In the event that the modified adjacent sub-image is not printable, a new partition may be determined that contains a printable adjacent sub-image or that causes the resulting modified sub-image to be printable.

FIG. 7 is a block diagram illustrating a method 700 of generating print data according to an example. The method 700 shown in FIG. 7 may be used in conjunction with the apparatus 100 shown in FIG. 1 to generate print data. At block 702, image data for an image that is not printable on a single print of a printing device is received. The image data may be received by the image processor 110 of the apparatus 100 shown in fig. 1. If the image data comprises a color image, the color image may be converted to grayscale before continuing the method. At block 704, edge detection is performed on the image data to detect a plurality of edges in the image, for example as shown in FIG. 2 b. At block 706, the path 400 traversing the image is automatically identified based on the detected edges. At block 708, the image is segmented into two adjacent sub-images based on the determined path through the image, thereby producing at least two adjacent sub-images that are printable on a single print of the printing device. At block 710, first and second print data corresponding to the first and second sub-images and operable to cause the printing device to print at least first and second prints, respectively, are generated. Additionally, print data may be sent to the printing device after block 710.

In some examples, the method includes identifying a region of interest in the image by identifying a region in the image having a greatest concentration of detected edges 200. The width of the region of interest may be determined based on the characteristics of the printing device, or may be a predetermined value, for example 100 mm. In some examples, the method includes converting the detected edges within the region of interest to contours and assigning a unique identification number to each contour within the region of interest 200.

In some examples, the method includes generating a graph having a plurality of nodes representing contours and arcs connecting pairs of the nodes, and assigning a weight to each arc, the weight assigned to each arc representing a shortest distance between two contours represented by respective nodes. In some examples, rather than providing arcs between one node and all other nodes, arcs corresponding to k nearest other nodes may be generated for each individual node, where k is equal to a relatively low number (e.g., for k between 2 and 4).

Graph analysis techniques may then be applied to determine a shortest path through the graph from a source node associated with one edge of the image to a destination node associated with another, opposite edge of the image. For example, Dijkstra's algorithm may be used. The nodes associated with the determined shortest path through the graph then define a contour that forms a path 400 across the image for segmenting the image into two adjacent sub-images.

According to some examples, the source node may represent a first contour 202 including a line aligned with a first edge of the region of interest, e.g., a line having the same width as the region of interest and spanning a first side of the region of interest. Similarly, the destination node may represent a second contour 204, the second contour 204 comprising a line aligned with a second edge opposite the first edge of the region of interest.

According to some examples, the method may further include generating complementary binary masks 500, 502 based on the path 400 through the image. Alpha blending may be applied to the edges of the complementary masks 504, 506 to provide a smoother frame-to-frame transition when printing the sub-images. The grayscale of the image in the transition region may be adjusted by a factor (e.g., 80%) to help further reduce the visibility of the stitching path in the final printed image.

Adjacent sub-images can then be generated by multiplying the original image data with a complementary mask (with or without alpha blending). This results in at least two modified adjacent sub-images, each of which can be printed on the printing device 150.

The methods and systems described herein provide a means for printing oversized images that are too large to print on a printing device. The naive stitching-based process prints sub-images of an image where the image is edge-to-edge entangled together, resulting in an unsatisfactory and low quality image print where the boundaries between sub-images are easily discerned. Due to the high pattern recognition capability of the human eye, even narrow overlapping regions between sub-images in a mosaic can be easily discerned in the final print. The present method and apparatus solves this problem by automatically determining a path through the image based on edges detected in the image, and segmenting the image based on the determined path, such that the resulting path between sub-images is difficult to detect in a visual inspection. This will result in a higher quality printout of the oversized image. The methods and apparatus disclosed herein produce seamless printouts of improved quality over the prior art.

Certain methods and systems described herein may be implemented by one or more processors that process program code retrieved from a non-transitory storage medium. Fig. 8 shows an example 800 of a device comprising a computer-readable storage medium 830 coupled to at least one processor 820. Computer-readable medium 830 may be any medium that can contain, store, or maintain the programs and data for use by or in connection with the instruction execution system. The computer readable medium may comprise any of a number of physical media, such as electronic, magnetic, optical, electromagnetic, or semiconductor media. More specific examples of a suitable machine-readable medium include, but are not limited to, a hard disk drive, Random Access Memory (RAM), Read Only Memory (ROM), erasable programmable read only memory (eprom), or a portable optical disk.

In fig. 8, a computer readable storage medium includes program code for: operation 802, receiving image data for an image, the image not printable on a single print of a printing device; an operation 804 of performing edge detection on the image to detect a plurality of edges; an operation 806 of automatically identifying a path through the image based on the detected edges; operation 808, segmenting the image into two adjacent sub-images based on the determined path; operation 810 and generating at least first and second print data operable to cause the printing device to print two adjacent sub-images.

The foregoing description has been presented to illustrate and describe examples of the principles described. This description is not intended to be exhaustive or to limit these principles to any precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is to be understood that any feature described in association with any one example may be used alone, or in combination with other features described, and may also be used in combination with any feature of any other example, or any combination of any other example.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:加速的深度学习

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!