Patent Publication Number: US-2015060550-A1

Title: Modular Focus System for Image Based Readers

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     Not applicable. 
     STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT 
     Not applicable. 
     BACKGROUND 
     The present invention relates to machine vision systems, and more particularly, to a modular focus system that enables an image-based ID, or code, reader to be operated as a manual focus reader and as a variable focus reader. 
     Machine vision systems use image acquisition devices such as cameras to capture images of various objects. These images are processed according to any number of decoding algorithms to obtain information about each of the imaged objects. Various identification and/or decision-making functions, such as for parts inspection, inventory, quality control, and the like, are made based on the obtained information. 
     An image-based code reader is a type of machine vision system. Images acquired for code reading, also known as direct part mark (“DPM”) or label-based identification, include one or more 1D (i.e., a barcode) or 2D s(i.e., a Data Matrix code) symbols located on an object. The code reading process includes repeatedly introducing an object marked with either 1D or 2D codes within a field of view of an image acquisition sensor (e.g., CMOS camera, CCD, etc.), illuminating the codes, and acquiring images, i.e., image data, containing the codes. Each code contains a set of predetermined patterns from which an attached data processor, such as a computer, can derive useful information about the object (e.g., serial number, type, model, price, etc.). 
     The image data acquired by the code reader, however, must be sufficiently focused for effective and repeatable processing. To this end, image-based code readers may be constructed as fixed focus, manual focus, and/or variable focus readers. Regardless of the reader type, a decodable image is obtained when the image data is sufficiently focused onto an image acquisition sensor arranged within a focal plane of the reader. 
     Fixed focus code readers have a lens that is not adjustable and therefore, are the most basic type of image-based code reader. The lens is fixed in place relative to an image sensor after undergoing a factory focus process to account for the variations of each lens. When installed, the target distance, i.e., the distance from the lens to the target object is dictated by the focal length of the reader. Understandably, fixed focus readers are very useful when the target distance is relatively constant or low resolution image data is acceptable. However, they become much less suitable when the target distance varies, such as with different-sized target objects, resulting in degraded images that cannot be reliably decoded. Although a fixed focus code reader may be repositioned to obtain a focused image or multiple readers may be installed at different target distances, neither solution is particularly desirable due to the increased complexity and associated costs. 
     Manual focus code readers overcome some of the drawbacks of fixed focus code readers. Manual focus code readers are similar to fixed focus readers but provide a limited ability to focus the reader by adjusting the lens instead of moving the reader. By way of background, a commercially available fixed-mount, image-based code reader  2  is illustrated in  FIG. 5 . The code reader  2  has an optical assembly  4  including a lens  6  fixedly mounted within a lens barrel  8 . The lens  6  focuses image data, i.e., reflected light from an image, onto an image plane  10  and an image sensor  20  aligned with the plane  10 . The reader  2  includes hardware (not shown) encoded with software that is configured to, among other things, control illumination, acquire image data, and process/decode the acquired image data into usable information. 
     The code reader  2  further includes a lens mount assembly  12  that supports the lens barrel  8  and a focus ring  14  for manually setting the focus position of the code reader  2 . These components are assembled about an optical axis  16  extending between a target object  18  (I.e., object to be imaged) and the image sensor  20 . The sensor  20  is positioned about the intersection of the optical axis  16  and the image plane  10  such that the image data is focused by the lens  6  onto the sensor  20 . 
     A distal end of the lens barrel  8  is secured via a threaded connection with a receptacle  22  formed within the lens mount assembly  12 . A proximal end of the lens barrel  8  has the focus ring  14  fixedly secured thereto. Because of the threaded connection, manual rotation of the focus ring  14  drives the lens barrel  8  further into or out of the receptacle  22 . This rotation is translated into an axial movement between the lens  6  and the image sensor  20 . 
     The lens mount assembly  12  is secured within a housing  24  and covered by a clear lens cover  26  to protect the optical and hardware components from environmental conditions such as dust and moisture. The cover  26  and a sealing gasket (not shown) are secured to the housing  24  with screws  40 . A cable  28  provides a communication link between the code reader  2  and another device, e.g., a host computer running a database application. The computer may generate a trigger signal for the code reader  102  and receive image data. The cable  28  also supplies power to the code reader  2 . 
     The manual focus code reader  2  is designed to be operated in one of a number of predetermined focus positions, each having a unique focal length and corresponding code reading distance range. Each focus position is indicated with an appropriate marking  30  (e.g., “40”, “65”, and “105”) on the focus ring  14 , indicating the optimal reading distances, in millimeters, set by the manufacturer. Each focus position has an corresponding slot  32  formed in the periphery of the focus ring  14 . The slots  32  are spaced about the focus ring  14  and receive a locking tab  34  formed in the lens cover  26 . The angular position of each slot  32  is determined by the corresponding predetermined focal length, i.e., the axial distance between the lens  6  and the image sensor  20 . 
     The focus ring  14  further includes a mechanical stop  36  to prevent the lens  6  from being rotated more than one complete revolution. The stop  36  is formed as a protrusion in the focus ring  14  that presses against a focus selector tab  38  when the focus ring  14  is at either end of the focusing range. The stop  36  limits axial movement of the lens  6  relative to the image sensor  20  to just less than one full rotation of the lens barrel  8 . 
     To set the focus position of the reader  2 , the focus ring  14  is manually adjusted to align a desired focus position setting  30  with the focus position selector tab  38 . The locking tab  34  prevents the lens barrel  8  from rotating when the cover  26  is on, thus ‘locking’ the lens  6  into one of the pre-established focus positions. The cover  26  can only be secured to the housing  24  when the pin  34  is aligned with and received by one of the focus position slots  32 . 
     Although manual focus code readers  2  provide some focusing flexibility as discussed above, changing the focus position of a code reader  2  is an involved and time consuming process. Further, the proper tools are needed to change the focus position of such a code reader  2 . Still further, the lens  6  and other internal components are potentially exposed to environmental conditions including dust, dirt, water, chemicals, and the like while the lens cover  26  is removed. 
     Variable focus code readers overcome many of the drawbacks of manual and fixed focus code readers. As used herein, the term “variable focus code reader” refers to code readers with an electrically controllable focus system and may be part of an autofocus system. Existing variable focus code readers have very small electromechanical components such as stepper or piezo-motors that move the lens with respect to the image sensor. However, these readers have a number of expensive electromechanical components, are prone to breakage, and have only a limited number of cycles. Further, conventional variable focus code readers may not have the required optical tolerances due to friction between the lens components, may consume a large amount of power, and have a low operating speed. As such, no known code readers have a modular focus system with interchangeable lens attachments such that a single code reader to be operated as a fixed focus, manual focus, or variable focus reader depending on which lens attachment is secured to the reader without the aforementioned drawbacks. 
     It is therefore desirable to have a focus system for a machine vision component, such as the code reader  2 , that combines the aforementioned focusing systems and overcomes the aforementioned drawbacks. It is further desirable to have a fixed or manual focus code reader that can easily be transformed into a variable focus code reader with the addition of a variable focus “add-on” or “accessory option” lens attachment. It is still further desirable to have a compact modular variable focus system with no moving parts and that does not expose the interior of the housing to the surrounding environment. 
     SUMMARY 
     In one embodiment, an image-based code reader includes a lens mount secured within a housing, a lens barrel rotatably received within the lens mount, a sensor for capturing image data reflected from a target object, an imager lens assembly secured within the lens barrel that focuses the image data onto the sensor, and a modular focusing system. The modular focusing system includes a first removable lens attachment having a focus ring disposed at a target-facing end and a retaining flange disposed at a sensor-facing end. When coupled to the lens barrel, the first lens attachment is rotated to focus the code reader. The modular focusing system may include a second removable lens attachment having a liquid lens mounted within a housing and a pair of electrodes in electrical contact with the liquid lens. When the second lens attachment is coupled to the lens barrel, electrical power is supplied to the liquid lens via the electrodes to focus of the code reader. 
     In another embodiment, a modular focus system for an image-based code reader includes a lens mount having a receptacle, a lens barrel at least partially disposed within the receptacle, an imager lens secured about an optical axis within the lens barrel for converging rays of reflected light from an object onto a sensor, and a plurality of removable lens attachments for adjusting the focus of the reader. The plurality of lens attachments include a manual focus lens attachment, able to be secured to the lens barrel such that rotation of the manual focus lens attachment translates into an axial movement of the imager lens with respect to the sensor, and a variable focus lens module, able to be secured to the lens barrel such that a liquid lens disposed therein is electrically connected to the code reader. 
     In yet another embodiment, a removable variable focus lens module for an image based code reader includes a housing having a base and a cover defining a cavity and an opening extending through the housing about a module axis, a first electrical contact disposed within the cavity having at least one electrode extending therefrom generally parallel to the module axis, a liquid lens element, a ring configured to center the liquid lens element about the module axis, a second electrical contact positioned in the cavity such that the first and second electrical contacts sandwich the liquid lens element, and a biasing element disposed between one of the first and second electrical contacts and one of the base and cover to hold the first and second contacts in electrical and mechanical contact with the liquid lens element. The variable focus lens module is able to be secured to the code reader such that the module axis generally aligns with an optical axis of the code reader. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a partially exploded perspective view of a first embodiment of a modular focus system for an image-based code reader in accordance with an aspect of the present invention; 
         FIG. 2  is a partially exploded perspective view of a second embodiment of a modular focus system in accordance with another aspect of the present invention; 
         FIG. 3  is a partially exploded perspective view of a third embodiment of a modular focus system in accordance with another aspect of the present invention; 
         FIG. 4  is a partially exploded perspective view of a fourth embodiment of a modular focus system in accordance with another aspect of the present invention; and 
         FIG. 5 , already described, is a perspective view of a fixed-mount, image-based code reader with a manual focus system according to the background art. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     A first embodiment of a modular focus system  100  for an image-based code reader  102  is illustrated in  FIG. 1 . The modular focus system  100  includes an optics assembly  104  having an imager lens assembly, or lens,  106  fixedly secured within a lens barrel  108  and arranged about an optical axis  116 . The modular focus system  100  further includes a number of removable, or ‘swappable’, lens attachments, each configured to be releasably secured to the code reader  102  depending on the requirements of each imaging application. 
     A first illustrated swappable lens attachment is a manual focus lens cap  107  having a barrel-shaped housing  127  with an integrally formed focus ring  114 . The manual focus lens cap  107  allows for manual focus adjustments of the code reader  102 . A second illustrated swappable lens attachment is a variable focus lens cap  109  having a generally cylindrical-shaped housing  128  with a liquid lens element  145  disposed therein. Not illustrated are other contemplated swappable lens attachments, including but not limited to telephoto lenses and filters, considered within the scope of this invention. 
     The lens barrel  108  includes a cylindrical base  111 , a radially smaller lens attachment mount  113 , and an annular shoulder  115  extending between the base  111  and the mount  113 . The lens barrel  108  is secured to the code reader  102  via a lens mount assembly  112 . The lens mount assembly  112  includes a cylindrical bore  117 , an adjacent lens attachment receptacle  119 , and an bore shoulder  121  formed at the juncture of the bore  117  and the receptacle  119 . 
     The lens barrel  108  is rotatably coupled to the lens mount assembly  112  via a threaded connection between the lens barrel base  111  and the bore  117 . When the base  111  is fully received within the bore  117 , the lens barrel shoulder  115  and the bore shoulder  121  are in close proximity with each other. The lens attachment mount  113  axially extends into the lens attachment receptacle  119  and is adapted to receive either of the swappable lens attachments  107 ,  109  when placed therein. The lens mount assembly  112  further includes angularly opposed key tabs  123  radially extending into the receptacle  119  and semicircular cutouts  189  radially extending outward from the receptacle  119 . 
     As further explained below, the key tabs  123  and cutouts  189  correspond to slots  125  and protrusions  159  formed in the housings  127 ,  128  of the lens attachments  107 ,  109  such that the lens attachments can only be coupled and decoupled to the lens barrel  108  at one predetermined angular position of the imager lens  106 . Thus, when a lens attachment  107 ,  109  is swapped out, the focal length, i.e., the distance between the lens  106  and the image sensor (not shown), is always the same as when the lens was factory focused. If the focal distance of the reader  102  was not fixed when swapping out attachments  107 ,  109 , the focus position indicia  130  would not be correct nor would any software-based focusing applicatins. 
     Still referring to  FIG. 1 , the housing  127  of the manual focus lens cap  107  includes an axially inner and outer face  129 ,  131  and radially inner and outer cylindrical walls  135 ,  139  extending therebetween. The focus ring  114  is integrally formed and constitutes the outer face  131 . As with the conventional focus ring  14 , the integral focus ring  114  includes a number of indicia  130  and associated slots  132  representing the pre-established focus positions and a mechanical stop  136 . An annular flange  137  having a pair of the aforementioned alignment slots  125  formed therein is disposed adjacent to the inner face  129 . An axial opening  133  is defined by the inner cylindrical wall  135  and extends fully between the inner face  129  and the outer face  129 ,  131 . 
     The manual focus lens cap  107  is coupled to the code reader  102  by aligning the slots  125  with the key tabs  123  on the lens mount  112  and urging the lens cap  107  into the receptacle  119 . As the lens cap  107  is received into the receptacle  119 , the inner housing wall  135  frictionally engages the lens attachment mount  113 . The lens cap  107  is urged further into the receptacle  119  until the inner face  129  abuts the lens barrel shoulder  115 . The lens cap  107  is affixed to the lens barrel  108  via a friction fit between the inner housing wall  135  and the lens attachment mount  113  or other mechanical retaining means such as a snap fit. 
     When coupled together, rotation of the lens cap  107  via the integral focus ring  114  causes the lens barrel  108  to rotate. Because of the threaded connection, radial movement of the lens barrel  108  translates into axial displacement of the lens  106  with respect to the image sensor. In this manner, the reader  102  is focused by positioning the focus ring  114  such that one of the focus position indicia  130  is aligned with a focus selector tab  138  on the lens mount  112 , thus operating at a pre-established focal length. 
     The keyed arrangement between the manual focus lens cap  107  and the receptacle  119  ensures that the lens cap  107  is placed onto and removed from the code reader  102  at a known focus, or angular, position. The position of the lens cap  107  when mounted to or removed from the code reader  102  corresponds to an established distance between the lens assembly  106  and the image sensor. The flange  137  prevents the lens cap  107  from being removed from the lens barrel  108  except when the slots  125  are aligned with the key tabs  123 . Thus, the distance between the lens  106  and the image sensor remains constant regardless of the number of times a lens attachment is removed and replaced with another one. 
     Still referring to  FIG. 1 , the housing  128  of the variable focus lens cap  109  includes a bowl-shaped base piece  141  having axially extending side walls  158  and a cover  143  having a cylindrical inner wall  161 . The housing  128  includes an axially inner and outer face  162 ,  164  and defines a generally cylindrical receiving space  165 . Within the receiving space  165 , the liquid lens  145 , secured within a spacer ring  147 , and is axially disposed between an inner and outer ring-shaped electrical contacts  149 ,  151 . A biasing member, such as a compressible ring  153 , maintains mechanical contact between the liquid lens  145  and the contacts  149 ,  151 . The base  141  and cover  143  are preferably bonded together with an appropriate fastening means. 
     Both the base and cover pieces  141 ,  143  have coaxial openings  157 ,  163  centered about a module axis  155 . The liquid lens  145 , contacts  149 ,  151 , and compressible ring  153  are also centered about the module axis  155  so as to form a pathway for image data to pass through the variable focus lens attachment  109 . When the variable focus lens attachment  109  is placed on the code reader, image data further passes through the lens barrel  108  and lens  106 , until reaching the image sensor. 
     The cover piece  143  includes the aforementioned projections  159 , each defining an alcove  167 . Each contact  149 ,  151  includes a ring-shaped body portion  186  and a tabbed extension  169  with an axially extending metal pin, i.e., electrode  173 , received within respective alcoves  167  of the cover  143 . The electrodes  173  are mechanically coupled to the contacts  149 ,  151  with an appropriate fastener such as solder, a metal washer and nut, and the like. 
     The base piece  141  includes extensions  178  with an indented portion  181  and a hole  183  to receive the respective electrodes  173 . Corresponding cutouts  179  are formed in the side walls  158  to accommodate the projections  159  in the cover  143 . The cutouts  179  and holes  183  align the contacts  149 ,  151  and pins  173  with power and ground receptacles  185  disposed in the lens mount assembly  112 . 
     The ring-shaped contacts  149 ,  151  are formed from a non-conducting substrate, such as used in printed circuit boards, although other appropriate shapes and materials may be used. The contacts  149 ,  151  include a ring-shaped trace  175  of conductive material, preferably copper, applied to a liquid lens-facing surface  177 . The trace  175  is electrically connected to the electrode  173  and extends between the tabbed extension  169  and the body  186 . When the variable focus lens cap  109  is placed on the code reader  102 , the electrodes  173  are electrically connected to a voltage source via the receptacles  185 . As such, a conductive path is provided between the code reader  102  and the liquid lens element  145  via the electrodes  173  and traces  175 . The biasing force applied to the contacts  149 ,  151  and liquid lens element  145  by the compressible ring  153  ensures constant electrical contact between the conductive traces  175  and the liquid lens element  145 . 
     The liquid lens element  145  enables very quick and precise focusing of the code reader  102  without mechanical components. The liquid lens  145  is electrically controlled, i.e., manipulated, with an electrowetting-based technique in order to focus image data passing through the lens attachment  109  prior to reaching the code reader  102 . Preferably, the liquid lens  145  contains two immiscible fluids: a conducting fluid and an insulating fluid, such as water and oil, respectively. One of the contacts  149 ,  151  charges the conducting fluid with reference to the other contact  149 ,  151  that is isolated from the conducting fluid by an insulator and a hydrophobic coating. The shape of the interface between the conductive fluid and the insulating fluid is affected proportionately to the applied voltage. In this way, the focal length of the lens  106 , and thus the focus of the reader  102  is controlled by software running in the controller of the code reader  102 . 
     Suitable liquid lens elements  145  include the FluidFocus™ variable focus lens available from the Philips Corporation and the Varioptic electrowetting variable focus lens assembly available from Varioptic SA of Lyon, France. Commonly assigned U.S. patent application Ser. No. 11/______, entitled SELECTABLE FOCUS DIRECT PART MARK READER, by Laurens W. Nunnink, the teachings of which are expressly incorporated herein by reference, teaches the structure and operation of a liquid lens element within a direct part mark code reader. 
     Like the manual focus lens cap  107 , the variable focus lens cap  109  is coupled to the code reader  102  by aligning the key slots  125  with the key tabs  123  and urging the lens cap  109  into the receptacle  119 . As the lens cap  109  is received into the receptacle  119 , the coaxial opening  157  in the base piece  141  receives the lens attachment mount  113 . The pins  173  and extensions  178  are received within the receptacles  185  and cutouts  189 , respectively. The lens cap  109  is pressed into the receptacle  119  until the inner face  162  abuts the lens barrel shoulder  115 . The variable focus lens cap  109  is retained to the lens barrel  108  via friction between the mount  113  and the axial opening  157  of the base piece  141  and between the electrodes  173  and the corresponding receptacles  185 . A slot  191  is provided in the cover  143  and arranged to interface with a locking tab  32  ( FIG. 5 ) in the lens cover  26  to further secure the lens attachment  109  to the code reader  102 . 
     Although not illustrated, the code reader  102  includes a processor with encoded software applications by which illumination can be provided, the liquid lens element  145  can be controlled, and images can be acquired, processed, and decoded into usable information. In one embodiment, the presence of the variable focus lens module  109  is detected by measurement of the impedance and/or capacitance of the liquid lens  145  and the code reader  102  is operated in a variable focus mode. When the module  109  is no longer detected, the code reader  102  resumes manual focus operation. 
     The variable focus lens cap  109  may be used in combination with a target range finder or focusing algorithm, to operate in an autofocus mode. In such a mode, the optimum focus setting for each target may be extrapolated by the code reader  102  based on the clarity of a preceding image of the same object. Commonly assigned U.S. Pat. No. 6,636,298, entitled METHOD AND APPARATUS FOR FOCUSING AN OPTICAL INSPECTION SYSTEM, to Bachelder, et al., the teachings of which are expressly incorporated herein by reference, teaches a method for determining an optimal focus setting of an optical imaging system. Alternatively, a range finder, infrared sensor, aiming illuminations, or other known method may be used to compute the distance between the code reader  102  and the object  18  and adjust the liquid lens  145  accordingly. Based on the determined focus setting, the code reader  102  applies a corresponding voltage across the liquid lens element  145  via the electrodes  149 ,  151 . The liquid lens element  145  is thus able provide sharp and clear images without the need for human intervention. Alternatively, the liquid lens  145  may be adjusted by an operator command. 
     Referring now to  FIG. 2 , a second embodiment of a modular focus system  200  for the image-based code reader  102  is shown. The modular focus system  200  includes an optics assembly  204  having a lens  206  fixedly secured within a lens barrel  208 , and two illustrated removable lens attachments, i.e., previously described manual focus lens cap  107  and a variable focus lens cap  209  having modified contacts  249 ,  251   
     As with the modular focus system  100  of  FIG. 1 , the variable focus lens cap  209  has a housing  229  including a base  241  and a cover  243 . The lens cap  209  further includes a liquid lens element  245  retained within a spacer ring  247 , the contacts  249 ,  251  sandwiching the liquid lens  245 , and an elastic ring  253 . The contacts  249 ,  251 , liquid lens  245 , and elastic ring  253  are assembled together within the housing  229  about a module axis  255 . 
     The inner contact  249  includes both electrodes  273 , each having a separate tracing  275   a,    275   b.  The outer contact  251  is formed entirely of a conducting material and includes a body  285  with an axially extending contact arm  266 . The contacts  249 ,  251  are assembled on respective sides of the liquid lens  245 , such that one tracing  275   a  is in direct contact with an axially-facing surface of the liquid lens  245  while the other tracing  275   b  is electrically connected to the opposite surface of the liquid lens  245  via the arm  266  and body  286  of the outer contact  251 . Functionally, the modular focus system  200 , including the two illustrated lens attachments  107 ,  209 , operates in the same manner as the focus system  100  of  FIG. 1 . 
     Referring now to  FIG. 3 , a third embodiment of a modular focus system  300  for the image-based code reader  102  is shown. The modular focus system  300  includes an optics assembly  304  having a lens  306  fixedly secured within a lens barrel  308 . The modular focus system  300  further includes a number of removable lens attachments, i.e., a manual focus lens cap  307  for manual focus and a variable focus lens cap  309  for variable focus operation. Unlike the embodiments shown in  FIGS. 1 and 2 , the third focus system  300  includes an intermediate coupling ring  310  fixedly secured to a lens attachment mount  313  on the lens barrel  308 . The coupling ring  310  is configured to receive either lens attachment  307 ,  309 . 
     The coupling ring  310  may be affixed to the lens barrel  306  with a press fit between angled ribs  314  on the mount  313  and the inner surface  316  of the coupling ring  310 . The manual focus lens cap  307  and the variable focus lens cap  309  each have mating extensions  318  are securely engaged by the inner surface  316  of the coupling ring  310  via a friction fit. Both lens attachments  307 ,  309  have an alignment tab  320  adapted to interface with an alignment notch  322  in the coupling ring  310  so as to ensure proper angular positioning when attached to the code reader  102 . The coupling ring  310  further includes a pair of cutouts  324  to accommodate electrode extensions  378  in the variable focus lens cap  309 . The manual focus cap  307  further includes a mechanical stop  336  to limit focus adjustment to less than one full rotation. 
     Referring now to  FIG. 4 , a fourth embodiment of a modular focus system  400  for the image-based code reader  102  is shown. The modular focus system  400  includes an optics assembly  404  having a lens  406  fixedly secured within a lens barrel  408 . The focus system  400  includes a removable variable focus lens cap  409  having a liquid lens element  445  fixedly secured within a barrel-shaped housing  428 . The housing  428  is formed of molded plastic and includes finger grips  415  to assist when placing the lens cap  409  on the code reader lens barrel  408 . 
     A focus ring  414  is fixedly secured to the lens barrel  408  after the reader  102  has been factory focused. Without the variable focus lens cap  409 , the reader  402  may operate in a manual focus mode, limited to one of the enumerated focus positions  430  of the lens  406 . The illustrated focus ring  414  has two enumerated focal length positions  430  (i.e., ‘40’ and ‘110’) corresponding to two pre established preset reading distance ranges, in millimeters, used by the software application for various decoding algorithms. 
     The focus ring  414  also has a third, variable focus, position  431 , (i.e., ‘LL’), corresponding to a third preset focus position. A cutout  420  is provided in the focus ring  414  radially opposite from the variable focus position  418 . To select the variable focus mode, the cutout  420  is axially aligned with a pair of receptacles  485  in a lens mount assembly  412 . The receptacles  485  are configured to receive axially extending electrodes  473  of the variable focus lens module  409 . The code reader  402  can only receive the variable focus lens cap  409  when the cutout  420  is aligned with the receptacles  485 . The variable focus lens module  409  is coupled to the lens barrel  408  via a press or snap fit between the lens barrel mount  413 . 
     Certain aspects of the present invention, therefore provide an interchangeable focus system for an image-based code reader via swappable lens attachments providing manual and variable focus mode operation. As illustrated and described above, the various focus systems have a variety of shapes and retaining methods. However, the modular focus system of the present invention is not limited to the above illustrated embodiments. Rather, the invention covers all modifications, equivalents, and alternatives falling within the spirit and scope of the invention as defined by the following appended claims. 
     The image-based code readers constructed in accordance with one or more aspects of the present invention are less expensive, as a basic code reader device can be turned to be a variable focus device with the addition of readily available accessories), and easier as sales only need one device which can easily be expanded or reduced by the modular swappable components.