EX-5 5 coghwd.txt LEGAL OPINION July 22, 2002 Cognex Corporation One Vision Drive Natick, MA 01760 Dear Ladies and Gentlemen: We are counsel to Cognex Corporation, a Massachusetts Corporation (the "Company"), and as such counsel we are familiar with the corporate proceedings taken in connection with the adoption of the Company's 1998 Stock Incentive Plan and the amendment thereof adopted in July 2001 (collectively the "Plan"). We are also familiar with the Registration Statement on Form S-8 to which a copy of this opinion will be attached as an exhibit. As such counsel, we have examined the corporate records of the Company including its Restated Articles of Organization, as amended, By-laws, Minutes of Meetings of its Board of Directors and Stockholders and such other documents as we have deemed necessary as a basis for the opinions herein expressed. Based upon the foregoing, and having regarding for such legal considerations as we deemed relevant, we are of the opinion that: 1. The Company is validly existing as a corporation and in good corporate standing under the laws of the Commonwealth of Massachusetts. 2. The Company has duly reserved 9,743,798 shares of common stock, $.002 par value per share ("Common Stock") for issuance under the Plan. 3. The shares of Common Stock issuable pursuant to the Plan have been duly authorized, and when issued in accordance with the terms of the Plan, such shares will be validly issued, fully paid and nonassessable shares of capital stock of the Company to which no personal liability will attach. We hereby consent to the filing of this opinion as an exhibit to the Registration Statement on Form S-8 and to reference to us under the caption "Interest of Named Experts and Counsel" in the Registration Statement. Very truly yours, /s/Hutchins, Wheeler & Dittmar Hutchins, Wheeler & Dittmar A Professional Corporation