

                                   EXHIBIT 5.1

                               Opinion of Counsel


May 18, 1998


Advanced Machine Vision Corporation
2067 Commerce Drive
Medford, OR 97504

Re:   Registration Statement on Form S-3

Gentlemen:

At your request,  we have examined the  Registration  Statement on Form S-3 (the
"Registration Statement") which has been prepared for filing with the Securities
and  Exchange  Commission  under the  Securities  Act of 1933,  as amended  (the
"Act"),  relating to 652,500  shares of Class A Common Stock,  no par value (the
"Shares"),  420,000 of which are  issuable  upon the  exercise of certain  stock
options,  200,000 of which are  restricted  shares  requiring  the holder to pay
$1.80 per share to the  Company and to remain in the employ of the Company for a
certain period of time prior to transferring such restricted  shares, and 32,500
of which are  restricted  shares  requiring the holders not to trade such shares
until January 1, 1999. All  capitalized  terms not defined herein shall have the
definitions ascribed to them in the Registration Statement.

We have examined  such records of the Company as in our judgment were  necessary
or appropriate to enable us to render the opinions expressed herein.  Based upon
the  foregoing,  it is our  opinion  that the Shares  have been duly and validly
authorized,  232,500 of the shares have been duly and validly issued,  32,500 of
which are fully paid and  nonassessable  and 200,000 of which,  when paid for as
provided in the restricted stock agreements related thereto,  will be fully paid
and  nonassessable,  and  420,000  of the  shares,  when  issued and paid for as
provided  in the option  agreements  related  thereto,  will be duly and validly
issued, fully paid and nonassessable.

We  consent to the  filing of this  opinion  as an  exhibit to the  Registration
Statement.  By giving you this opinion and consent,  we do not admit that we are
experts with  respect to any part of the  Registration  Statement or  Prospectus
within the meaning of the term "expert" as used in Section 11 of the Act, or the
rules and regulations promulgated thereunder, nor do we admit that we are in the
category of persons whose consent is required under Section 7 of the Act.

Very truly yours,



/s/ Troy & Gould Professional Corporation
-----------------------------------------
TROY & GOULD PROFESSIONAL CORPORATION

Los Angeles, California
May 18, 1998

