Author Topic: Plot intensity values of pixels along a line  (Read 3022 times)

Offline guy

  • Newcomer
  • Posts: 6
Plot intensity values of pixels along a line
« on: 2016 February 15 09:10:43 »
Hello,

Is there a process inside PI allowing to do a plot of the intensity values of pixels along a straight line (defined by two points), in a gray or RGB image ? or at least to extract pixel values into a text file ?

Thanks,
Guy

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Plot intensity values of pixels along a line
« Reply #1 on: 2016 February 15 10:15:44 »
PixelMath allows this:
Step 1:
pixel($T,xpos(),height($T)/2)
takes a line defined by height($T)/2)
this half height expression can also be replaced by any number with a valid line number value in the y axis of your image. (So, if the Image ist 500 lines high
you can use any number between 1 and 500)

Step 2:
iif(abs((1-$T)*height($T)) > ypos(), 0,$T)
Displays the profile according to the brightness of the pixels in the pixel line from step 1

Copy the Expression of Step 1 into the PixelMath process,  drag the triangle over the Image
and this changes your Image to have all lines the same Pixels as the selected line.

Copy the Expression of Step 2 into the PixelMath process, drag the triangle over the Image
in this changes your Image to plot a Profile according to the brightness of each Pixel.


Gerald
« Last Edit: 2016 February 15 10:22:41 by oldwexi »

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Plot intensity values of pixels along a line
« Reply #2 on: 2016 February 15 17:55:33 »
Menu >> Script >> Render >> 3DPlot

Offline guy

  • Newcomer
  • Posts: 6
Re: Plot intensity values of pixels along a line
« Reply #3 on: 2016 February 27 06:15:06 »
Hi Gerald and NKV, I tried both methods and both worked.

Thank you,
Guy