The hardware and programming of lane boundary identification system, which based on the hardware platform of DM642, designed. The system complete the functions of acquiring image data, optimizing acquired data by ant algorithm, comparing value by the objective function, exporting image of lane boundary and so on. For the sake of improving the real time capability further, optimize code by way of methods, which include the optimization of compiler, intrinsic function, packaging data, using pipeline technique, and assembly code, giving specific optimization methods and real time capability of algorithm affected by each process. As a result the identification time of system reduced from 101.75 ms to 20.55ms, improved the system of real time capability effectively, laying a good foundation for industry.