Apparatus and method for enabling use of scan pipeline to capture and decode encoded data markings
A method includes, in executing at least one routine of a scan engine pipeline, decoding an encoded data marking within a scan image captured by a scan engine to retrieve data encoded in the encoded data marking, encoding the data in at least one new encoded data marking within at least one generated image, and providing the at least one generated image to a camera pipeline through a camera driver interface to a camera pipeline; in executing at least one routine of the camera pipeline, relaying the at least one generated image to a camera scan application through a camera API; and in executing the camera scan application, decoding the at least one new encoded data marking within the at least one generated image to retrieve the first data.
1 . A decoding device comprising:
a scan engine configured to capture a scan image of a first encoded data marking, wherein the scan engine is associated with a scan engine pipeline;
storage configured to store at least one of the scan image, a camera scan application configured to use a camera through a camera applications programming interface (API) to capture a camera image, at least one executable routine of a camera pipeline, and at least one executable routine of the scan engine pipeline; and
a processor communicatively coupled to the storage and to the scan engine, the processor configured to perform operations comprising:
in executing instructions of the at least one executable routine of the scan engine pipeline, perform pre-processing operations comprising decode the first encoded data marking within the scan image to retrieve first data encoded in the first encoded data marking, and encode the first data in at least one new encoded data marking within at least one generated image;
in executing instructions of the at least one executable routine of the scan engine pipeline, provide the at least one generated image to the at least one executable routine of the camera pipeline through a first camera driver interface of a first link formed between the scan engine pipeline and the camera pipeline, wherein characteristics of the first camera driver interface mimic characteristics of a second camera driver interface of a camera driver;
in executing instructions of the at least one executable routine of the camera pipeline, relay the at least one generated image to the camera scan application through the camera API; and
in executing instructions of the camera scan application, decode the at least one new encoded data marking within the at least one generated image to retrieve the first data.
2 . The decoding device of claim 1 , further comprising the camera and a display, wherein:
the processor is communicatively coupled to the camera;
the processor is communicatively coupled to the display; and
the processor, in response to commencement of execution of instructions of the camera scan application, is further configured to perform operations comprising:
retrieve stored configuration data that includes an indication of whether the camera scan application is associated with the camera or the scan engine; and
in response to the camera scan application being indicated as being associated with the scan engine, provide a command to an aiming component associated with the scan engine to project a visual aiming guide onto a surface of an object within a field of view (FOV) of the scan engine.
3 . The decoding device of claim 2 , wherein:
the at least one executable routine of the scan engine pipeline comprises a scanner service;
the at least one executable routine of the camera pipeline comprises a camera service that provides the camera API to the camera scan application;
the scanner service, the camera service and the camera scan application are executed by the processor within an architecture of an operating system; and
providing the command to the aiming component associated with the scan engine comprises the processor being configured to perform operations comprising:
use a registration process of the operating system to form a second link between the scanner service and the camera service;
relay the command from the camera service, and to the scanner service; and
within the scan engine pipeline, relay the command through the scan engine pipeline from the scanner service, and to the aiming component.
4 . The decoding device of claim 1 , wherein:
the at least one executable routine of the scan engine pipeline comprises a virtual camera HAL configured to provide the first camera driver interface;
the at least one executable routine of the camera pipeline comprises a camera HAL configured to communicate with the camera driver through the second camera driver interface;
the virtual camera HAL, the camera HAL and the camera scan application are executed by the processor within an architecture of an operating system; and
providing the at least one generated image to the at least one executable routine of the camera pipeline comprises the processor being configured to perform operations comprising:
use a registration process of the operating system to form the first link between the virtual camera HAL and the camera HAL; and
relay the at least one generated image from the virtual camera HAL, and to the camera HAL, with the characteristics of the first camera driver interface to present the scan engine to the camera HAL as if the scan engine is the camera.
5 . The decoding device of claim 4 , further comprising the camera, wherein:
the processor is communicatively coupled to the camera;
the at least one executable routine of the camera pipeline comprises the camera driver, wherein the camera driver is configured to provide the second camera driver interface; and
the processor, in response to commencement of execution of instructions of the camera scan application, is further configured to perform operations comprising:
retrieve stored configuration data that includes an indication of whether the camera scan application is associated with the camera or the scan engine;
condition communications between the camera HAL and the virtual camera HAL through the first camera driver interface, and the performance of at least the pre-processing operations on whether the camera scan application is indicated in the stored configuration data as being associated with scan engine; and
condition communications between the camera HAL and the camera driver through the second camera driver interface on whether the camera scan application is indicated in the stored configuration data as being associated with the camera.
6 . The decoding device of claim 1 , wherein:
the scan engine comprises a skew sensor configured to detect a degree of skew of a plane of a surface of an object that carries the first encoded data marking relative to a plane of the scan engine;
the at least one executable routine of the scan engine pipeline comprises a skew component configured to mitigate the degree of skew; and
the processor is configured to perform further pre-processing operations comprising, use the indication of the degree of skew to mitigate the degree of skew of the first encoded data marking to generate a rectified image of the first encoded data marking prior to the decoding of the first encoded data marking.
7 . The decoding device of claim 1 , wherein:
the at least one executable routine of the scan engine pipeline comprises a repair component configured to repair damage to, or obscuring of, the first encoded data marking;
the first encoded data marking is damaged or obscured such that a portion of the first encoded data marking is not visible; and
the processor is configured to perform a further pre-processing operation comprising repair the first encoded data marking to make the portion of the first encoded data marking visible to improve accuracy in decoding the first encoded data marking.
8 . The decoding device of claim 1 , wherein:
the first encoded data marking and the at least one new encoded data marking employ differing formats for the first data;
the generation of the at least one new encoded data marking comprises a conversion of the first data from a first format in which the first data is encoded in the first encoded data marking, and to a second format in which the first data is encoded in the at least one new encoded data marking; and
a difference between the first format and the second format comprises at least one of:
a bit width;
an ordering of bytes;
a delimiter;
a prefix; or
a suffix.
9 . The decoding device of claim 8 , wherein:
the first format is able to encode more data bits than and the second format;
the first data comprises a quantity of data bits that enables the first data to be encoded entirely within a maximum bit quantity of the first format of the first encoded data marking;
the first data comprises a quantity of data bits that does not enable the first data to be encoded entirely within a maximum bit quantity of the second format of a single encoded data marking of the at least one new encoded data marking; and
the processor is configured to perform further pre-processing operations comprising:
compare the quantity of data bits of the first data to the maximum bit quantity of the second format;
in response to the quantity of data bits of the first data exceeding the maximum bit quantity of the second format, split the first data into multiple portions, and encode each portion of the multiple portions within a separate new encoded data marking of the at least one new encoded data marking;
retrieve stored configuration data that includes an indication of whether multiple new encoded data markings are permitted to be included within a single generated image of the at least one generated image;
in response to an indication that multiple new encoded data markings are permitted to be included within a single generated image, generate multiple ones of the separate new encoded data markings within a single generated image of the at least one generated image; and
in response to an indication that multiple new encoded data markings are not permitted to be included within the single generated image, generate each separate new encoded data marking within a separate generated image of the at least one generated image.
10 . The decoding device of claim 1 , wherein:
the scan image includes a second encoded data marking in addition to the first encoded data marking; and
the processor is configured to perform further pre-processing operations comprising:
decode the second encoded data marking within the scan image to retrieve second data encoded in the second data marking;
retrieve stored configuration data that includes an indication of whether multiple new encoded data markings are permitted to be included within a single generated image of the at least one generated image;
in response to an indication that multiple new encoded data markings are permitted to be included within a single generated image, encode the first data in a first new data marking of the at least one new data marking within the single generated image of the at least one generated image, and encode the second data in a second new data marking of the at least one new data marking within the single generated image; and
in response to an indication that multiple new encoded data markings are not permitted to be included within the single generated image, encode the first data in the first new data marking within a first generated image of the at least one generated image, and encode the second data in the second new data marking within a second generated image of the at least one generated image.
11 . A method comprising:
in executing, by a processor of a decoding device, instructions of at least one executable routine of a scan engine pipeline of the decoding device, performing pre-processing operations comprising:
decoding, by the processor, a first encoded data marking within a scan image captured by a scan engine of the decoding device to retrieve first data encoded in the first encoded data marking; and
encoding, by the processor, the first data in at least one new encoded data marking within at least one generated image;
in executing, by the processor, instructions of the at least one executable routine of the scan engine pipeline, providing the at least one generated image to at least one executable routine of a camera pipeline of the decoding device through a first camera driver interface of a first link formed between the scan engine pipeline and the camera pipeline, wherein characteristics of the first camera driver interface mimic characteristics of a second camera driver interface of a camera driver;
in executing, by the processor, instructions of at least one executable routine of the camera pipeline, relaying the at least one generated image to a camera scan application of the decoding device through a camera applications programming interface (API), wherein the camera scan application is configured to use a camera through the camera API; and
in executing, by the processor, instructions of the camera scan application, decoding the at least one new encoded data marking within the at least one generated image to retrieve the first data.
12 . The method of claim 11 , further comprising, in response to commencement of execution of instructions of the camera scan application by the processor, performing operations comprising:
retrieving, by the processor, stored configuration data that includes an indication of whether the camera scan application is associated with the camera or the scan engine; and
in response to the camera scan application being indicated as being associated with the scan engine, providing, by the processor, a command to an aiming component associated with the scan engine to project a visual aiming guide onto a surface of an object within a field of view (FOV) of the scan engine.
13 . The method of claim 12 , wherein:
the at least one executable routine of the scan engine pipeline comprises a scanner service;
the at least one executable routine of the camera pipeline comprises a camera service that provides the camera API to the camera scan application;
the scanner service, the camera service and the camera scan application are executed by the processor within an architecture of an operating system; and
providing the command to the aiming component associated with the scan engine comprises performing operations comprising:
using, by the processor, a registration process of the operating system to form a second link between the scanner service and the camera service;
relaying, by the processor, the command from the camera service, and to the scanner service; and
within the scan engine pipeline, relaying, by the processor, the command through the scan engine pipeline from the scanner service, and to the aiming component.
14 . The method of claim 11 , wherein:
the at least one executable routine of the scan engine pipeline comprises a virtual camera HAL configured to provide the first camera driver interface;
the at least one executable routine of the camera pipeline comprises a camera HAL configured to communicate with the camera driver through the second camera driver interface;
the virtual camera HAL, the camera HAL and the camera scan application are executed by the processor within an architecture of an operating system; and
providing the at least one generated image to the at least one executable routine of the camera pipeline comprises performing operations comprising:
using, by the processor, a registration process of the operating system to form the first link between the virtual camera HAL and the camera HAL; and
relaying, by the processor, the at least one generated image from the virtual camera HAL, and to the camera HAL, with the characteristics of the first camera driver interface to present the scan engine to the camera HAL as if the scan engine is the camera.
15 . The method of claim 14 , wherein:
the at least one executable routine of the camera pipeline comprises the camera driver, wherein the camera driver is configured to provide the second camera driver interface; and
the method further comprises, in response to commencement of execution of instructions of the camera scan application by the processor, performing operations comprising:
retrieving, by the processor, stored configuration data that includes an indication of whether the camera scan application is associated with the camera or the scan engine;
conditioning, by the processor, communications between the camera HAL and the virtual camera HAL through the first camera driver interface, and the performance of at least the pre-processing operations on whether the camera scan application is indicated in the stored configuration data as being associated with scan engine; and
conditioning, by the processor, communications between the camera HAL and the camera driver through the second camera driver interface on whether the camera scan application is indicated in the stored configuration data as being associated with the camera.
16 . The method of claim 11 , wherein:
the scan engine comprises a skew sensor configured to detect a degree of skew of a plane of a surface of an object that carries the first encoded data marking relative to a plane of the scan engine;
the at least one executable routine of the scan engine pipeline comprises a skew component configured to mitigate the degree of skew; and
the method further comprises performing further pre-processing operations comprising using, by the processor, the indication of the degree of skew to mitigate the degree of skew of the first encoded data marking to generate a rectified image of the first encoded data marking prior to the decoding of the first encoded data marking.
17 . The method of claim 11 , wherein:
the at least one executable routine of the scan engine pipeline comprises a repair component configured to repair damage to, or obscuring of, the first encoded data marking;
the first encoded data marking is damaged or obscured such that a portion of the first encoded data marking is not visible; and
the method further comprises performing a further pre-processing operation comprising repairing, by the processor, the first encoded data marking to make the portion of the first encoded data marking visible to improve accuracy in decoding the first encoded data marking.
18 . The method of claim 11 , wherein:
the first encoded data marking and the at least one new encoded data marking employ differing formats for the first data;
the generation of the at least one new encoded data marking comprises a conversion of the first data from a first format in which the first data is encoded in the first encoded data marking, and to a second format in which the first data is encoded in the at least one new encoded data marking; and
a difference between the first format and the second format comprises at least one of:
a bit width;
an ordering of bytes;
a delimiter;
a prefix; or
a suffix.
19 . The method of claim 18 , wherein:
the first format is able to encode more data bits than and the second format;
the first data comprises a quantity of data bits that enables the first data to be encoded entirely within a maximum bit quantity of the first format of the first encoded data marking;
the first data comprises a quantity of data bits that does not enable the first data to be encoded entirely within a maximum bit quantity of the second format of a single encoded data marking of the at least one now encoded data marking; and
the method further comprises performing further pre-processing operations comprising:
comparing, by the processor, the quantity of data bits of the first data to the maximum bit quantity of the second format;
in response to the quantity of data bits of the first data exceeding the maximum bit quantity of the second format, splitting, by the processor, the first data into multiple portions, and encoding, by the processor, each portion of the multiple portions within a separate new encoded data marking of the at least one new encoded data marking;
retrieving, by the processor, stored configuration data that includes an indication of whether multiple new encoded data markings are permitted to be included within a single generated image of the at least one generated image;
in response to an indication that multiple new encoded data markings are permitted to be included within a single generated image, generating, by the processor, multiple ones of the separate new encoded data markings within a single generated image of the at least one generated image; and
in response to an indication that multiple new encoded data markings are not permitted to be included within the single generated image, generating, by the processor, each separate now encoded data marking within a separate generated image of the at least one generated image.
20 . The method of claim 11 , wherein:
the scan image includes a second encoded data marking in addition to the first encoded data marking; and
the method further comprises performing further pre-processing operations comprising:
decoding, by the processor, the second encoded data marking within the scan image to retrieve second data encoded in the second data marking;
retrieving, by the processor, stored configuration data that includes an indication of whether multiple new encoded data markings are permitted to be included within a single generated image of the at least one generated image;
in response to an indication that multiple new encoded data markings are permitted to be included within a single generated image, encoding, by the processor, the first data in a first new data marking of the at least one new data marking within the single generated image of the at least one generated image, and encoding, by the processor, the second data in a second new data marking of the at least one new data marking within the single generated image; and
in response to an indication that multiple new encoded data markings are not permitted to be included within the single generated image, encoding, by the processor, the first data in the first new data marking within a first generated image of the at least one generated image, and encoding, by the processor, the second data in the second new data marking within a second generated image of the at least one generated image.