In North America, digital cameras may nearly replace film cameras by 2008, according to InfoTrends/CAP Ventures, a digital-imaging market research firm in Weymouth, MA. The trend is being fueled partly by improvements in the digital sensors that capture images in lieu of film. The latest sensor is the X3 from Santa Clara, CA-based Foveon. It has three layers of silicon, as opposed to one in conventional sensors, which produce sharper, truer-colored photos. Until now the X3 was used only in professional-grade cameras, but Foveon partnered with Polaroid and this summer released an X3-based camera that retails for about $400. Here’s how it works, and how it compares to conventional digital technology and to film.