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 3855468
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:46:51+00:00 2026-05-19T17:46:51+00:00

So I have a black and white image in OpenCV, currently I output each

  • 0

So I have a black and white image in OpenCV, currently I output each of its per pixel color values into file so I get a file of values from 1 to 255. I have lots of really small images so in one image I usually get values that have small difference. like from 25 to 100.. So I need a way to print into file not color values but values from 0 to 1 where lowest color would be 0 and highest 1…

for(x=0;x<w;x++){
     for(y=0;y<h;y++){
          double RealColor = cvGetReal2D(source, y, x);
          file << RealColor << " ";
     }
     file << endl;
}file << endl;

How to do such a thing?

  • 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-19T17:46:52+00:00Added an answer on May 19, 2026 at 5:46 pm

    Just do a first pass, and find minimum and maximum values. Then do a second pass, and modify each value as (v - min) / (max - min) before writing to file.

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

Sidebar

Related Questions

I have a black and white image which every pixel values are loaded as
I have a black-white tiff image with 15369x15360 pixels and 8 bit depth now
I have a grayscale image, which I convert to black and white image, and
On the Windows Form application I have a Lamp image (a black and white
I have black and white image contained in a css: http://cl.ly/3G0E0g1e2G2h3k3U3F2O In the same
I have to make an application that recognizes inside an black and white image
How do you convert a grayscale OpenCV image to black and white? I see
What I am supposed to do. I have an black and white image (100x100px):
My issue is this: I have a black and white scanned image and I
I have a simple black and white only gif image (400x400px let's say). I

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.