<PAGE>

                                    EXHIBIT 10.51

                           VISTA MEDICAL TECHNOLOGIES, INC.
                     SECOND AMENDMENT TO THE AMENDED AND RESTATED
                             INVESTORS' RIGHTS AGREEMENT


     THIS SECOND AMENDMENT TO THE AMENDED AND RESTATED INVESTORS' RIGHTS
AGREEMENT (the "Amendment") is made as of the 22nd day of October, 1997 (the
"Effective Date"), by and among VISTA MEDICAL TECHNOLOGIES, INC., a Delaware
corporation (the "Company"), SILICON VALLEY BANK (the "Warrant Holder") and the
Stockholders listed on Exhibit "A" hereto, each of which is hereby referred to
as a "Stockholder."

                                   R E C I T A L S

     WHEREAS, the Company and certain of the Stockholders are parties to a
certain Amended and Restated Investors' Rights Agreement dated as of November
27, 1996, as amended through the date hereof (the "Agreement"), pursuant to
which certain of the Stockholders possess registration rights, information
rights, rights of first refusal and other rights, and the Company is
obligated thereunder;

     WHEREAS, the Company has issued a warrant ("Warrant") to Warrant Holder to
purchase up to 27,184 shares of Common Stock of the Company; and

     WHEREAS, the Stockholders, the Company and the Warrant Holder hereby
intend that this Amendment shall amend the Agreement so that the obligations
of the Company to register Common Stock issuable to Warrant Holder upon
exercise of the Warrant (as defined below) are covered by the Agreement.

     NOW, THEREFORE, THE PARTIES HEREBY AGREE AS FOLLOWS:

     1.   Section 1.2 entitled "Certain Definitions" is hereby amended to add
the following definition:

     "SILICON VALLEY BANK WARRANT" shall mean that certain Warrant to
Purchase Stock dated October 22, 1997 issued by the Company to Silicon Valley
Bank.

     2.   The following definition in the Agreement is amended in its
entirety to read as follows:

     "REGISTRABLE SECURITIES" means (i) the Common Stock issuable or issued
upon conversion of the Series A Preferred, (ii) the Common Stock issuable or
issued upon conversion of the Series B Preferred, (iii) the Common Stock
issuable or issued upon conversion of the Series C Preferred, (iv) the Common
Stock issuable or issued upon exercise

<PAGE>

of the Warrant, (v) the Common Stock issuable or issued upon exercise of the
Silicon Valley Bank Warrant and (vi) any Common Stock of the Company issued
as (or issuable upon the conversion or exercise of any warrant, right or
other security which is issued as) a dividend or other distribution with
respect to or in exchange for or in replacement of, the shares referenced in
(i), (ii), (iii), (iv) and (v) above, excluding in all cases, however, any
Registrable Securities sold by a person in a transaction in which his rights
under this Section 1 are not assigned and any Registrable Securities as to
which the registration rights granted hereunder have been terminated pursuant
to Section 1.14.

     3.   By signature below, Warrant Holder agrees that it will have and
comply with all of the rights and obligations of a Holder under the
Agreement.  All other terms and provisions of the Agreement remain in full
force and effect.

     The foregoing Second Amendment to the Amended and Restated Investors'
Rights Agreement is hereby executed as of the date first above written.

                              THE COMPANY:

                              VISTA MEDICAL TECHNOLOGIES, INC.


                              By:  /s/ John R. Lyon
                                  ---------------------------
                              Title: President
                                    -------------------------

                              Address:  5451 Avenida Encinas, Suite A
                                        Carlsbad, CA  92008


                              THE STOCKHOLDERS:

                              FOSTER CITY PARTNERS


                              By: /s/ H.J. Smead
                                  ---------------------------
                              Title: General Partner
                                    -------------------------

                              Address:  950 Tower Lane, Ste. 800
                                        Foster City, CA  94404

                [SIGNATURE PAGE TO SECOND AMENDMENT TO THE AMENDED AND
                        RESTATED INVESTORS' RIGHTS AGREEMENT]

<PAGE>

                              ONE LIBERTY FUND III, L.P.


                              By:/s/ D.J. Holland
                                  ---------------------------
                              Title: General Partner
                                    -------------------------

                              Address:  1 Liberty Square, 2nd Floor
                                        Boston, MA  02109

                              GILDE INTERNATIONAL, B.V.


                              By:/s/ D. J. Holland
                                  ---------------------------
                              Title: General Partner
                                    -------------------------

                              Address:  1 Liberty Square, 2nd Floor
                                        Boston, MA  02109


                              DOMAIN PARTNERS III, L.P.

                              By:  One Palmer Square Associates III, L.P.

                              By:/s/ James C. Blair
                                  ---------------------------
                              Title: General Partner
                                    -------------------------

                              Address:  One Palmer Square, Ste. 515
                                        Princeton, NJ  08542


                              BIOTECHNOLOGY INVESTMENTS LIMITED

                              By:  Old Court Limited


                              By:/s/ James C. Blair
                                  ---------------------------
                              Title: Attorney-in-Fact
                                    -------------------------

                              Address:  St. Julian's Court
                                        St. Peter Port
                                        Guernsey, Channel Islands


                [SIGNATURE PAGE TO SECOND AMENDMENT TO THE AMENDED AND
                        RESTATED INVESTORS' RIGHTS AGREEMENT]

<PAGE>

                              D.P. III ASSOCIATES, L.P.

                              By:  One Palmer Square Associates III, L.P.

                              By:/s/ James C. Blair
                                  ---------------------------
                              Title: General Partner
                                    -------------------------

                              Address:  One Palmer Square, Ste. 515
                                        Princeton, NJ  08542


                              SBIC PARTNERS, L.P.

                              By:  Forrest Binkley & Brown L.P.,
                                   General Partner

                                   By:  Forrest Binkley & Brown Venture Co.,
                                        General Partner

                              By:/s/ Nicholas B. Binkley
                                  ---------------------------
                              Title: Co-President
                                    -------------------------


                              By:  SL-SBIC Partners, L.P.,
                                   General Partner

                                   By:  FW-SBIC, Inc.,
                                        General Partner

                              By:
                                  ---------------------------
                              Title:
                                    -------------------------

                              Address:  201 Main Street, Suite 2302
                                        Fort Worth, TX 76102


             [SIGNATURE PAGE TO SECOND AMENDMENT TO THE AMENDED AND
                      RESTATED INVESTORS' RIGHTS AGREEMENT]

<PAGE>

                              KOICHIRO HIRO


                              /s/ Koichiro Hori
                              --------------------------------
                              Address:       c/o Oktas
                                             134 Flanders Road
                                             Westborough, MA 01581


                              MEDTRONIC ASSET MANAGEMENT, INC.

                              ---------------------------------
                              By:
                                 ------------------------------
                              Title:
                                    ---------------------------

                              Address:  7000 Central Avenue NE
                                        Minneapolis, MN 55432

                              HEARTPORT, INC., a Delaware corporation


                              /s/ Wesley Sterman
                              ---------------------------------
                              By:  Wesley Sterman
                                 ------------------------------
                              Title: CEO
                                    ---------------------------

                              Address:  700 Chesapeake Drive
                                        Redwood City, CA 94063


                              WARRANT HOLDER:

                              SILICON VALLEY BANK

                              By:/s/ L. LeBeau
                                 ------------------------------
                              Title: Senior Vice President
                                    ---------------------------

                              Address:  5414 Oberlin Drive, Suite 230
                                        San Diego, CA 92121


             [SIGNATURE PAGE TO SECOND AMENDMENT TO THE AMENDED AND
                       RESTATED INVESTORS' RIGHTS AGREEMENT]

<PAGE>

                                      EXHIBIT A
                               SCHEDULE OF STOCKHOLDERS

     Stockholders
     ------------

     FOSTER CITY PARTNERS
     950 Tower Lane, Ste. 800
     Foster City, CA 94404
     Attention:     Dr.  H.J. Smead

     ONE LIBERTY FUND III
     1 Liberty Square, 2nd Floor
     Boston, MA 02109
     Attention:     Dan Holland

     GILDE INTERNATIONAL B.V.
     1 Liberty Square, 2nd Floor
     Boston, MA 02109
     Attention:     Dan Holland

     B. U. N. P.
     c/o Community Technology Fund
     Boston University Ventures
     147 Bay State Road
     Boston, MA 02215
     Attention:     John E. Bagalay, Jr.

     DOMAIN PARTNERS III, L.P.
     One Palmer Square.  Ste. 515
     Princeton.  NJ 08542
     Attention:     James C. Blair.  Ph.D.

     BIOTECHNOLOGY INVESTMENTS LIMITED
     St. Julian's Court
     St. Peter Pon
     Guernsey.  Channel Islands

     with copy to:

     c/o Domain Associates
     One Palmer Square, Ste. 515
     Princeton, NJ 08542
     Attention:     James C. Blair.  Ph.D.

                                      A-1

<PAGE>

     DP III ASSOCIATES, L.P.
     One Palmer Square, Ste. 515
     Princeton, NJ 08542
     Attention:     James C. Blair, Ph.D

     SBIC PARTNERS.  L.P.
     201 Main Street, Suite 2302
     Fort Worth, TX 76102
     Attention:     Nicholas Binkley

     KOICHIRO HORI
     c/o Oktas
     134 Flanders Road
     Westborough, MA 01581

     DELAWARE CHARTER GUARANTEE &
     TRUST TTEE FBO NANCY M. BRIEFS
     3000 Sand Hill Road 3-190
     Menlo Park, CA  94025
     Attention:  Dick Blakeley

     with copy to:

     c/o Oktas
     134 Flanders Road
     Westborough, MA  01581
     Attention:  Nancy Briefs

     PIONEER CAPITAL CORPORATION
     60 State Street
     Boston, MA  02109

     ACCEL III, L.P.
     1 Palmer Square, Ste. 515
     Princeton, NJ  08542

     ACCEL JAPAN, L.P.
     1 Palmer Square, Ste. 515
     Princeton, NJ  08542

     ACCEL '91
     1 Palmer Square, Ste. 515
     Princeton, NJ  08542

                                      A-2

<PAGE>

     OAK INVESTMENT PARTNERS V, L.P.
     1 Gorham Island
     Westport, CT  06880

     OAK V AFFILIATES FUND, L.P.
     1 Gorham Island
     Westport, CT  06880

     CRAIG S. ANDREWS
     3543 Garrison Street
     San Diego, CA  92106

     JOHN DENNISTON
     16338 Via del Alba
     Rancho Santa Fe, CA 92067

     FAYE HUNTER RUSSELL TRUST U/A DTD 7-11-88
     P.O. Box 1759
     La Jolla, CA 92038

     ALBERT STARR, M.D.
     9155 S. W. Barnes Road, Suite 240
     Portland, OR 97225

     NATIONAL CITY BANK AS CUSTODIAN
     CARDIAC SURGICAL FBO DR. WILLIAM F.
     NORTHRUP, IV
     651 Nicollet Mall, FAC-4
     Minneapolis, MN 55402

     GUARANTEE & TRUST CO., TRUSTEE
     FBO GIACOMO A. DELARIA, M.D.
     P. O. Box 9755
     Rancho Santa Fe, CA 92067

     MEREDITH L. SCOTT, M.D.
     1615 Barcelona Way
     Winter Park, FL 32789

     SELECTED MEDICAL ENTERPRISES
     1017 Mary Lan
     Lomira, WI 53048

                                      A-3

<PAGE>

     PROMEDICA INTERNATIONAL, INC.
     620 Newport Center Drive, #575
     Newport Beach, CA 92660

     MEDTRONIC ASSET MANAGEMENT, INC.
     7000 Central Avenue NE
     Minneapolis, MN 55432

     HEARTPORT, INC.
     700 Chesapeake Drive
     Redwood City, CA 94063


                                      A-4