Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6796649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:30:49+00:00 2026-05-26T18:30:49+00:00

I am trying to use OpenCV on my Ubuntu machine but I am having

  • 0

I am trying to use OpenCV on my Ubuntu machine but I am having some issues. I think I may not have gotten the latest version for OpenCV but I am not sure if that is the problem.

I installed OpenCV on my Ubuntu 11.10 using this link: https://help.ubuntu.com/community/OpenCV

I have some of the following code:

#include    "cv.h"
using namespace cv;
...
Mat mat(width, height, CV_8UC2, buffer);
imwrite("test.jpg", mat);

The include directive and Mat() constructor works fine, but I can’t get imwrite to be recognized by the compiler:

g++ example.cpp -o example -lSDL -lpthread `pkg-config --cflags opencv --libs opencv`
example.cpp:64:40: error: ‘imwrite’ was not declared in this scope

I see on the page that I am linking to that it installs libcv2.1, but the current version is 2.3, which I think may be the issue.

I looked into synpatic package manager for another version of openCV but it’s the only one.

Could anyone please let me know if this is indeed the problem and how I can easily upgrade to the newest version please? I was trying to build OpenCV myself using CMake before but I was having issues building it correctly and so I decided to let apt-get do the work.

Thank you very much!

EDIT: (FOUND SOLUTION)

I am sorry, I just realized that it was a silly mistake, I forgot to include one header file:

#include "highgui.h"

Sorry about that!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:30:50+00:00Added an answer on May 26, 2026 at 6:30 pm

    I am sorry, I just realized that it was a silly mistake, I forgot to include one header file:

    include "highgui.h"

    Sorry about that!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been developing some computer vision tools with openCV, but every time that
I'm trying to use the new 2.0 c++ version of OpenCV , but everything
I'm trying to use OpenCV with Python and converting some C++ code. Anyway, if
I am trying to use the OpenCV library for some image processing inside my
I'm trying to compile PCL for use with OpenCV on Ubuntu (64 bit). I'm
I am trying to use FLANN with ORB descriptors, but opencv crashes with this
I am not a Unix guy, so I have been trying to install openCV
Im trying to use OpenCV but I keep on getting this error on Cmake:
I have been trying to do build and use OpenCV 2.3.0 on my Fedora15
I'm trying to use OpenCV GpuMat but I'm getting an assert error, my code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.