⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.dshow.html

📁 Video IO toolbox for matlab. 用directshow做的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
          <ol type="i">
            <li>Pull down the "Active solution platform:" selector and look for "x64".</li>
            <li>If it's already there, stop and jump to the batch build step below.  Otherwise, select "<tt>&lt;New...&gt;</tt>".</li>
            <li>In "Type or select the new platform:", select "x64".  </li>
          </ol>
        </li>
      </span>
      <li>
        Build &rarr; Batch Build... &rarr;
        <ol type="i"><li>Unless you know you will only be using some versions, select and
            build all of the configurations.</li></ol>
      </li>
    </ol>
  </li>
</ol>
</div>

<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<a name="platformsdk"/>
<div cond="mightBeXp()" id="vis">
<h2>Platform SDK</h2>
<div class="quick">Quick: 
  <span cond="mightBeVista()" id="vis">If you are using Windows Vista, skip this step.</span>
  <span cond="mightBeXp()" id="vis">If you are using XP or Windows Server 2003, follow the instructions.</span>
</div>

<div class="expl">
  "The Platform SDK for Microsoft(R) Windows Server(R) 2003 R2 contains the 
  information and tools you need to develop Windows-based applications.  You 
  can use this SDK to develop both 32- and 64-bit applications,"
  (<a href="http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en">Microsoft</a>).
</div>

<ol>
  <li>
    <a href="http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en">Download</a>
    the SDK.  As of February 2008, R2 was the current version and it contains 
    important changes relative to R1 and earlier versions of the Platform SDK.  
    Unfortunately, most search engines (including Microsoft's) return a pre-R2 
    release as the first result.  Make sure you use R2 or later.  
  </li>
   
  <li>
    Do a standard install.  <span cond="mightBeMat64()" id="vis">If you would like
    64-bit support, check any options that have "x64" in them.</span>
  </li>
    
  <li>
    Run the following commands from the command prompt 
      (Start &rarr; Run... &rarr; type in "<tt>cmd.exe</tt>" without quotes):
    <blockquote>
<pre>set PATH="%PATH%;C:\Program Files\Microsoft Visual Studio 8\VC\bin"
cd "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Samples\Multimedia\DirectShow\BaseClasses"
"C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
nmake NODEBUG=1 _CRT_SECURE_NO_DEPRECATE=1</pre>    
    </blockquote>
    <p cond="mightBeVs2003()||mightBeVs2008()||mightBeMat64()" id="vis">
      If you are using a version of Visual Studio other than 2005 and/or if you
      are using a 64-bit operating system, adjust the aboves paths as
      appropriate.
    </p>
    <p cond="mightBeMat64()" id="vis">
      If you're building 64-bit versions, you will most likely need to add 
      "<tt>amd64</tt>" as a command-line argument to "<tt>vcvarsall.bat</tt>".
      This is untested.
    </p>
    <p cond="mightBeVs2003()" id="vis">
      If you are using Visual Studio 2003, use <tt>vcvars32.bat</tt> instead of
      <tt>vcvarsall.bat</tt>.
    </p>
  </li>
</ol>
</div>

<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<a name="dxsdk"/>
<h2>DirectX SDK</h2>
<div class="quick">Quick:  Download and install the DirectX SDK and tell 
  Visual Studio where the include and library files are.</div>

DirectX is a collection of multimedia APIs by Microsoft.  In order to read and
write a wide array of video files on Windows, we need to use DirectShow.  Some
of the files required for using DirectShow are found in the DirectX SDK.

<ol>
  <li>
    <a href="http://msdn.microsoft.com/directx/">Download</a> the latest 
    DirectX SDK.  Microsoft has historically released new versions every 3-6 
    months.  As of Aug. 2007, this download was nearly a half a gigabyte.  
  </li>

  <li>Install the SDK.  The default options are fine.</li>

  <li>
    See if the <tt>DXSDK_DIR</tt> system environment variable was created 
    (see the <a href="FAQ.txt">FAQ.txt</a> for instructions on viewing and 
    modifying environment variables).  If it was not created by the installer, 
    set <tt>DXSDK_DIR</tt> to 
    <blockquote>
      <pre>C:\Program Files<span cond="mightBeWin64()" id="vis"> (x86)</span>\Microsoft DirectX SDK (June 2007)</pre>
    </blockquote>
    (modify this directory to point to your SDK's base directory).
   </li>
</ol>

<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<h2>Building the Library</h2>
<div class="quick">Quick: Follow all of these instructions.</div>

We're now finally ready to build the library using Matlab.

<ol>
  <li>
    Start a <em>new</em> Matlab session.  You must relaunch Matlab so that it 
    can see the new values of the environment variables you have created and/or 
    modified.  Any time you modify environment variables used by Matlab (or 
    programs it calls), you must completely exit Matlab and restart it.
  </li>
   
  <li>
    In Matlab, run the following if you have not already done so:
    <blockquote><pre>mex -setup</pre></blockquote>
    Follow the on-screen instructions.  If you have multiple compilers 
    installed, choose the one that was configured in the 
    <a href="#vs">Visual Studio</a> section of this document.
  </li>
      
  <li>
    Edit the file
    <blockquote><pre>%APPDATA%\MathWorks\MATLAB\R2007b\mexopts.bat</pre></blockquote>
    replacing "<tt>R2007b</tt>" with your Matlab revision.  
    
    <ul>
      <span cond="mightBeVs2005()||mightBeVs2008()" id="vis">
        <li>
          on the <tt>COMPFLAGS</tt> line, add the following:
          <blockquote><pre>-D_CRT_SECURE_NO_DEPRECATE </pre></blockquote>
          This eliminates a number of spurious warning messages.
        </li>
      </span>
      <span cond="mightBeVs2005()||mightBeVs2008()" id="vis">
        <li>
          <span cond="mightBeVs2003()" id="vis">
            if using Visual Studio 2005 or 2008 (but not 2003), 
          </span>
          on the <tt>COMPFLAGS</tt> line, add the following:
          <blockquote><pre>/Zc:wchar_t-</pre></blockquote>
          This provides proper treatment of the character data type.
        </li>
      </span>
      <span cond="mightBeVs2003()" id="vis">
        <li>
          <span cond="mightBeVs2005()||mightBeVs2008()" id="vis">
            if using Visual Studio 2003, 
          </span>
          on the <tt>COMPFLAGS</tt> line, add the following:
          <blockquote><pre>/EHsc</pre></blockquote>
          This adds VS2003 exception support.
        </li>
      </span>
      <span cond="mightBeVs2003()" id="vis">
        <li>
          <span cond="mightBeVs2005()||mightBeVs2008()" id="vis">
            if using Visual Studio 2003, 
          </span>
          on the <tt>LINKFLAGS</tt> line, add the following:
          <blockquote><pre>/NODEFAULTLIB:LIBCMT.LIB</pre></blockquote>
          This fixes a VS2003 duplicate-linkage problem.
        </li>
      </span>
      <li>
        on the <tt>INCLUDE</tt> line, move 
        <blockquote><pre>%INCLUDE%</pre></blockquote>
        to the beginning of the list (it's at the end by default).  This corrects 
        for some interface changes Microsoft has made to its SDKs.  Make sure 
        there's a semicolon between "<tt>%INCLUDE%</tt>" and the next entry in the 
        list.
      </li>
      <span cond="mightBeMat32()" id="vis">
        <li>
          <span cond="mightBeMat64()" id="vis">if you are using 32-bit Matlab, </span>
          on the <tt>LIB</tt> line add
          <blockquote><pre>;%LIB32%</pre></blockquote>
          to the end of the line (with no whitespace).
        </li>  
      </span>
      <span cond="mightBeMat64()" id="vis">
        <li>
          <span cond="mightBeMat32()" id="vis">if you are using 64-bit Matlab, </span>
          on the <tt>LIB</tt> line add
          <blockquote><pre>;%LIB64%</pre></blockquote>
          to the end of the line (with no whitespace).
        </li>
      </span>
    </ul>
  </li>

  <li>
    In Matlab, go to the directory where you've placed the videoIO source files
    and run 
    <blockquote><pre>buildVideoIO</pre></blockquote>
  </li>
</ol>

<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<a name="matpath"/>
<h2>Matlab Path</h2>
<div class="quick">Quick: add the installation directory to the Matlab path</div>

In Matlab add the base installation directory (but not all subdirectories) to
the path.  In the GUI this can be done by 
<blockquote>
  File &rarr; Set Path... &rarr; Add Folder...
</blockquote>
Alternatively, from the Matlab command line this can be done using the 
"<tt>addpath</tt>" and "<tt>savepath</tt>" functions.  

<p>Do <em>not</em> add directories recursively: the <tt>@videoReader/</tt>, 
<tt>@videoWriter/</tt>, and <tt>private/</tt> directories are handled 
automatically by Matlab's object system.  The <tt>tests/</tt> subdirectory 
contains files that are essentially private (e.g. a function named 
<tt>testAll</tt> could easily appear in other toolboxes or in the user's own 
code).  

<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<h2>Testing</h2>
<div class="quick">Quick: test the library</div>

<p>In Matlab, go to the <tt>tests/</tt> subdirectory and run <tt>testAll</tt>:</p>
<blockquote><pre><span style="color:green">% if this fails, you forgot to add the videoIO directory to your matlab path.</span>
cd(fullfile(videoIODir, 'tests')); 
<span style="color:green">
% This will take a long time (perhaps up to a few hours) to complete, but the 
% most basic and most critical tests are run first.  </span>
testAll 
</pre></blockquote>

<!-- ####################################################################### -->
<!-- ####################################################################### -->
<!-- ####################################################################### -->
<h2>Usage</h2>
<div class="quick">Quick: here are some pointers to getting started using the library</div>
See <a href="README.txt">README.txt</a> for a simple usage example.  
For user-level documentation, type any or all of the following at the Matlab 
prompt:
<br/><br/><blockquote><pre>
help buildVideoIO
help videoReader
help videoWriter
help videoread
</pre></blockquote>

<p>Also consider looking at <tt>tests/videoWriterDemo.m</tt> and 
<tt>tests/addFrameDemo.m</tt> for examples of writing videos.

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -