Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - David Serrano

Pages: [1] 2 3 ... 8
1
General / HDRComposition: Incompatible image geometry
« on: 2015 September 27 03:28:59 »
I'm trying to HDR compose 3 images and I'm finding this:

Code: [Select]
HDRComposition: Global context

Opening files:
/home/hue/IMG_003510.CR2

Timestamp: Sun Jun  7 16:26:09 2009
Camera: Canon EOS 40D
ISO speed: 100
Shutter: 1/1024.0 sec
Aperture: f/19.9
Focal length: 18.0 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size:  1936 x 1288
Full size:   3944 x 2622
Image size:  3908 x 2602
Output size: 2602 x 3908
Raw colors: 3
Filter pattern: RG/GB
Daylight multipliers: 2.444244 0.930336 1.163797
Camera multipliers: 2335.000000 1024.000000 1367.000000 1024.000000

Invoking: dcraw -4 -o 0 -w -q 2
Decoding Canon EOS 40D file (3908x2602 pixels, ISO=100, Exposure=1/1024s): done
Loading raw image: done
/home/hue/IMG_003511_r.fit
*** Error: /home/hue/IMG_003511_r.fit: Incompatible image geometry.
<* failed *>

It's one CR2 and two FIT images, these two being the result of a FFTRegistration made earlier this week.

Then I opened the 3 images to check their geometry:

Code: [Select]
Reading 3 image(s):
/home/hue/IMG_003510.CR2

Timestamp: Sun Jun  7 16:26:09 2009
Camera: Canon EOS 40D
ISO speed: 100
Shutter: 1/1024.0 sec
Aperture: f/19.9
Focal length: 18.0 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size:  1936 x 1288
Full size:   3944 x 2622
Image size:  3908 x 2602
Output size: 2602 x 3908
Raw colors: 3
Filter pattern: RG/GB
Daylight multipliers: 2.444244 0.930336 1.163797
Camera multipliers: 2335.000000 1024.000000 1367.000000 1024.000000

Invoking: dcraw -4 -o 0 -w -q 2
Decoding Canon EOS 40D file (3908x2602 pixels, ISO=100, Exposure=1/1024s): done
Loading raw image: done
/home/hue/IMG_003511_r.fit
27 FITS keywords extracted
ICC profile extracted: 'sRGB IEC61966-2.1', 3024 bytes
Reading FITS: 16-bit integers, 3 channel(s), 2602x3908 pixels: done
/home/hue/IMG_003512_r.fit
27 FITS keywords extracted
ICC profile extracted: 'sRGB IEC61966-2.1', 3024 bytes
Reading FITS: 16-bit integers, 3 channel(s), 2602x3908 pixels: done

So geometry is 2602x3908 in all cases. It should work, right? But I noticed that when decoding the CR2 it says:

Code: [Select]
Image size:  3908 x 2602
Output size: 2602 x 3908

So it switches from "landscape" to "portrait", so to speak. If I open the JPG that was created by the camera alongside the CR2, it opens in "landscape". This may have something to do…

Is it a bug? ;). If not, what can I do besides the obvious step of rotating the first (CR2) image?

2
General / Does GREYCstoration depend on scale?
« on: 2015 May 22 17:50:08 »
I'm killing the noise in this Corona Borealis shot:



With the parameters that can be seen there, this is the result for the first preview:



Pretty poor indeed, but in p02 things do change:



Wow, we're improving, although I can't understand why. I thought this tool gave the same results regardless the size of the view. If applying on p03 we get:



Pretty much the same, although a couple of faint stars are no longer there. Not good… then, applying to the whole image:



Lots of stars go away :(.

Now, I'm aware that some processes like HDRMultiscaleTransform are scale-sensitive and it's pointless to use previews with them. But I've always regarded GRECYstoration as not falling into this category so I'm pretty surprised (and mystified) by these results. Is there any plausible explanation for this?

FWIW, I'm running with 'parallel --disable' because of this, which I'm still experiencing in PixInsight 1.8.

3
In CurvesTransformation, CIE c* doesn't seem to be transformed when CIE a* is also touched. However, if a* is reset and we edit b* instead, then c* is honoured. This alone is why I'm posting under "Bug reports".

Code: [Select]
var P = new CurvesTransformation;
P.R = [ // x, y
   [0.00000, 0.00000],
   [1.00000, 1.00000]
];
P.Rt = CurvesTransformation.prototype.AkimaSubsplines;
P.G = [ // x, y
   [0.00000, 0.00000],
   [1.00000, 1.00000]
];
P.Gt = CurvesTransformation.prototype.AkimaSubsplines;
P.B = [ // x, y
   [0.00000, 0.00000],
   [1.00000, 1.00000]
];
P.Bt = CurvesTransformation.prototype.AkimaSubsplines;
P.K = [ // x, y
   [0.00000, 0.00000],
   [1.00000, 1.00000]
];
P.Kt = CurvesTransformation.prototype.AkimaSubsplines;
P.L = [ // x, y
   [0.00000, 0.00000],
   [1.00000, 1.00000]
];
P.Lt = CurvesTransformation.prototype.AkimaSubsplines;
P.a = [ // x, y
   [0.00000, 0.00000],
   [0.48930, 0.52941],
   [1.00000, 1.00000]
];
P.at = CurvesTransformation.prototype.AkimaSubsplines;
P.b = [ // x, y
   [0.00000, 0.00000],
   [1.00000, 1.00000]
];
P.bt = CurvesTransformation.prototype.AkimaSubsplines;
P.c = [ // x, y
   [0.00000, 0.00000],
   [0.03743, 0.42513],
   [1.00000, 1.00000]
];
P.ct = CurvesTransformation.prototype.AkimaSubsplines;
P.H = [ // x, y
   [0.00000, 0.00000],
   [1.00000, 1.00000]
];
P.Ht = CurvesTransformation.prototype.AkimaSubsplines;
P.S = [ // x, y
   [0.00000, 0.00000],
   [1.00000, 1.00000]
];
P.St = CurvesTransformation.prototype.AkimaSubsplines;

To reproduce: open an image, open CT, edit its source code, paste that, apply to the image. What this does is alter CIE a* a bit, and do an obvious modification to CIE c*. However, c* is, in this computer at this moment, ignored. (edit: Real-Time Preview works as expected)

To rule out the possibility of being bitten by a memory corruption that might have happened elsewhere during the previous 2 hours of PixInsight'ing, I restarted the program—however I could immediately reproduce this. Can anyone else try, please?

4
Wish List / DynamicCrop has it backwards. And, thirds.
« on: 2015 May 05 12:08:54 »
DynamicCrop works by interactively letting the user choose an area to crop. This area is displayed with reduced contrast. However, wouldn't it make more sense to reduce the contrast (and/or brightness!) of the area outside the crop? Cropping is useful not only for easily getting rid of unwanted things near the borders, but it's also a composition tool. It's useful to be able to concentrate on the resulting image by having it displayed unmodified, while the uninteresting parts are obscured.

And, since it's a composition tool, it could very well display a couple of vertical and horizontal lines at 33/67% of width/height. Or maybe at Fibonacci's 38.2/61.8%. Those would also help when a diurnal landscape image is tilted and we want to rotate it to get a horizon that honours it's name :).

5
Wish List / Keep zoom level when cloning a preview
« on: 2015 May 02 16:02:58 »
When trying differents sets of parameters of the same tool (or even different tools, eg. NR processes) I usually work with several identical previews so I can compare between them by Ctrl-Left'ing/Ctrl-Right'ing. To clone a preview I just drag its selector downwards to the empty space below (but the same can be accomplished in the menu Preview > Clone Preview).

However doing so creates the new preview with 1:1 zoom. I find myself constantly duplicating a preview and then reducing the zoom level of the new one to match that of the original one. Could we have it so that the new preview is created with the same zoom as the original?

6
Line 668 of 3DPlot.js reads as follows:

Code: [Select]
   ApplySTF(src, perspecParams.srcView.stf);
It applies the view's STF unconditionally, which is a bug to me because if I disable the STF for this view, 3DPlot still applies it, generating a plot that doesn't match what is currently being displayed.

I was going to wrap that line inside an if() ("if stf is enabled for a given view") but needed some details on what to evaluate. Unfortunately the class browser seems to have disappeared (it's been 8-10 years since I last used PixInsight regularly). The PJSR include files in include/pjsr/* don't tell the whole story and if I go to the online PCL doc at http://www.pixinsight.com/developer/pcl/doc/html/ and search for "stf" I get zero results.

Well, I tried :). Any pointers, anyone?

7
General / STF to HT inconsistency
« on: 2015 April 06 14:09:55 »
Hi,

While browsing this forum the other day I learned that you can drag the Instance triangle of STF into the bottom bar of the HT window in order to transfer the transformation from one process to the other. Neat :). However, having already upgraded my Pixi to 1.8.3.1123, I'm hitting some unexpected funcionality.

I want to use the red channel as a basis to build a mask. So I extracted it and played with its STF for a minute to gauge if this was going to be a good approach or not. I clicked on "White point readout", then selected a bright point in the image, then "Black point readout" and finally selected a dark point. This being a grayscale image, only the red channel of the STF was adjusted, which makes some sense because this image has only one channel (but its label could be called "R/K" instead of just "R", bah, nothing[1]). The button "Link RGB channels" is active.

(I extracted the green channel and repeated the process, again in the STF window only the red channel changed. Who knows, it could be the green :)).

After some additional adjustments in the STF red channel only, I dragged the Instance triangle towards HT, only to see that the histogram of the red channel was transferred. I totally expected the RGB/K curve to be affected by this action. The view selector dropdown in HT was already set to show the histogram of this grayscale image, so HT knows that I'm working with it.

So I took advantage of this little marvel "Edit instance source code" button to copy and paste the values in the STF red channel to the green and blue. Now, when dropping an instance of it into HT I get the expected result.

If this is deemed a PixInsight problem (instead of a user one :P, which I'm not totally ruling out) I guess the fix would be to adjust all three channels in STF when reading out of a grayscale image. Or either change "R" into "R/K" and do what it means.



1.- Spanish "minucias" :).

8
To rehash old habits of mine :), I think I've found a bug in GREYCstoration. But first, I'd like to point out I'm using PI 1.7.4-0759 due to PI 1.8 not working in Debian wheezy (which ships an older libc despite being the latest stable release). So the GREYC version is 01.00.02.0124. I've searched the forum and found nothing like this.



Notice how the center of the image is considerably more blurred than the upper and lower areas. To replicate, please download the original image and the xpsm, which is nothing more than a STF (to highlight the noise) and the relevant GREYCstoration instance, with default parameters and 3 iterations.

(Next post telling that this is fixed in PI 1.8 in 3, 2, 1…)

9
General / Minimum window size
« on: 2014 February 23 04:32:58 »
It's been a long time since I last visited this part of the internet :).

I have a bug report in the pipe, unfortunately my ancient Ubuntu isn't able to run PI 1.8 due to the libc version requirement so I'm withholding it until I upgrade my system. That should happen soon (really).

In the meanwhile I run PI 1.7.4 without maximizing the PI window, however I wonder why I'm unable to resize it to less than a given size (namely 1233x746). My desktop is 1366x768 and maximized windows are 1207x768 (due to the gnome panel and another application that is visible on all virtual desktops). You see, 1233 is greater than 1207 so the window is wider than I'd like.

Not a big deal, mind you, just curiosity :). Other applications aren't reluctant to be resized to ridiculous and useless values, e.g. my google chrome can be set to as low as 207x63.


Edit: ah, if I close any open image I can resize down to 841x746.

10
Bug Reports / STF sliders misbehaviour
« on: 2009 November 06 10:09:12 »
Long time! ;)

This is about STF, I've managed to break it:

- Click near the shadows slider. It goes to 0.05 or so.
- Click-and-drag the midtones slider to 0.00. That's to say, click near it and drag it to the point where it matches the shadows slider.
- Click anywhere near this point:
  - If clicking at the left, I would expect to adjust the shadows slider.
  - If clicking at the right, I would expect to adjust the midtones slider.
  - However, in any case, it's the highlights slider that is adjusted.

From this point on, you can't adjust the shadows or midtones slider, only the highlites one. You can restore the entire GUI  using the usual restore button at the lower right corner.

The status of "Link RGB channels" doesn't make any difference.

11
Bug Reports / ProcessingConsole can't be made smaller
« on: 2009 August 12 13:48:17 »
Hi there,

In previous versions of the platform I was able to reduce the size of the ProcessingConsole, but when I try to do it now, the cursor moves out of the corner and the window remains the same size. If I move the cursor again towards the corner, the Console gets bigger.

12
Off-topic / White balancing a daytime image
« on: 2009 August 05 11:53:24 »
Folks,

When I shoot in RAW mode, my Canon 40D gives me images with a strong red cast. I assume that's caused by it not applying the white balance to the RAWs. Now, for the astronomical pictures, I guess that it gets resolved in the ColorCalibration step, but I don't think this applies to daytime images, since in these cases we not always have a reliable white reference to give to CC. So, how to proceed then? Can the white balance be extracted somehow from the JPGs (I don't think so)?

Edit: changed "diurnal" to "daytime", thanks Sander ;)

13
Tutorials and Processing Examples / MOVED: Cap-Heraclides
« on: 2009 April 30 16:15:48 »
Moved, the new location is http://pixinsight.com/forum/index.php?topic=1095.0. Thanks ;)

14


Click on a small image (not beyond 100x100) to make it active and run the script. Previews are OK.

Hacer clic en una imagen pequeña (no mucho más de 100x100) para hacerla activa, y ejecutar el script. Se pueden usar previews.

Code: [Select]
#include <pjsr/UndoFlag.jsh>
#include <pjsr/FillRule.jsh>

var xform_cache = [];
function xform_coords (x, y, z) {
    var k = format ('%05d%05d%6.5f', x, y, z);
    if (xform_cache[k]) { return xform_cache[k]; }

    var angle = 10/180*Math.PI;
    var alt = 60/180*Math.PI;
    var new_x = x; var origin_x = 14;
    var new_y = y; var origin_y = 14;
    var scale = 7;

    // rotation
    var mod = Math.sqrt (
        Math.pow (Math.abs (origin_x - x), 2) +
        Math.pow (Math.abs (origin_y - y), 2)
    );
    var cur_angle = Math.atan2 (origin_y - new_y, new_x - origin_x);
    //console.writeln ('got x (',x,') y (',y,') mod (',mod,') cur_angle (',(cur_angle/Math.PI*180),')');
    new_x = origin_x + mod * Math.cos(cur_angle - angle);
    new_y = origin_y - mod * Math.sin(cur_angle - angle);
    //console.writeln ('new x (',new_x,') y (',new_y,')');
    //console.writeln ('--');

    // scaling and perspective
    new_x *= scale;
    new_y *= scale / (Math.PI/2 / alt);  // alt == 90/2?  perspective = scale/2
   
    // translation
    new_x += 180;
    new_y += 150;

    // z
    new_y -= scale * scale * scale * z * Math.cos (alt);

    return xform_cache[k] = new Point (new_x, new_y);
}

var pixel_cache = [];
function getpixel (i, x, y) {
    var k = format ('%05d%05d', x, y);
    if (pixel_cache[k]) { return pixel_cache[k]; }

    return pixel_cache[k] = Math.avg (
        i.sample (x, y, 0),
        i.sample (x, y, 1),
        i.sample (x, y, 2)
    );
}

var src = ImageWindow.activeWindow.currentView.image;
var w = new ImageWindow (12*src.width, 12*src.height, 3, 8, false, true, '_3dplot');
var v = w.currentView;
var i = v.image;

// setup
var white_pen   = new Pen (0xffffffff);
var black_pen   = new Pen (0xff000000);
var red_pen     = new Pen (0xffff0000);
var white_brush = new Brush (0xffffffff);
var black_brush = new Brush (0xff000000);
var red_brush   = new Brush (0xffff0000);

var bmp = new Bitmap (i.width, i.height);
var g = new Graphics (bmp);
v.beginProcess (UndoFlag_PixelData);
    bmp.fill (0xff008000);
    g.pen = red_pen; g.brush = white_brush;
       
    for (var n = 0; n < src.height-1; n++) {
        for (var m = 0; m < src.width-1; m++) {
            var p1 = xform_coords (m,   n,   getpixel (src, m,   n  ));
            var p2 = xform_coords (m+1, n,   getpixel (src, m+1, n  ));
            var p3 = xform_coords (m+1, n+1, getpixel (src, m+1, n+1));
            var p4 = xform_coords (m,   n+1, getpixel (src, m,   n+1));
            g.drawPolygon (new Array (p1, p2, p3, p4));
        }
    }
    i.blend (bmp);
    g.end();
v.endProcess();
w.show();


I didn't study in the university and this is the first time I try this kind of things, so I'd like to apologize to all those who read the code and take any offense at it ;).

No he ido a la universidad y es la primera vez que intento hacer esta clase de cosas, así pues pido disculpas a aquellos que lean el código y se vean profundamente ofendidos por él ;).

15
PCL and PJSR Development / Receiving events?
« on: 2009 April 03 01:11:56 »
Hmmm I just have a couple of evil ideas cooking up deep at the back of my mind... :twisted:

I see that Statistics is able to follow the changes made to an image and show the new set of statistics without requiring the user to take any action. Could this, or something similar, be done from javascript? Are there any means to "subscribe" to an view and receive events when something happens to it?

I don't think so, since this would require the script to run for an indefinite amount of time, concurrently with any other actions the user may want to take... but here is the question anyway!

Edit: changed "image" to "view".

Pages: [1] 2 3 ... 8