Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2025

Re: Extract RGB values from image

From sfeam <sfeam@users.sourceforge.net>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: Extract RGB values from image
Date 2013-09-09 10:18 -0700
Organization gnuplot development team
Message-ID <l0kvu1$51d$1@dont-email.me> (permalink)
References <b9605mF1vhuU1@mid.individual.net>

Show all headers | View raw


Ingo Thies wrote:

> Hi all,
> 
> I am trying to extract RGB values from images via binary input and "set
> table":
> 
> set table 'testimage.asc'
> plot 'someimage.jpg' binary filetype=jpg with rgbimage
> unset table
> 
> However, gnuplot refuses to write out the RGB values, and instead I only
> get something like
> 
> # x y type
>  0  276  i
>  1  276  i
>  2  276  i

Please report the version of gnuplot being used.

The output I get here using current 4.6 is:

# Curve 0 of 1, 46080 points
# Curve title: "'r3d_example2.jpeg' binary filetype=jpeg"
# x y  red green blue alpha type
 0  191    0    0    0  255  i
 1  191    0    0    0  255  i
 2  191    0    0    0  255  i


Version 4.4 produces instead the warning:
"Tabular output of rgbimage plot style not fully implemented"

So I'm guessing the version you have is older yet?


	Ethan



>  3  276  i
>  4  276  i
>  5  276  i
>  6  276  i
>  7  276  i
>  8  276  i
> ...
> 
> Is there a way to write out the RGB values (maybe as hex strings) for
> each pixel?
> 
> Best wishes,
> 
> Ingo

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Extract RGB values from image Ingo Thies <ingo.thies@gmx.de> - 2013-09-09 15:18 +0200
  Re: Extract RGB values from image sfeam <sfeam@users.sourceforge.net> - 2013-09-09 10:18 -0700
    Re: Extract RGB values from image Ingo Thies <ingo.thies@gmx.de> - 2013-09-11 11:39 +0200
      Re: Extract RGB values from image sfeam <sfeam@users.sourceforge.net> - 2013-09-11 11:08 -0700
        Re: Extract RGB values from image Ingo Thies <ingo.thies@gmx.de> - 2013-09-11 21:36 +0200
          Re: Extract RGB values from image Ingo Thies <ingo.thies@gmx.de> - 2013-09-16 09:02 +0200

csiph-web