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 - NKV

Pages: [1] 2 3 4
1
Hi,
As I understand, FIT Coordinate origin settings must act only on viewing of a FIT files.
In other words, all processing should be independent of the Coordinate origin settings. I am right?

But, ImageCalibration + Overscan produces different pixels data dependent of the Coordinate origin setting. Impossible to use saved ImageCalibration ProcessIcon. ;)

For me, it's very dangerous, because Overscan calibration going totally wrong.

Best regards,
Nikolay.
   

2
Bug Reports / International characters & PixInsight
« on: 2012 October 07 14:41:29 »
Hi,
I am try to improve one of my module and i have unsuccessful fighting with International characters in folders names.

Test number 1:
I create folder with Russian characters to test how my module handle international characters.
So, what i see... PixInsight 1.8 Linux64 Console output in Screen1.jpg:

PI core handle it without problem. My module not yet.

Test number 2:
I write in console some command with Russian word. PixInsight translate it to abracadabra.
Is it normal? See Screen.jpg.

3
Wish List / RTP 1:1 zoom
« on: 2012 October 05 17:58:09 »
is it possible to change size of RTP window to see image in 1:1 zoom ?

Best regards,
Nikolay.

4
Hi,
I try to convert BandingReduction script to module version and I have trouble with integer images.

There are simplest code:
Code: [Select]
img.Apply( fixFactor, ImageOp::Add );
img.Apply( fixFactor, ImageOp::Add ) don't work properly if img is integer image and fixFactor < 0.

To avoid the problem I use this code:
Code: [Select]
if ( fixFactor >=0 )
   img.Apply( fixFactor, ImageOp::Add );
else
   img.Apply( -fixFactor, ImageOp::Sub );

Which works fine. Look at PrintScreen with Original, Good and Bad results.

Mathematically ( img add fixFactor )  identical to ( img substract  -fixFactor )
So I not understand why I can't use negative fixFactor , especially if I sure that final result will positive? Is it bug or I doing something wrong?

Complete code:
Code: [Select]
class BandingReductionEngine
{
public:

   template <class P>
   static void Apply( Generic2DImage<P>& img, const BandingReductionInstance& instance )
   {
      ImageStatistics ss;
      ss.DisableVariance();
      ss.EnableRejection();

      Rect lineRect( img.Width(), 1 );
      for ( int c = 0; c < img.NumberOfNominalChannels(); c++  )
      {
         img.SelectChannel( c );
         ss.SetRejectionLimits( 0, 1 );
         ss << img;                           //   Generate MainImage Statistics
         double avgDev = ss.AvgDev();
         double median = ss.Median();

         double rejectionHigh = median + instance.sigmaFactor * 1.4826 * avgDev;
         if ( instance.highlightProtect )
            ss.SetRejectionLimits( 0, rejectionHigh );

         for ( int row = 0; row < img.Height(); row++ )
         {
            lineRect.MoveTo( 0, row );
            img.SelectRectangle( lineRect );
            ss << img;
            double fixFactor = median - ss.Median();
            //if ( fixFactor >=0 )
               img.Apply( fixFactor, ImageOp::Add );
            //else
            //   img.Apply( -fixFactor, ImageOp::Sub );
         }
         img.ResetSelection();
      }
      img.ResetSelections();
   }
};

5
PCL and PJSR Development / SpinStatus
« on: 2012 April 10 08:00:33 »
Hi,
I want use MorphologicalTransformation StructuringElement (13x13)
So I want update information in console during long calculation.

Please show me example for SpinStatus or other status monitoring solution.

Best regards,
Nikolay.

6
Hi,
I see sometimes users have difficulty in obtaining updates. To identify the problem I deleted a module just received through the system upgrade and I got a problem!  :) I don't see the module in "Process", I see module in "Installed Packages", PI gives me a "There are no updates currently available for your PixInsight installation."

OK, now solution:
1) Go to PixInsight folder and edit file updates.xri ( i do it in PI Script Editor )
2) Delete in the file a section with problematic module. For example if you have problem with CosmeticCorrection module look for the code:
Code: [Select]
   <package fileName="20120404-1-windows-x86_64-module.zip" sha1="3bf7f85adcce9a6d76ed50209f28bb455e871259" type="module" repo="http://update.pixinsight.com/" releaseDate="20120404" installDate="20120410022559">
      <title>CosmeticCorrection module version 1.2.0.3 (new module)</title>
      <description>
         <p>This update installs the first official version of the CosmeticCorrection tool, written by Nikolay Volkov. Although this tool is relatively new and is still undergoing extensive development, it has already reached an excellent stability and usability level.</p>
         <p>CosmeticCorrection allows you to fix defective pixels (hot and cold pixels) as well as column and row defects in your images. It work on monochrome CCD and OSC and DSLR CFA mosaiced images as a batch process, and has full real-time previewing capabilities. CosmeticCorrection has the potential to become an essential preprocessing tool in PixInsight.</p>
         <p>For more information on the development and features of the CosmeticCorrection tool, please refer to the corresponding thread on PixInsight Forum:</p>
         <p>http://pixinsight.com/forum/index.php?topic=3483.0</p>
         <p>Copyright (c) 2011-2012 Nikolay Volkov</p>
         <p>Copyright (c) 2012 Pleiades Astrophoto S.L.</p>
      </description>
   </package>
and remove it completely.
3) Save file and check updates. PI should restore the module.

Best regards,
Nikolay.

7
New Scripts and Modules / PCL: Comet Alignment module
« on: 2012 March 11 09:50:13 »
Hello everyone.

There are many topics about Comet preprocessing. click, click, click... but I don't found any useful tools for automation.

So, I start writing the CometAlignment modul.

How it's working:
1) Add star registered images with DATE-OBS keywords.
2) Click "Show" and click on comet in first and last images. Module must detect centroid coordinates. Use Ctrl to disable centroid detection. Also you can enter coordinates or comet velocity manually.
3) Apply. The module will shift the image in accordance with the DATE-OBS in FITS Keywords and with selected reference image.

Best regards,
Nikolay.

Version history:

v.1.0.0.0002
+ Support for RAW images. Note: while original MetaData unaccessible inside PI, I use FileLastModificationDate.
    For RAW images( which impossible to modify )  FileLastModificationDate equal to DATE-OBS + Exposure and equal to time when exposure ended. So FileLastModificationDate can be used if DATE-OBS FitKeyword and MetaData unavailable.

v.1.0.0.0003 Minor code improvements.
v.1.0.0.0004 BugFix: module skip all images if first Image disabled. fixed.
v.1.0.1.0001 + pixels/hour core movement parameter. BugFix: interpolation method was ignored - fixed.
v.1.0.2.0001 BugFix: process icon problem(impossible to load process icon) - fixed.
v.1.0.3.0001 PI 1.8 PCL2.0.
v.1.0.4.0001 BugFix: support for date format 'yyyy-mm-dd' and 'yyyy-mm-ddTHH:MM:SS'

Sources code for PI 1.7:
v.1.0.2.0001

Sources code for PI 1.8 PCL2.0.2:
v.1.0.4.0001

Bin for PI 1.7.x:
Linux x32
Linux x64
Win x32
Win x64

8
Bug Reports / RTP wrong Readout x,y position
« on: 2012 March 09 08:41:45 »
Hi.
Activate RTP(RealTimePreview) on small image (3x3 pixels). Move mouse to BottomRigth RTP corner, press and look at x,y.
You will see wrong x:1 , y:1.

Best regards,
Nikolay.

PS This error sends the wrong coordinates into the function virtual void pcl::ProcessInterface::UpdateReadout ( const View &  v, const DPoint &  p, double  R, double  G, double  B, double  A )

9
Bug Reports / DefectMap module: wrong result
« on: 2012 March 08 09:40:47 »
Hello.

There are wrong result in Minimum/Maximum Operation.

Look at DefectMapInstance.cpp code around Line#348
Code: [Select]
switch ( operation )
I think need to Sort pixels before switch ( operation ).
Otherwise, in case DMPOperation::Minimum:  f = pixels[0] is correspond to TopRight pixel which value can be not minimum value.

Just move code "pcl::Sort( pixels.Begin(), pixels.At( n ) );" from line#367 to line before "switch ( operation )".

Best regards,
Nikolay.

10
Hello Juan,

Take one more bug. Actually i found it in my CosmeticCorrection, but same problem in ImageCalibration:
Target Frames: Canon.CR2 images.
Output Sample format "16bit-integer" or "Same as target" .fit
Result: Absolutely blank image. See Log and Statistics.

Note:  Calibration is OK, if set Output Sample format to "32bit-float".

Best regards,
Nikolay.

11
Hi.
There are strange behavior with event handler OnEditCompleted.
To understand the problem, modify SandBox code (just add output to console if modification flag is active):
Code: [Select]
void SandboxInterface::__EditCompleted( Edit& sender )
{
if ( sender == GUI->ParameterFive_Edit )
{
if ( sender.IsModified() )
Console().WriteLn("ParameterFive IsModified() == true");
instance.parameterFive = sender.Text();
}
}

Run SandBox and make Console always visible. Enter some value in ParameterFive_Edit. Click outside SandBox. You will see first message(IsModified) in console). Everything looking good.
Now, Click on Title Sandbox interface... Do you see additional 3 messages IsModified?

Is it normal?

Best regards,
Nikolay.

12
PCL and PJSR Development / PCL: STF in RTP
« on: 2012 February 18 10:27:47 »
Hi,
For example: I want show in RTP inverted image. Of course, I must show inverted image with Inverted STF.

I can Invert STF and then apply it to parent View via the code :
Code: [Select]
// note: static String viewId = RTP view.FullId() set in RequiresRealTimePreviewUpdate
View view = View::ViewById( viewId );
View::stf_container stf;
view.GetScreenTransferFunctions( stf );
for ( int c = 0; c < 4; ++c )
{
float c0 = stf[c]->ShadowsClipping();
float c1 = stf[c]->HighlightsClipping();
float m = stf[c]->MidtonesBalance();

stf[c]->SetClipping( 1 - c1 , 1 - c0 );
stf[c]->SetMidtonesBalance( 1 - m );
}
view.SetScreenTransferFunctions( stf );
That code change parent View STF and RTP STF together.

Question: How to apply STF only to RTP view? Is it possible?

Best regards,
Nikolay.

13
Hi,
For example: I want to take image from some View and converted it to UInt16Image.
I can do it via:
Code: [Select]
UInt16Image image; // target

ImageVariant v = view.Window().MainView().Image(); // source

if ( v.IsComplexSample() )throw Error( "Complex images not supported" );

AbstractImage* i = v.AnyImage();

if ( v.IsFloatSample() ) switch ( v.BitsPerSample() )
{
case 32 : image.Assign( *static_cast<Image*>( i ) ); break;
case 64 : image.Assign( *static_cast<DImage*>( i ) ); break;
}
else switch ( v.BitsPerSample() )
{
case  8 : image.Assign( *static_cast<UInt8Image*>( i ) ); break;
case 16 : image.Assign( *static_cast<UInt16Image*>( i ) ); break;
case 32 : image.Assign( *static_cast<UInt32Image*>( i ) ); break;
}

Please answer: Is it best method or there are more easy way?

Best regards,
Nikolay.

14
Hi,
I try avoid unnecessary Statistics calculation in GenerateRealTimePreview route.
I can check via view.Window().MainView().AreStatisticsAvailable()
But how to check IsLowRejectionEnabled() before calling .GetStatistics( statistics_container ) ?
Or how to set EnableRejection() before calling .CalculateStatistics() ?
 
Is it possible? Especially in pcl::ProcessInterface::GenerateRealTimePreview route?

Best regards,
Nikolay.

15
Hi,
There are PCL MorphologicalTransformation method:
Code: [Select]
MedianFilter M;
BoxStructure sK(3);
MorphologicalTransformation MT(M,sK);
MT >> filteredImage;

Please show me PCL example to define Structure shown on picture in attachment.

Best regards,
Nikolay.

Pages: [1] 2 3 4