Image processing device, image processing method, and non-transitory recording medium
Abstract
An image processing device includes a label memory to store a first label assigned to a pixel in a previous line of a processing target image subjected to an assignment process prior to the assignment process on a processing target line of the processing target image, a label area memory to store identification information identifying a label area including pixels assigned with an identical label, and circuitry to, if at least one target pixel in the processing target line is an effective pixel, perform the assignment process on the target pixel based on at least one label that includes the first label and is assigned to at least one peripheral pixel peripheral to the target pixel, and to perform an updating process of updating the identification information based on a position of the target pixel and the label assigned to the target pixel.
Claims
exact text as granted — not AI-modifiedThe invention claimed is:
1. An image processing device, comprising:
a label memory to store a first label assigned to a previous-stage pixel included in a previous line subjected to an assignment process of assigning a label to a pixel, prior to the assignment process on a processing target line, the previous line and the processing target line both included in a processing target image to be subjected to the assignment process;
a label area memory to store identification information that identifies a label area that includes pixels assigned with an identical label; and
circuitry configured to,
when a target pixel in the processing target line is determined to be an effective pixel by comparing a value of the target pixel to a threshold, perform the assignment process on the target pixel and assign a label to the target pixel based on at least one label that includes the first label and is assigned to at least one peripheral pixel that is peripheral to the target pixel,
when the target pixel in the processing target line is the effective pixel, convert the first label into a second label with conversion information, and perform the assignment process on the target pixel based on at least one label that includes the second label and is assigned to the at least one peripheral pixel that is peripheral to the target pixel, the conversion information including the first label and the second label associated with the first label, the first label assigned to the previous-stage pixel included in each of the label areas prior to integration, and the second label newly assigned to an integrated label area, and
perform an updating process of updating the identification information based on a position of the target pixel and the label assigned to the target pixel.
2. The image processing device of claim 1 , wherein the circuitry is further configured to update the conversion information when a plurality of label areas different from the first label assigned to the previous-stage pixel included in each of the label areas are integrated into the integrated label area by the updating process.
3. The image processing device of claim 2 , further comprising a conversion information memory to store the conversion information with the first label representing an address and the second label stored at the address,
wherein the circuitry is further configured to access a plurality of addresses in the conversion information memory, in parallel, to update the second label at the plurality of addresses in parallel.
4. The image processing device of claim 3 , wherein when the assignment process of assigning the label to the target pixel in the processing target line is completed, the circuitry is further configured to input the first label at an address in the label memory to the conversion information memory as a read address of the conversion information memory to acquire the second label, and write the acquired second label back to the address in the label memory to update the label memory.
5. The image processing device of claim 4 , wherein the label memory includes a plurality of memories, and
wherein the circuitry is further configured to access the plurality of memories, in parallel, to update the label memory.
6. The image processing device of claim 3 , wherein when the assignment process of assigning the label to the target pixel in the processing target line is completed, the circuitry is further configured to match the address in the conversion information memory to the second label stored at the address in the conversion information memory to initialize the conversion information memory.
7. The image processing device of claim 1 , further comprising a plurality of memory elements each storing 1-bit information of a corresponding label indicating whether the corresponding label is used,
wherein the circuitry is further configured to search through the plurality of memory elements in parallel to acquire any unused label.
8. The image processing device of claim 7 , wherein when the assignment process on the processing target image is completed, the circuitry is further configured to search through the plurality of memory elements in parallel to acquire any used label, acquire, from the label area memory, the identification information of the label area identified with the used label, and notify a processor of the identification information acquired from the label area memory.
9. The image processing device of claim 1 , wherein the at least one peripheral pixel includes an upper pixel and a left pixel, the upper pixel being located above the target pixel, and the left pixel located to a left of the target pixel,
wherein when the processing target line is at an upper end of the processing target image, a label of the upper pixel is determined to be an invalid label, and
wherein when the target pixel is at a left end of the processing target line, a label of the left pixel is determined to be an invalid label.
10. The image processing device of claim 1 , wherein the circuitry is further configured to determine whether the target pixel is the effective pixel by determining whether a brightness value of the target pixel exceeds the threshold.
11. An image processing method, comprising:
storing, in a label memory, a first label assigned to a previous-stage pixel included in a previous line subjected to an assignment process of assigning a label to a pixel prior to the assignment process on a processing target line, the previous line and the processing target line both included in a processing target image to be subjected to the assignment process;
storing, in a label area memory, identification information that identifies a label area that includes pixels assigned with an identical label;
based on a determination that a target pixel in the processing target line is an effective pixel by comparing a value of the target pixel to a threshold, performing the assignment process on the target pixel and assign a label to the target pixel based on at least one label that includes the first label and is assigned to at least one peripheral pixel that is peripheral to the target pixel;
when the target pixel in the processing target line is the effective pixel, converting the first label into a second label with conversion information, and performing the assignment process on the target pixel based on at least one label that includes the second label and is assigned to the at least one peripheral pixel that is peripheral to the target pixel, the conversion information including the first label and the second label associated with the first label, the first label assigned to the previous-stage pixel included in each of the label areas prior to integration, and the second label newly assigned to an integrated label area; and
updating the identification information based on a position of the target pixel and the label assigned to the target pixel.
12. A non-transitory recording medium storing a program for causing a computer to execute an image processing method, comprising:
storing, in a label memory, a first label assigned to a previous-stage pixel included in a previous line subjected to an assignment process of assigning a label to a pixel prior to the assignment process on a processing target line, the previous line and the processing target line both included in a processing target image to be subjected to the assignment process;
storing, in a label area memory, identification information that identifies a label area that includes pixels assigned with an identical label;
based on a determination that a target pixel in the processing target line is an effective pixel by comparing a value of the target pixel to a threshold, performing the assignment process on the at least one target pixel and assign a label to the target pixel based on label that includes the first label and is assigned to at least one peripheral pixel that is peripheral to the target pixel;
when the target pixel in the processing target line is the effective pixel, converting the first label into a second label with conversion information, and performing the assignment process on the target pixel based on at least one label that includes the second label and is assigned to the at least one peripheral pixel that is peripheral to the target pixel, the conversion information including the first label and the second label associated with the first label, the first label assigned to the previous-stage pixel included in each of the label areas prior to integration, and the second label newly assigned to an integrated label area; and
updating the identification information based on a position of the target pixel and the label assigned to the target pixel.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.