How can I use OpenCV 3.0 without overwriting my current version of OpenCV (2.4.8) on Ubuntu?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







4















I'm working with ROS indigo on Ubuntu 14.04 LTS, which automatically installs OpenCV 2.4.8 on my Linux machine. I'm very new to how Ubuntu works, so I really don't want to mess with the OpenCV that's already installed on my machine.



I do however, want to see whether one of my programs still works with OpenCV 3.0, so I'd like to install OpenCV 3.0 and link to that instead in my CMakeLists.txt. Is there any way I an install OpenCV 3.0 without messing with the OpenCV 2.4.8 that's already on my machine so I can experiment with both?



Thanks










share|improve this question





























    4















    I'm working with ROS indigo on Ubuntu 14.04 LTS, which automatically installs OpenCV 2.4.8 on my Linux machine. I'm very new to how Ubuntu works, so I really don't want to mess with the OpenCV that's already installed on my machine.



    I do however, want to see whether one of my programs still works with OpenCV 3.0, so I'd like to install OpenCV 3.0 and link to that instead in my CMakeLists.txt. Is there any way I an install OpenCV 3.0 without messing with the OpenCV 2.4.8 that's already on my machine so I can experiment with both?



    Thanks










    share|improve this question

























      4












      4








      4


      1






      I'm working with ROS indigo on Ubuntu 14.04 LTS, which automatically installs OpenCV 2.4.8 on my Linux machine. I'm very new to how Ubuntu works, so I really don't want to mess with the OpenCV that's already installed on my machine.



      I do however, want to see whether one of my programs still works with OpenCV 3.0, so I'd like to install OpenCV 3.0 and link to that instead in my CMakeLists.txt. Is there any way I an install OpenCV 3.0 without messing with the OpenCV 2.4.8 that's already on my machine so I can experiment with both?



      Thanks










      share|improve this question














      I'm working with ROS indigo on Ubuntu 14.04 LTS, which automatically installs OpenCV 2.4.8 on my Linux machine. I'm very new to how Ubuntu works, so I really don't want to mess with the OpenCV that's already installed on my machine.



      I do however, want to see whether one of my programs still works with OpenCV 3.0, so I'd like to install OpenCV 3.0 and link to that instead in my CMakeLists.txt. Is there any way I an install OpenCV 3.0 without messing with the OpenCV 2.4.8 that's already on my machine so I can experiment with both?



      Thanks







      14.04 software-installation opencv






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 23 '15 at 2:04









      user2555636user2555636

      2112




      2112






















          2 Answers
          2






          active

          oldest

          votes


















          0














          You should be able to just put the OpenCV download into a directory, run cmake there and make it. I have an old 2.2 from several years ago, but have no current experience, and the willowgarage link in the README is dead.






          share|improve this answer































            0














            Go to OpenCV documentation here and follow the steps.



            The only change is in Step 2. The cmake command should be modified to suit your needs:



            cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX= ..



            You existing installation should be in /usr/local, so use a different folder, for example you can create one in your home directory.



            Here is how you compile with your new version of OpenCV:



            Create a folder for your project. It should have the .cpp file and another file names CMakeLists.txt with the following contents:



            CPP = g++

            CPPFLAGS = -L</path/to/opencv3.0.0/lib>
            -I</path/to/opencv3.0.0/include>

            all: <name-of-.cpp-file>
            $(CPP) $(CPPFLAGS) $^ -o $@


            There are three changes you need to make to this file. In the folder to which you installed OpenCV, there will be two directories by the name 'libs' and 'include'. You should put those in lines 2 and 3 respectively. Then in the second last line, put the name of your cpp file.



            To compile your project, in a terminal, cd to you project folder and type make. The output binary file will be created in the same folder.



            Source - StackOverflow






            share|improve this answer


























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "89"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f664714%2fhow-can-i-use-opencv-3-0-without-overwriting-my-current-version-of-opencv-2-4-8%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              You should be able to just put the OpenCV download into a directory, run cmake there and make it. I have an old 2.2 from several years ago, but have no current experience, and the willowgarage link in the README is dead.






              share|improve this answer




























                0














                You should be able to just put the OpenCV download into a directory, run cmake there and make it. I have an old 2.2 from several years ago, but have no current experience, and the willowgarage link in the README is dead.






                share|improve this answer


























                  0












                  0








                  0







                  You should be able to just put the OpenCV download into a directory, run cmake there and make it. I have an old 2.2 from several years ago, but have no current experience, and the willowgarage link in the README is dead.






                  share|improve this answer













                  You should be able to just put the OpenCV download into a directory, run cmake there and make it. I have an old 2.2 from several years ago, but have no current experience, and the willowgarage link in the README is dead.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 23 '15 at 2:58









                  ubfan1ubfan1

                  9,91441730




                  9,91441730

























                      0














                      Go to OpenCV documentation here and follow the steps.



                      The only change is in Step 2. The cmake command should be modified to suit your needs:



                      cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX= ..



                      You existing installation should be in /usr/local, so use a different folder, for example you can create one in your home directory.



                      Here is how you compile with your new version of OpenCV:



                      Create a folder for your project. It should have the .cpp file and another file names CMakeLists.txt with the following contents:



                      CPP = g++

                      CPPFLAGS = -L</path/to/opencv3.0.0/lib>
                      -I</path/to/opencv3.0.0/include>

                      all: <name-of-.cpp-file>
                      $(CPP) $(CPPFLAGS) $^ -o $@


                      There are three changes you need to make to this file. In the folder to which you installed OpenCV, there will be two directories by the name 'libs' and 'include'. You should put those in lines 2 and 3 respectively. Then in the second last line, put the name of your cpp file.



                      To compile your project, in a terminal, cd to you project folder and type make. The output binary file will be created in the same folder.



                      Source - StackOverflow






                      share|improve this answer






























                        0














                        Go to OpenCV documentation here and follow the steps.



                        The only change is in Step 2. The cmake command should be modified to suit your needs:



                        cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX= ..



                        You existing installation should be in /usr/local, so use a different folder, for example you can create one in your home directory.



                        Here is how you compile with your new version of OpenCV:



                        Create a folder for your project. It should have the .cpp file and another file names CMakeLists.txt with the following contents:



                        CPP = g++

                        CPPFLAGS = -L</path/to/opencv3.0.0/lib>
                        -I</path/to/opencv3.0.0/include>

                        all: <name-of-.cpp-file>
                        $(CPP) $(CPPFLAGS) $^ -o $@


                        There are three changes you need to make to this file. In the folder to which you installed OpenCV, there will be two directories by the name 'libs' and 'include'. You should put those in lines 2 and 3 respectively. Then in the second last line, put the name of your cpp file.



                        To compile your project, in a terminal, cd to you project folder and type make. The output binary file will be created in the same folder.



                        Source - StackOverflow






                        share|improve this answer




























                          0












                          0








                          0







                          Go to OpenCV documentation here and follow the steps.



                          The only change is in Step 2. The cmake command should be modified to suit your needs:



                          cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX= ..



                          You existing installation should be in /usr/local, so use a different folder, for example you can create one in your home directory.



                          Here is how you compile with your new version of OpenCV:



                          Create a folder for your project. It should have the .cpp file and another file names CMakeLists.txt with the following contents:



                          CPP = g++

                          CPPFLAGS = -L</path/to/opencv3.0.0/lib>
                          -I</path/to/opencv3.0.0/include>

                          all: <name-of-.cpp-file>
                          $(CPP) $(CPPFLAGS) $^ -o $@


                          There are three changes you need to make to this file. In the folder to which you installed OpenCV, there will be two directories by the name 'libs' and 'include'. You should put those in lines 2 and 3 respectively. Then in the second last line, put the name of your cpp file.



                          To compile your project, in a terminal, cd to you project folder and type make. The output binary file will be created in the same folder.



                          Source - StackOverflow






                          share|improve this answer















                          Go to OpenCV documentation here and follow the steps.



                          The only change is in Step 2. The cmake command should be modified to suit your needs:



                          cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX= ..



                          You existing installation should be in /usr/local, so use a different folder, for example you can create one in your home directory.



                          Here is how you compile with your new version of OpenCV:



                          Create a folder for your project. It should have the .cpp file and another file names CMakeLists.txt with the following contents:



                          CPP = g++

                          CPPFLAGS = -L</path/to/opencv3.0.0/lib>
                          -I</path/to/opencv3.0.0/include>

                          all: <name-of-.cpp-file>
                          $(CPP) $(CPPFLAGS) $^ -o $@


                          There are three changes you need to make to this file. In the folder to which you installed OpenCV, there will be two directories by the name 'libs' and 'include'. You should put those in lines 2 and 3 respectively. Then in the second last line, put the name of your cpp file.



                          To compile your project, in a terminal, cd to you project folder and type make. The output binary file will be created in the same folder.



                          Source - StackOverflow







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Oct 24 '15 at 5:01

























                          answered Aug 23 '15 at 4:09









                          daltonfury42daltonfury42

                          3,44532052




                          3,44532052






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f664714%2fhow-can-i-use-opencv-3-0-without-overwriting-my-current-version-of-opencv-2-4-8%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How to change which sound is reproduced for terminal bell?

                              Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                              Can I use Tabulator js library in my java Spring + Thymeleaf project?