<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with Wdesk from Workiva-->
<!--Copyright 2021 Workiva-->
<!--r:a87039c4-2fcc-45c9-b365-4bab5f3d8573,g:1b6fd14f-8b43-42ad-82c9-d667f6dff3d6-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:cgnx="http://www.cognex.com/20210404" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:nonnum="http://www.xbrl.org/dtr/type/non-numeric" xmlns:num="http://www.xbrl.org/dtr/type/numeric" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.cognex.com/20210404">
  <xs:import namespace="http://fasb.org/srt/2020-01-31" schemaLocation="http://xbrl.fasb.org/srt/2020/elts/srt-2020-01-31.xsd"/>
  <xs:import namespace="http://fasb.org/us-gaap/2020-01-31" schemaLocation="http://xbrl.fasb.org/us-gaap/2020/elts/us-gaap-2020-01-31.xsd"/>
  <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.xbrl.org/2003/xlink-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/2003/instance" schemaLocation="http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/2003/linkbase" schemaLocation="http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd"/>
  <xs:import namespace="http://www.xbrl.org/dtr/type/non-numeric" schemaLocation="http://www.xbrl.org/dtr/type/nonNumeric-2009-12-16.xsd"/>
  <xs:import namespace="http://www.xbrl.org/dtr/type/numeric" schemaLocation="http://www.xbrl.org/dtr/type/numeric-2009-12-16.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/country/2020-01-31" schemaLocation="https://xbrl.sec.gov/country/2020/country-2020-01-31.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/currency/2020-01-31" schemaLocation="https://xbrl.sec.gov/currency/2020/currency-2020-01-31.xsd"/>
  <xs:import namespace="http://xbrl.sec.gov/dei/2020-01-31" schemaLocation="https://xbrl.sec.gov/dei/2020/dei-2020-01-31.xsd"/>
  <xs:annotation>
    <xs:appinfo>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="cgnx-20210404_lab.xml" xlink:role="http://www.xbrl.org/2003/role/labelLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="cgnx-20210404_cal.xml" xlink:role="http://www.xbrl.org/2003/role/calculationLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="cgnx-20210404_def.xml" xlink:role="http://www.xbrl.org/2003/role/definitionLinkbaseRef" xlink:type="simple"/>
      <link:linkbaseRef xmlns:xlink="http://www.w3.org/1999/xlink" xlink:arcrole="http://www.w3.org/1999/xlink/properties/linkbase" xlink:href="cgnx-20210404_pre.xml" xlink:role="http://www.xbrl.org/2003/role/presentationLinkbaseRef" xlink:type="simple"/>
      <link:roleType id="CoverPage" roleURI="http://www.cognex.com/role/CoverPage">
        <link:definition>0001001 - Document - Cover Page</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofOperations" roleURI="http://www.cognex.com/role/ConsolidatedStatementsofOperations">
        <link:definition>1001002 - Statement - Consolidated Statements of Operations</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofComprehensiveIncome" roleURI="http://www.cognex.com/role/ConsolidatedStatementsofComprehensiveIncome">
        <link:definition>1002003 - Statement - Consolidated Statements of Comprehensive Income</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofComprehensiveIncomeParenthetical" roleURI="http://www.cognex.com/role/ConsolidatedStatementsofComprehensiveIncomeParenthetical">
        <link:definition>1003004 - Statement - Consolidated Statements of Comprehensive Income (Parenthetical)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedBalanceSheets" roleURI="http://www.cognex.com/role/ConsolidatedBalanceSheets">
        <link:definition>1004005 - Statement - Consolidated Balance Sheets</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedBalanceSheetsParenthetical" roleURI="http://www.cognex.com/role/ConsolidatedBalanceSheetsParenthetical">
        <link:definition>1005006 - Statement - Consolidated Balance Sheets (Parenthetical)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementsofCashFlows" roleURI="http://www.cognex.com/role/ConsolidatedStatementsofCashFlows">
        <link:definition>1006007 - Statement - Consolidated Statements of Cash Flows</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementofShareholdersEquity" roleURI="http://www.cognex.com/role/ConsolidatedStatementofShareholdersEquity">
        <link:definition>1007008 - Statement - Consolidated Statement of Shareholders' Equity</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="ConsolidatedStatementofShareholdersEquityParenthetical" roleURI="http://www.cognex.com/role/ConsolidatedStatementofShareholdersEquityParenthetical">
        <link:definition>1008009 - Statement - Consolidated Statement of Shareholders' Equity (Parenthetical)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPolicies" roleURI="http://www.cognex.com/role/SummaryofSignificantAccountingPolicies">
        <link:definition>2101101 - Disclosure - Summary of Significant Accounting Policies</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SummaryofSignificantAccountingPoliciesPolicies" roleURI="http://www.cognex.com/role/SummaryofSignificantAccountingPoliciesPolicies">
        <link:definition>2202201 - Disclosure - Summary of Significant Accounting Policies (Policies)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="NewPronouncements" roleURI="http://www.cognex.com/role/NewPronouncements">
        <link:definition>2103102 - Disclosure - New Pronouncements</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurements" roleURI="http://www.cognex.com/role/FairValueMeasurements">
        <link:definition>2104103 - Disclosure - Fair Value Measurements</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurementsTables" roleURI="http://www.cognex.com/role/FairValueMeasurementsTables">
        <link:definition>2305301 - Disclosure - Fair Value Measurements (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurementsAssetsandLiabilitiesMeasuredatFairValueonaRecurringBasisDetails" roleURI="http://www.cognex.com/role/FairValueMeasurementsAssetsandLiabilitiesMeasuredatFairValueonaRecurringBasisDetails">
        <link:definition>2406401 - Disclosure - Fair Value Measurements - Assets and Liabilities Measured at Fair Value on a Recurring Basis (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="FairValueMeasurementsDetails" roleURI="http://www.cognex.com/role/FairValueMeasurementsDetails">
        <link:definition>2407402 - Disclosure - Fair Value Measurements (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CashCashEquivalentsandInvestments" roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestments">
        <link:definition>2108104 - Disclosure - Cash, Cash Equivalents, and Investments</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CashCashEquivalentsandInvestmentsTables" roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsTables">
        <link:definition>2309302 - Disclosure - Cash, Cash Equivalents, and Investments (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CashCashEquivalentsandInvestmentsDetails" roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsDetails">
        <link:definition>2410403 - Disclosure - Cash, Cash Equivalents, and Investments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CashCashEquivalentsandInvestmentsComponentsofCashCashEquivalentsandInvestmentsDetails" roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsComponentsofCashCashEquivalentsandInvestmentsDetails">
        <link:definition>2411404 - Disclosure - Cash, Cash Equivalents, and Investments - Components of Cash, Cash Equivalents, and Investments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CashCashEquivalentsandInvestmentsSummaryofAvailableforSaleInvestmentsDetails" roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsSummaryofAvailableforSaleInvestmentsDetails">
        <link:definition>2412405 - Disclosure - Cash, Cash Equivalents, and Investments - Summary of Available-for-Sale Investments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CashCashEquivalentsandInvestmentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails" roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsGrossUnrealizedLossesandFairValuesforAvailableforSaleInvestmentsDetails">
        <link:definition>2413406 - Disclosure - Cash, Cash Equivalents, and Investments - Gross Unrealized Losses and Fair Values for Available-for-Sale Investments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CashCashEquivalentsandInvestmentsCashCashEquivalentsandInvestmentsScheduleofAllowanceforCreditLossActivityDetails" roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsCashCashEquivalentsandInvestmentsScheduleofAllowanceforCreditLossActivityDetails">
        <link:definition>2414407 - Disclosure - Cash, Cash Equivalents, and Investments Cash, Cash Equivalents, and Investments - Schedule of Allowance for Credit Loss Activity (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="CashCashEquivalentsandInvestmentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails" roleURI="http://www.cognex.com/role/CashCashEquivalentsandInvestmentsEffectiveMaturityDatesofAvailableforSaleInvestmentsDetails">
        <link:definition>2415408 - Disclosure - Cash, Cash Equivalents, and Investments - Effective Maturity Dates of Available-for-Sale Investments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="Inventories" roleURI="http://www.cognex.com/role/Inventories">
        <link:definition>2116105 - Disclosure - Inventories</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="InventoriesTables" roleURI="http://www.cognex.com/role/InventoriesTables">
        <link:definition>2317303 - Disclosure - Inventories (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="InventoriesScheduleofInventoriesDetails" roleURI="http://www.cognex.com/role/InventoriesScheduleofInventoriesDetails">
        <link:definition>2418409 - Disclosure - Inventories - Schedule of Inventories (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="Leases" roleURI="http://www.cognex.com/role/Leases">
        <link:definition>2119106 - Disclosure - Leases</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesTables" roleURI="http://www.cognex.com/role/LeasesTables">
        <link:definition>2320304 - Disclosure - Leases (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesNarrativeDetails" roleURI="http://www.cognex.com/role/LeasesNarrativeDetails">
        <link:definition>2421410 - Disclosure - Leases - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="LeasesFutureMinimumLeasePaymentObligationsUnderOperatingLeasesDetails" roleURI="http://www.cognex.com/role/LeasesFutureMinimumLeasePaymentObligationsUnderOperatingLeasesDetails">
        <link:definition>2422411 - Disclosure - Leases - Future Minimum Lease Payment Obligations Under Operating Leases (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillNotes" roleURI="http://www.cognex.com/role/GoodwillNotes">
        <link:definition>2123107 - Disclosure - Goodwill (Notes)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillTables" roleURI="http://www.cognex.com/role/GoodwillTables">
        <link:definition>2324305 - Disclosure - Goodwill (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="GoodwillDetails" roleURI="http://www.cognex.com/role/GoodwillDetails">
        <link:definition>2425412 - Disclosure - Goodwill (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IntangibleAssets" roleURI="http://www.cognex.com/role/IntangibleAssets">
        <link:definition>2126108 - Disclosure - Intangible Assets</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IntangibleAssetsTables" roleURI="http://www.cognex.com/role/IntangibleAssetsTables">
        <link:definition>2327306 - Disclosure - Intangible Assets (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IntangibleAssetsDetails" roleURI="http://www.cognex.com/role/IntangibleAssetsDetails">
        <link:definition>2428413 - Disclosure - Intangible Assets (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IntangibleAssetsDetails_1" roleURI="http://www.cognex.com/role/IntangibleAssetsDetails_1">
        <link:definition>2428413 - Disclosure - Intangible Assets (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="WarrantyObligations" roleURI="http://www.cognex.com/role/WarrantyObligations">
        <link:definition>2129109 - Disclosure - Warranty Obligations</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="WarrantyObligationsTables" roleURI="http://www.cognex.com/role/WarrantyObligationsTables">
        <link:definition>2330307 - Disclosure - Warranty Obligations (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="WarrantyObligationsChangesinWarrantyObligationsDetail" roleURI="http://www.cognex.com/role/WarrantyObligationsChangesinWarrantyObligationsDetail">
        <link:definition>2431414 - Disclosure - Warranty Obligations - Changes in Warranty Obligations (Detail)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DerivativeInstruments" roleURI="http://www.cognex.com/role/DerivativeInstruments">
        <link:definition>2132110 - Disclosure - Derivative Instruments</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DerivativeInstrumentsTables" roleURI="http://www.cognex.com/role/DerivativeInstrumentsTables">
        <link:definition>2333308 - Disclosure - Derivative Instruments (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DerivativeInstrumentsDetails" roleURI="http://www.cognex.com/role/DerivativeInstrumentsDetails">
        <link:definition>2434415 - Disclosure - Derivative Instruments (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DerivativeInstrumentsOutstandingForwardContractsTableDetails" roleURI="http://www.cognex.com/role/DerivativeInstrumentsOutstandingForwardContractsTableDetails">
        <link:definition>2435416 - Disclosure - Derivative Instruments - Outstanding Forward Contracts Table (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DerivativeInstrumentsScheduleofDerivativeInstrumentsinStatementofFinancialPositionFairValueDetails" roleURI="http://www.cognex.com/role/DerivativeInstrumentsScheduleofDerivativeInstrumentsinStatementofFinancialPositionFairValueDetails">
        <link:definition>2436417 - Disclosure - Derivative Instruments - Schedule of Derivative Instruments in Statement of Financial Position, Fair Value (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DerivativeInstrumentsOffsettingAssetsDetails" roleURI="http://www.cognex.com/role/DerivativeInstrumentsOffsettingAssetsDetails">
        <link:definition>2437418 - Disclosure - Derivative Instruments - Offsetting Assets (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="DerivativeInstrumentsDerivativeInstrumentsGainLossDetails" roleURI="http://www.cognex.com/role/DerivativeInstrumentsDerivativeInstrumentsGainLossDetails">
        <link:definition>2438419 - Disclosure - Derivative Instruments - Derivative Instruments, Gain (Loss) (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRecognition" roleURI="http://www.cognex.com/role/RevenueRecognition">
        <link:definition>2139111 - Disclosure - Revenue Recognition</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRecognitionTables" roleURI="http://www.cognex.com/role/RevenueRecognitionTables">
        <link:definition>2340309 - Disclosure - Revenue Recognition (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRecognitionRevenueDisaggregatedbyGeographyDetails" roleURI="http://www.cognex.com/role/RevenueRecognitionRevenueDisaggregatedbyGeographyDetails">
        <link:definition>2441420 - Disclosure - Revenue Recognition - Revenue Disaggregated by Geography (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRecognitionRevenueDisaggregatedbyProductsandServicesDetails" roleURI="http://www.cognex.com/role/RevenueRecognitionRevenueDisaggregatedbyProductsandServicesDetails">
        <link:definition>2442421 - Disclosure - Revenue Recognition - Revenue Disaggregated by Products and Services (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRecognitionAdditionalInformationDetails" roleURI="http://www.cognex.com/role/RevenueRecognitionAdditionalInformationDetails">
        <link:definition>2443422 - Disclosure - Revenue Recognition - Additional Information (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRecognitionScheduleofAllowanceforCreditLossDetails" roleURI="http://www.cognex.com/role/RevenueRecognitionScheduleofAllowanceforCreditLossDetails">
        <link:definition>2444423 - Disclosure - Revenue Recognition - Schedule of Allowance for Credit Loss (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RevenueRecognitionDeferredRevenueActivityDetails" roleURI="http://www.cognex.com/role/RevenueRecognitionDeferredRevenueActivityDetails">
        <link:definition>2445424 - Disclosure - Revenue Recognition - Deferred Revenue Activity (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationExpense" roleURI="http://www.cognex.com/role/StockBasedCompensationExpense">
        <link:definition>2146112 - Disclosure - Stock-Based Compensation Expense</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationExpenseTables" roleURI="http://www.cognex.com/role/StockBasedCompensationExpenseTables">
        <link:definition>2347310 - Disclosure - Stock-Based Compensation Expense (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationExpenseDetails" roleURI="http://www.cognex.com/role/StockBasedCompensationExpenseDetails">
        <link:definition>2448425 - Disclosure - Stock-Based Compensation Expense (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationExpenseSummaryofStockOptionActivityDetails" roleURI="http://www.cognex.com/role/StockBasedCompensationExpenseSummaryofStockOptionActivityDetails">
        <link:definition>2449426 - Disclosure - Stock-Based Compensation Expense - Summary of Stock Option Activity (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationExpenseWeightedAverageAssumptionsUsedinEstimatingFairValuesofStockOptionsGrantedDetails" roleURI="http://www.cognex.com/role/StockBasedCompensationExpenseWeightedAverageAssumptionsUsedinEstimatingFairValuesofStockOptionsGrantedDetails">
        <link:definition>2450427 - Disclosure - Stock-Based Compensation Expense - Weighted-Average Assumptions Used in Estimating Fair Values of Stock Options Granted (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationExpenseStockBasedCompensationExpenseScheduleofRestrictedStockUnitsDetails" roleURI="http://www.cognex.com/role/StockBasedCompensationExpenseStockBasedCompensationExpenseScheduleofRestrictedStockUnitsDetails">
        <link:definition>2451428 - Disclosure - Stock-Based Compensation Expense Stock-Based Compensation Expense - Schedule of Restricted Stock Units (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockBasedCompensationExpenseScheduleofEmployeeServiceSharebasedCompensationAllocationofRecognizedPeriodCostsDetails" roleURI="http://www.cognex.com/role/StockBasedCompensationExpenseScheduleofEmployeeServiceSharebasedCompensationAllocationofRecognizedPeriodCostsDetails">
        <link:definition>2452429 - Disclosure - Stock-Based Compensation Expense - Schedule of Employee Service Share-based Compensation, Allocation of Recognized Period Costs (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockRepurchaseProgram" roleURI="http://www.cognex.com/role/StockRepurchaseProgram">
        <link:definition>2153113 - Disclosure - Stock Repurchase Program</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="StockRepurchaseProgramDetails" roleURI="http://www.cognex.com/role/StockRepurchaseProgramDetails">
        <link:definition>2454430 - Disclosure - Stock Repurchase Program (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="Taxes" roleURI="http://www.cognex.com/role/Taxes">
        <link:definition>2155114 - Disclosure - Taxes</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesTables" roleURI="http://www.cognex.com/role/IncomeTaxesTables">
        <link:definition>2356311 - Disclosure - Income Taxes (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesReconciliationofUnitedStatesFederalStatutoryCorporateTaxRatetoCompanysEffectiveTaxRateorIncomeTaxProvisionDetails" roleURI="http://www.cognex.com/role/IncomeTaxesReconciliationofUnitedStatesFederalStatutoryCorporateTaxRatetoCompanysEffectiveTaxRateorIncomeTaxProvisionDetails">
        <link:definition>2457431 - Disclosure - Income Taxes - Reconciliation of United States Federal Statutory Corporate Tax Rate to Company's Effective Tax Rate, or Income Tax Provision (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="IncomeTaxesDetails" roleURI="http://www.cognex.com/role/IncomeTaxesDetails">
        <link:definition>2458432 - Disclosure - Income Taxes (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="WeightedAverageShares" roleURI="http://www.cognex.com/role/WeightedAverageShares">
        <link:definition>2159115 - Disclosure - Weighted-Average Shares</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="WeightedAverageSharesTables" roleURI="http://www.cognex.com/role/WeightedAverageSharesTables">
        <link:definition>2360312 - Disclosure - Weighted-Average Shares (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="WeightedAverageSharesCalculationofWeightedAverageSharesDetails" roleURI="http://www.cognex.com/role/WeightedAverageSharesCalculationofWeightedAverageSharesDetails">
        <link:definition>2461433 - Disclosure - Weighted-Average Shares - Calculation of Weighted-Average Shares (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="WeightedAverageSharesDetails" roleURI="http://www.cognex.com/role/WeightedAverageSharesDetails">
        <link:definition>2462434 - Disclosure - Weighted-Average Shares (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RestructuringCharges" roleURI="http://www.cognex.com/role/RestructuringCharges">
        <link:definition>2163116 - Disclosure - Restructuring Charges</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RestructuringChargesTables" roleURI="http://www.cognex.com/role/RestructuringChargesTables">
        <link:definition>2364313 - Disclosure - Restructuring Charges (Tables)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RestructuringChargesNarrativeDetails" roleURI="http://www.cognex.com/role/RestructuringChargesNarrativeDetails">
        <link:definition>2465435 - Disclosure - Restructuring Charges - Narrative (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="RestructuringChargesActivityinRestructuringReserveDetails" roleURI="http://www.cognex.com/role/RestructuringChargesActivityinRestructuringReserveDetails">
        <link:definition>2466436 - Disclosure - Restructuring Charges - Activity in Restructuring Reserve (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SubsequentEvents" roleURI="http://www.cognex.com/role/SubsequentEvents">
        <link:definition>2167117 - Disclosure - Subsequent Events</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
      <link:roleType id="SubsequentEventsDetails" roleURI="http://www.cognex.com/role/SubsequentEventsDetails">
        <link:definition>2468437 - Disclosure - Subsequent Events (Details)</link:definition>
        <link:usedOn>link:presentationLink</link:usedOn>
        <link:usedOn>link:calculationLink</link:usedOn>
        <link:usedOn>link:definitionLink</link:usedOn>
      </link:roleType>
    </xs:appinfo>
  </xs:annotation>
  <xs:element id="cgnx_LongTermInvestmentsMember" abstract="true" name="LongTermInvestmentsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_LiabilityForUncertainTaxPositions" abstract="false" name="LiabilityForUncertainTaxPositions" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_SellingGeneralAndAdministrativeMember" abstract="true" name="SellingGeneralAndAdministrativeMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_EmployeeServiceShareBasedCompensationRecognizedPeriodCostsCapitalizedAmount" abstract="false" name="EmployeeServiceShareBasedCompensationRecognizedPeriodCostsCapitalizedAmount" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_RepurchaseProgramOctober2018Member" abstract="true" name="RepurchaseProgramOctober2018Member" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_IncomeTaxExaminationYearsUnderExaminationOtherEntities" abstract="false" name="IncomeTaxExaminationYearsUnderExaminationOtherEntities" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="cgnx_ApplicationSpecificCustomerSolutionsMember" abstract="true" name="ApplicationSpecificCustomerSolutionsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_IncreaseInCompensationExpenseDueToRevisedEstimatedForfeitureRates" abstract="false" name="IncreaseInCompensationExpenseDueToRevisedEstimatedForfeitureRates" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue" abstract="false" name="AvailableForSaleSecuritiesDebtMaturitiesAfterThreeYearsBeforeFourYearsFairValue" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_EffectiveIncomeTaxRateReconciliationExcludingDiscreteItemsPercent" abstract="false" name="EffectiveIncomeTaxRateReconciliationExcludingDiscreteItemsPercent" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="num:percentItemType"/>
  <xs:element id="cgnx_DistributionRightsDevelopedTechnologyRightsCustomerContractsAndRelationshipsOtherIntangibleAssetsAndTrademarksMember" abstract="true" name="DistributionRightsDevelopedTechnologyRightsCustomerContractsAndRelationshipsOtherIntangibleAssetsAndTrademarksMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedFairValue" abstract="false" name="ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedFairValue" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableAggregateIntrinsicValue" abstract="false" name="ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableAggregateIntrinsicValue" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_EstimatedForfeitureRateForUnvestedOptionsForAllNonSeniorManagement" abstract="false" name="EstimatedForfeitureRateForUnvestedOptionsForAllNonSeniorManagement" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="num:percentItemType"/>
  <xs:element id="cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue" abstract="false" name="AvailableForSaleSecuritiesDebtMaturitiesAfterFourYearsBeforeFiveYearsFairValue" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_CustomerContractsAndRelationshipsMember" abstract="true" name="CustomerContractsAndRelationshipsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_ExpirationPeriodOfStockOptionPlan" abstract="false" name="ExpirationPeriodOfStockOptionPlan" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="cgnx_TaxyearsopentoexaminationbyInternalRevenueService" abstract="false" name="TaxyearsopentoexaminationbyInternalRevenueService" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="cgnx_CurrencytranslationadjustmentsAbstract" abstract="true" name="CurrencytranslationadjustmentsAbstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="cgnx_OutstandingForwardContractsTableTextBlock" abstract="false" name="OutstandingForwardContractsTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:textBlockItemType"/>
  <xs:element id="cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue" abstract="false" name="AvailableForSaleSecuritiesDebtMaturitiesAfterOneYearBeforeTwoYearsFairValue" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue" abstract="false" name="AvailableForSaleSecuritiesDebtMaturitiesAfterTwoYearsBeforeThreeYearsFairValue" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_ExcessAndObsoleteInventoryCharges" abstract="false" name="ExcessAndObsoleteInventoryCharges" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_SharesBasedCompensationArrangementBySharesBasedPaymentAwardOptionsExercisableIntrinsicValue" abstract="false" name="SharesBasedCompensationArrangementBySharesBasedPaymentAwardOptionsExercisableIntrinsicValue" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_AgencyBondsMember" abstract="true" name="AgencyBondsMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_MinimumDecreaseInIncomeTaxExpenseDueToReleaseInReserves" abstract="false" name="MinimumDecreaseInIncomeTaxExpenseDueToReleaseInReserves" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_MaxiumumDecreaseInIncomeTaxExpenseDueToReleaseInReserves" abstract="false" name="MaxiumumDecreaseInIncomeTaxExpenseDueToReleaseInReserves" nillable="true" xbrli:periodType="instant" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_AccountsReceivableAllowanceForCreditLossForeignExchangeRateAdjustment" abstract="false" name="AccountsReceivableAllowanceForCreditLossForeignExchangeRateAdjustment" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_EmployeeServiceSharebasedCompensationNonvestedAwardsCompensationNotyetRecognizedPeriodforRecognition" abstract="false" name="EmployeeServiceSharebasedCompensationNonvestedAwardsCompensationNotyetRecognizedPeriodforRecognition" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:durationItemType"/>
  <xs:element id="cgnx_GViVenturesInc.Member" abstract="true" name="GViVenturesInc.Member" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_AccruedExpensesMember" abstract="true" name="AccruedExpensesMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_StandardProductsandServicesMember" abstract="true" name="StandardProductsandServicesMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_IncreaseDecreaseInterestAndPenalties" abstract="false" name="IncreaseDecreaseInterestAndPenalties" nillable="true" xbrli:periodType="duration" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_GeneralStockOptionPlanMember" abstract="true" name="GeneralStockOptionPlanMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_EstimatedForfeitureRateForUnvestedOptionsForSeniorManagement" abstract="false" name="EstimatedForfeitureRateForUnvestedOptionsForSeniorManagement" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="num:percentItemType"/>
  <xs:element id="cgnx_RepurchaseProgramMarch2020Member" abstract="true" name="RepurchaseProgramMarch2020Member" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
  <xs:element id="cgnx_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsAdditionalDisclosures1Abstract" abstract="true" name="ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsAdditionalDisclosures1Abstract" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="xbrli:stringItemType"/>
  <xs:element id="cgnx_ComponentsOfCashCashEquivalentsAndInvestmentsTableTextBlock" abstract="false" name="ComponentsOfCashCashEquivalentsAndInvestmentsTableTextBlock" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:textBlockItemType"/>
  <xs:element id="cgnx_DeferredRevenueForeignCurrencyExchangeAdjustment" abstract="false" name="DeferredRevenueForeignCurrencyExchangeAdjustment" nillable="true" xbrli:periodType="duration" xbrli:balance="credit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_NumberOfGroupsWithinEmployeePopulation" abstract="false" name="NumberOfGroupsWithinEmployeePopulation" nillable="true" xbrli:periodType="instant" substitutionGroup="xbrli:item" type="xbrli:integerItemType"/>
  <xs:element id="cgnx_CashCashEquivalentsShortTermAndLongTermInvestments" abstract="false" name="CashCashEquivalentsShortTermAndLongTermInvestments" nillable="true" xbrli:periodType="instant" xbrli:balance="debit" substitutionGroup="xbrli:item" type="xbrli:monetaryItemType"/>
  <xs:element id="cgnx_AsiaExcludingChinaMember" abstract="true" name="AsiaExcludingChinaMember" nillable="true" xbrli:periodType="duration" substitutionGroup="xbrli:item" type="nonnum:domainItemType"/>
</xs:schema>
