The present invention relates to indicia reading devices, and more particularly to an indicia reading device utilizing multitasking decoding.
Indicia reading devices (also referred to as scanners, image reader, indicia readers, etc.) typically read data represented by printed indicia, (also referred to as symbols, symbology, bar codes, etc.) For instance one type of a symbol is an array of rectangular bars and spaces that are arranged in a specific way to represent elements of data in machine readable form. Indicia reading devices typically transmit light onto a symbol and receive light scattered and/or reflected back from a bar code symbol or indicia. The received light is interpreted by a processor which performs signal and/or image processing to extract the data represented by the symbol. Optical indicia reading devices typically utilize visible or infrared light. Laser indicia reading devices typically utilize transmitted laser light.
One-dimensional (1D) optical bar code readers are characterized by reading data that is encoded along a single axis, in the widths of bars and spaces, so that such symbols may be read from a single scan along that axis, provided that the symbol is sampled with a sufficiently high resolution along that axis.
In order to allow the encoding of larger amounts of data in a single bar code symbol, a number of 1D stacked bar code symbologies have been developed which partition encoded data into multiple rows, each including a respective 1D bar code pattern, some or all of which must be scanned and decoded, then linked together to form a complete message. Scanning still requires relatively higher resolution in one dimension only, but multiple linear scans at different locations on a second dimension are needed to read the whole symbol.
A class of bar code symbologies known as two dimensional (2D) matrix symbologies have been developed which require image based reading and offer greater data densities and capacities than 1D symbologies. 2D matrix codes encode data as dark or light data elements within a regular polygonal matrix, accompanied by graphical finder, orientation and reference structures.
Often times an optical reader may be portable and wireless in nature thereby providing added flexibility. In these circumstances, such readers form part of a wireless network in which data collected within the terminals is communicated to a host computer situated on a hardwired backbone via a wireless link. For example, the readers may include a radio or optical transceiver for communicating with a remote computer.
Some data collection devices, such as hand-held indicia readers, are capable of capturing images as well as reading barcodes. The reading and decoding of a barcode represents an operation distinct from that involved in capturing an image. The reading and decoding of a bar code involves the imaging and then decoding of a one or two dimensional graphic symbol into the alphanumeric, full ASCII or other data sequence encoded by the symbol. The capturing of an image involves storing an electronic visual copy/representation of the image.
Efforts regarding such systems have led to continuing developments to improve their versatility, practicality and efficiency.
The invention features a system and method for automatically discriminating between different types of data with an indicia reader. A human operator may aim a hand-held indicia reader at a target containing a form, information bearing indicia (IBI) or dataform, text, or other element and actuate a trigger on an indicia reader. An IBI or dataform may be an originally machine generated symbology that is also machine readable, such as a 1-D barcode, a 2-D barcode, a 1-D stacked barcode, a logo, glyphs, color-codes, and the like.
When using an embodiment of an indicia reader, a human operator may intuitively point the reader directly at the data to be collected, regardless of its type, and actuate a trigger.
Referring to
The receive optics 152 has a focal point wherein parallel rays of light coming from infinity converge at the focal point. If the focal point is coincident with the image sensor, the target (at infinity) is “in focus”. A target T is said to be in focus if light from target points are converged about as well as desirable at the image sensor. Conversely, it is out of focus if light is not well converged. “Focusing” is the procedure of adjusting the distance between the receive optics and the image sensor to cause the target T to be approximately in focus.
The target may be any object or substrate and may bear a 1D or 2D bar code symbol or text or other machine readable indicia. A trigger 115 may be used for controlling full or partial operation of the reader 14.
Image sensor 154 may be a one or two-dimensional array of pixels adapted to operate in a rolling shutter, global shutter or full frame operating mode which is a color or monochrome 2D CCD, CMOS, NMOS, PMOS, CID, CMD, etc. solid state image sensor. This sensor contains an array of light sensitive photodiodes (or pixels) that convert incident light energy into electric charge. Solid state image sensors allow regions of a full frame of image data to be addressed. An exemplary CMOS sensor is model number MT9V022 from Micron Technology Inc. or model number VC5602V036 36CLCC from STMicroelectronics.
Further description of image sensor operation is provided in commonly owned U.S. patent application Ser. No. 11/077,995 entitled “BAR CODE READING DEVICE WITH GLOBAL ELECTRONIC SHUTTER CONTROL” filed on Mar. 11, 2005, which is hereby incorporated herein by reference in it's entirety.
In a full frame (or global) shutter operating mode, the entire imager is reset before integration to remove any residual signal in the photodiodes. The photodiodes (pixels) then accumulate charge for some period of time (exposure period), with the light collection starting and ending at about the same time for all pixels. At the end of the integration period (time during which light is collected), all charges are simultaneously transferred to light shielded areas of the sensor. The light shield prevents further accumulation of charge during the readout process. The signals are then shifted out of the light shielded areas of the sensor and read out.
Features and advantages associated with incorporating a color image sensor in an imaging device, and other control features which may be incorporated in a control circuit are discussed in greater detail in U.S. Pat. No. 6,832,725 entitled “An Optical Reader Having a Color Imager” incorporated herein by reference. It is to be noted that the image sensor 154 may read images with illumination from a source other than illumination source 146, such as by illumination from a source located remote from the reader.
The output of the image sensor may be processed utilizing one or more functions or algorithms to condition the signal appropriately for use in further processing downstream, including being digitized to provide a digitized image of target T. Digitizing or digitization may be representing an object, an image, or a signal (usually an analog signal) by a discrete set of its points or samples. The result is called “digital representation” or, more specifically, a “digital image”, for the object, and “digital form”, for the signal. Digitization may be performed by reading an analog signal A, and, at regular time intervals (sampling frequency), representing the value of A at that point by an integer. Each such reading is called a sample.
A microcontroller 160 may perform a number of processing functions and be located on board with other components, such as the image sensor. The particulars of the functionality of microcontroller 160 may be determined by or based upon certain configuration settings or data which may be stored in remote or local memory 162, 166, 172. One such function may be controlling the amount of illumination provided by illumination source 146 by controlling the output power provided by illumination source power supply 144. Microcontroller 160 may also control other functions and devices.
An exemplary microcontroller 160 is a CY8C24223A made by Cypress Semiconductor Corporation, which is a mixed-signal array with on-chip controller devices designed to replace multiple traditional MCU-based system components with one single-chip programmable device. It may include configurable blocks of analog and digital logic, as well as programmable interconnects.
Microcontroller 160 may include a predetermined amount of memory 162 for storing firmware and data. The firmware may be a software program or set of instructions embedded in or programmed on the microcontroller which provides the necessary instructions for how the microcontroller operates and communicates with other hardware. The firmware may be stored in the flash memory (ROM) of the microcontroller as a binary image file and may be erased and rewritten. The firmware may be considered “semi-permanent” since it remains the same unless it is updated. This firmware update or load may be handled by a device driver.
The components in reader 14 may be connected by one or more bus 168, data lines or other signal or data communication form. Exemplary forms may be an Inter-IC bus such as a two wire interface (TWI), dedicated data bus, RS232 interface, USB, etc.
A TWI bus is a control bus that provides a communications link between integrated circuits in a system. This bus may connect to a host computer in relatively close proximity, on or off the same printed circuit board as used by the imaging device. TWI is a two-wire serial bus with a software-defined protocol and may be used to link such diverse components as the image sensor 154, temperature sensors, voltage level translators, EEPROMs, general-purpose I/O, A/D and D/A converters, CODECs, and microprocessors/microcontrollers.
A host processor 118 or a local processor 170 may be utilized to perform a number of functional operation, which may involve the performance of a number of related steps, the particulars of which may be determined by or based upon certain configuration settings stored in memory 166 which may be any one of a number of memory types such as RAM, ROM, EEPROM, etc. In addition some memory functions may be stored in memory 162 provided as part of the microcontroller 160. An exemplary processor may be a ST Microelectronics product number S™32F103 or MagnaChip Semiconductor product number MC521 EA.
An exemplary function of a processor 118, 170 may be to decode machine readable symbology provided within the target or captured image. One dimensional symbologies may include very large to ultra-small, Code 128, Interleaved 2 of 5, Codabar, Code 93, Code 11, Code 39, UPC, EAN, MSI, or other 1D symbologies. Stacked 1D symbologies may include PDF, Code 16K, Code 49, or other stacked 1D symbologies. 2D symbologies may include Aztec, Datamatrix, Maxicode, QR-code, or other 2D symbologies. UPC/EAN bar codes are used as the standard to mark retail products throughout North America, Europe and several other countries throughout the worlds. Decoding is a term used to describe the interpretation of a machine readable code contained in an image projected on the image sensor 154. The code has data or information encoded therein. Information respecting various reference decode algorithm is available from various published standards, such as by the International Standards Organization (“ISO”).
Imaging reader assembly 12 may also have an aiming generator light source 132, aiming aperture 133, aiming optics 136, an illumination source(s) 146 and illumination optics 148.
Illumination and aiming light sources with different colors may be employed. For example, in one such embodiment the indicia reader may include white and red LEDs, red and green LEDs, white, red, and green LEDs, or some other combination chosen in response to, for example, the color of the symbols most commonly imaged by the indicia reader. Different colored LEDs may be each alternatively pulsed at a level in accordance with an overall power budget.
Aiming pattern generator 130 may include a power supply 131, light source 132, aperture 133 and optics 136 to create an aiming light pattern projected on or near the target which spans a portion of the receive optical system 150 operational field of view with the intent of assisting the operator to properly aim the scanner at the bar code pattern that is to be read. A number of representative generated aiming patterns are possible and not limited to any particular pattern or type of pattern, such as any combination of rectilinear, linear, circular, elliptical, etc. figures, whether continuous or discontinuous, i.e., defined by sets of discrete dots, dashes and the like.
Generally, the aiming light source may comprise any light source which is sufficiently small or concise and bright to provide a desired illumination pattern at the target. For example, light source 132 for aiming generator 130 may comprise one or more LEDs, such as part number NSPG300A made by Nichia Corporation.
The light beam from the LEDs 132 may be directed towards an aperture 133 located in close proximity to the LEDs. An image of this back illuminated aperture 133 may then be projected out towards the target location with a lens 136. Lens 136 may be a spherically symmetric lens, an aspheric lens, a cylindrical lens or an anamorphic lens with two different radii of curvature on their orthogonal lens axis. Alternately, the aimer pattern generator may be a laser pattern generator.
The light sources 132 may also be comprised of one or more laser diodes such as those available from Rohm. In this case a laser collimation lens (not shown in these drawings) will focus the laser light to a spot generally forward of the scanning hear and approximately at the plane of the target T. This beam may then be imaged through a diffractive interference pattern generating element, such as a holographic element fabricated with the desired pattern in mind. Examples of these types of elements are known, commercially available items and may be purchased, for example, from Digital Optics Corp. of Charlotte, N.C. among others.
Indicia reader may include an illumination assembly 142 for illuminating target area T. Illumination assembly 142 may also include one or more power supplies 144, illumination sources 146 and illumination optics 148.
A communications module 180 provides a communication link from imaging reader 14 to other imaging readers or to other systems such as a server/remote processor 124.
The processor, memory and associated circuitry which performs or controls the exemplary image capture and decoding functions may be provided in the indicia reader assembly 12 or on associated circuit boards 15 which are located within the housing 116 of the indicia reader 14.
In an exemplary embodiment the illumination source may be a laser for reflecting laser light off the target. This may be referred to laser scanning wherein the reflected laser light is converted into signals reflected off an IBI into IBI signals representative of the converted light. An aiming pattern generator may not be necessary in such an embodiment if the illumination laser provides an aiming function in addition to an illumination function.
Exemplary functions of a processor or processors 118, 170 may be to facilitate operation of the image capture function, decoding functions, and operator interface functions. Operating software may be utilized to operate the processor for such functions seemingly simultaneously or in a multitasking role. An exemplary image reader operating software architecture may be organized into processes or threads of execution.
Utilizing multiple threads may be a way for a program to fork (or split) itself into two or more simultaneously (or pseudo-simultaneously) running tasks. Threads and processes may differ from one operating system to another. An exemplary definition of a thread is a path of execution. In an operating system, a thread consists of a copy of the system registers and a private stack space. This is known as the thread context. A process is comprised of one or more threads and memory space they can use. The memory space included in the process space is where each individual thread has its private stack space. Typically, different threads of the same process can share some resources while threads of different processes may not unless the operating system provides a method for doing so.
Multiple threads may be executed in parallel when a multi-core processor or multiple processors are available. On a single processor, multithreading generally occurs by time slicing (similar to time-division multiplexing), wherein the processor can cycle through the available threads. In this example the processing is not literally simultaneous, because the single processor is performing one function at a time. This switching may happen so fast the illusion of simultaneity is given to an end user. For example, one processor may run multiple programs at once, such as decoding an information bearing indicia (IBI) while evaluating an image being taken for future decoding. Though the user experiences these things as simultaneous the processor is quickly switching back and forth between these separate tasks. On a multiprocessor or multi-core system, true simultaneous threading may be achieved via multiprocessing, where different threads which are either from the same process or from multiple processes run simultaneously on different processors or cores.
As discussed, a single processor or single core processor may only run one thread at a time. A thread is run by loading that thread's register data, which is part of the thread context, into the processor registers. Once this is done, the program counter register will begin executing instructions and using data from the information loaded in the thread context.
Switching between different threads consists of swapping out the context data of the running thread from the processor's register space and replacing it with the context data of another thread. This starts by saving the register data currently in the processor into a first thread's context space, and then loading a second thread's register data from its context space into the processor registers.
Operating systems may schedule threads in one of two ways. Preemptive multithreading is an approach which allows the operating system to determine when a context switch should occur. Because the operating system is making that decision, a context switch can occur at any time. Therefore, developers of multithreaded applications in preemptive environments need to plan that context switches can occur anywhere. This involves putting protection around areas where memory is shared to ensure that the program cannot get into an undefined state. It also means making sure that software functions are reentrant, meaning that there are no places where having multiple threads call a function at the same time could either cause undefined states or cause the function to somehow not perform correctly. Cooperative multithreading, on the other hand, relies on the threads themselves to relinquish control once they are at a stopping point. This can make development simpler because the developer controls when a given thread stops execution, and therefore can ensure that sensitive areas run to completion. However, it can cause a problem if a thread is suspended with a valuable resource that another thread needs. In this case you may have one thread waiting for a resource which is held by a suspended thread, possibly resulting in a deadlock.
Referring to
Referring to
In
Events such as timeouts, a trigger pull 212, a trigger release 214, a periodic event, a synchronous event, an asynchronous event, a serial event, a communication event, or other events that affect the decoder will take action to drive a response in the decoder on the event occurrence.
In an exemplary embodiment, two responses by the decoder thread to an event may be to keep processing the image or stop processing the image. Part of the shell function operation, which is called by the application thread, may be the operation of creating the decoder thread. In this case, when an event occurred which makes it desirable to stop decoding, the event may terminate the decoding thread, thereby allowing the application thread to exit the decoder shell function almost immediately to grab a new image, create a new decoder thread and then restart the decoding thread again.
Sometimes the process of terminating and creating a new thread may be too slow, or due to the nature of thread termination may leave memory stack space allocated which may cause a memory leak by repeatedly terminating and creating new threads. Therefore, in an exemplary embodiment, the threads may be reset rather than terminated. The core of every thread is the thread context. The thread context contains a current register state, and memory stack information. The process of resetting of a thread may be accomplished by recording the thread context at a known location in the program, and reloading that thread context at the time when a thread is to be reset. When this is done, the thread will resume execution at the known location exactly as it performed when the context was recorded.
When a thread is terminated or reset, memory space allocated by that thread needs to be freed. This starts by either tracking the individual memory allocations performed by this thread, or having a dedicated heap space for that thread where all memory allocations are taken from. Upon termination or reset, all of the memory allocations granted to that thread are freed by one of the threads running on the system. In the case of terminating a thread, stack space also needs to be considered as memory allocated for that thread. When a thread is terminated and then created again, the same stack space could be used. Or if stack allocation is part of the thread creation routines, one needs to be sure that the stack of the thread being terminated has been freed.
Terminating or resetting of a decoding thread may happen anywhere at any time, being driven by an event. Because event handling may be done outside of the decoder, event response may have no bearing on decoder design.
In the polled event handling example represented in
In the exemplary embodiment illustrated in
In an exemplary embodiment, multiple threads (and different types of threads) may be running during reader operation. Exemplary threads are a scan driver thread, an application thread, an event handling thread, one or more decoder threads or other types of miscellaneous threads. The different threads may or may not run simultaneously. Some event recognized in the application thread may start the decoder thread.
What is described herein is an apparatus for collecting and processing information bearing indicia (IBI) comprising: a converter for converting light reflected off an IBI into IBI signals representative of the converted light; and, at least one processor adapted for: running at least one application process for acquiring the IBI signals and providing those IBI signals for signal processing; and, running at least one signal process for processing the IBI signals, wherein running of the at least one application process is independent of running of the at least one decoder process and wherein the at least one application process is adapted for resetting the at least one signal process.
In an exemplary embodiment, resetting may comprise suspending a thread and/or reloading a thread's context from a known location in the program and resuming the thread.
In an exemplary embodiment, resetting may comprise an application process and/or signal process clears memory allocated by the thread which was reset.
It should be understood that the programs, processes, methods and apparatus described herein are not related or limited to any particular type of computer or network apparatus (hardware or software). Various types of general purpose or specialized computer apparatus may be used with or perform operations in accordance with the teachings described herein. While various elements of the preferred embodiments have been described as being implemented in software, in other embodiments hardware or firmware implementations may alternatively be used, and vice-versa. The illustrated embodiments are exemplary only, and should not be taken as limiting the scope of the present invention. For example, the steps of the flow diagrams may be taken in sequences other than those described, and more, fewer or other elements may be used in the block diagrams. Also, unless applicants have expressly disavowed any subject matter within this application, no particular embodiment or subject matter is considered to be disavowed herein.
The claims should not be read as limited to the described order or elements unless stated to that effect. In addition, use of the term “means” in any claim is intended to invoke 35 U.S.C. §112, paragraph 6, and any claim without the word “means” is not so intended. Therefore, all embodiments that come within the scope and spirit of the following claims and equivalents thereto are claimed as the invention.
Number | Name | Date | Kind |
---|---|---|---|
5834753 | Danielson et al. | Nov 1998 | A |
5895906 | Danielson et al. | Apr 1999 | A |
7516899 | Laser | Apr 2009 | B2 |
20040004128 | Pettinelli et al. | Jan 2004 | A1 |
20060091219 | Joseph et al. | May 2006 | A1 |
20060283952 | Wang | Dec 2006 | A1 |
Number | Date | Country |
---|---|---|
WO 02029707 | Nov 2002 | WO |
Number | Date | Country | |
---|---|---|---|
20090242635 A1 | Oct 2009 | US |