PixInsight Forum (historical)

Software Development => New Scripts and Modules => Topic started by: NKV on 2011 November 10 09:58:40

Title: PCL: Blink module
Post by: NKV on 2011 November 10 09:58:40
Hello everyone.

PCL reincarnation of the Animation Script. (http://pixinsight.com/forum/index.php?topic=1895)

Best regards,
Nikolay.

Version history:
1.0.1.0002 - zoom rounding problem fixed. ToolTips expanded and added.
1.0.2.0001 - Improved CropTo green rectangle: Defined Preview used for.
1.0.2.0002 - Add: Play to selected Preview.  ;) ScrollControl rectangle visualization and management improved.
1.0.3.0001 - Add: Statistics & FITSKeyword output to Console, GUI & File.txt
1.0.5.0001 - Add: Sorting by statistics & KeyWorkds.
1.0.6.0001 - Add: Button MoveToFolder

1.1.1.0001 - Add: Make Video ( avconv required for coding,  to install it in Ubuntu: ~$ sudo apt-get install libav-tools ).
Note: PixInsight under Windows not supported folder/file names with regional symbols.

1.1.2.0001 - Improved STF usability. Make Video with STF. You can define STF manually in STF module and apply to Blinking screen and make Blink.avi with same brightness.
1.1.3.0001 - BugFix: Spaces and regional symbols in folder/file name.
1.1.4.0001 - build for PI1.8RC3
1.2.1.0001 - Make Video adapted for Linux and Windows OS.

Title: Re: PCL: Blink module
Post by: NKV on 2011 November 10 09:59:28
Blink v1.2.1
Sources code (http://endor.uv.es/files/data/public/28779d.php)

Bin:
Linux64 (http://endor.uv.es/files/data/public/330d53.php)
Win64 (http://endor.uv.es/files/data/public/c9e17c.php)
Win32 (http://endor.uv.es/files/data/public/5d712a.php)
Title: Re: PCL: Blink module
Post by: Harry page on 2011 November 10 10:51:16
Hi

Excellent stuff , one of my fav  :D

Does hang a bit(consol stops till fin ) when doing hist to all images

Many thanks

Harry
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2011 November 10 11:07:01
Excellent!

Does hang a bit(consol stops till fin ) when doing hist to all images

To keep the interface responsive (screen updates etc), Just call ProcessEvents() in each loop http://pixinsight.com/developer/pcl/doc/html/classpcl_1_1ProcessInterface.html#aac3a7129a06110eab0f6584c7111b2d0.
Title: Re: PCL: Blink module
Post by: Enzo De Bernardini on 2011 November 10 21:02:06
Excelent!, thanks Nikolay!  :D
Title: Re: PCL: Blink module
Post by: NKV on 2011 November 11 06:16:53
Does hang a bit(consol stops till fin ) when doing hist to all images
Fixed.
Title: Re: PCL: Blink module
Post by: sleshin on 2011 November 11 06:54:12
Hi NKV,

I'm confused(not unusual for me). Is this Blink Script to replace the Animation Script or is this something new that is doing something different than Animation?

Steve
Title: Re: PCL: Blink module
Post by: NKV on 2011 November 11 07:42:57
Is this Blink Script to replace the Animation Script or is this something new that is doing something different than Animation?
I write it to replace the Animation Script. Current PCL version don't cover all features of script version, but in near future it will more powerful... i hope...
Title: Re: PCL: Blink module
Post by: Lex on 2011 November 11 07:44:30
Hi,

i still do not understand what is meant with this script? What does it really do?  ???

Thanks
Title: Re: PCL: Blink module
Post by: NKV on 2011 November 11 08:09:12
i still do not understand what is meant with this script? What does it really do?  ???
If you have huge qty of images from one good photo session and before make masterFiles you want to be sure that all images is OK. No errors during readout from camera, temperature divination not so big, etc. So you need fast method to sort the images and delete bad. Fastest method it is visual inspection or numeric inspection of statistics of each image.  The Blink module can help to you.

Also if you take lights between clouds and you don't sure which is bad/good, just try Blink module to see how sky condition changed during night.
Title: Re: PCL: Blink module
Post by: Harry page on 2011 November 11 12:16:00
Hi
Excellent  8)   eerr where is it

Harry

Does hang a bit(consol stops till fin ) when doing hist to all images
Fixed.
Title: Re: PCL: Blink module
Post by: Lex on 2011 November 11 13:11:19
Nikolay,

Hmmm, sounds great, gotta try it out soon!
Thanks for the explanation!
Title: Re: PCL: Blink module
Post by: NKV on 2011 November 12 03:54:10
1.0.2.0001 - Improved CropTo green rectangle: Defined Preview used for.

add:
1.0.2.0002 - Add: Play to selected Preview.  ;) ScrollControl rectangle visualization and management improved.
Title: Re: PCL: Blink module
Post by: NKV on 2011 November 24 05:40:22
1.0.3.0001 - Add: Statistics & FITSKeyword output to Console, GUI & File.txt
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2011 November 26 02:12:31
Hi Nikolay,

Did I mention you're doing a fantastic work? ;)

How about releasing these tools through the update repository? If you agree, we can arrange it for next week.
Title: Re: PCL: Blink module
Post by: NKV on 2011 November 26 20:44:03
How about releasing these tools through the update repository? If you agree, we can arrange it for next week.
Yes, please. I will happy!
Also, because more and more tools for analyzing images, perhaps it makes sense to put them in a separate folder. "menu>process>ImageInspection". If you agree, I will edit AberationSpoter and Blink modules according.

Best regards,
Nikolay.
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 January 07 03:46:27
Hi Nikolay,

Well, everything seems to be relatively quiet now (translation: I only have to do the work of 2-4 persons, instead of 4-6), so I think it's time to review and release these nice modules. I refer to this one and StarMonitor. I need the source code for revision and to prepare a release for all platforms. Are you ready?
Title: Re: PCL: Blink module
Post by: NKV on 2012 January 10 19:32:09
Are you ready?
Yes! I mailed SCode for Blink module to you.

About StarMonitor, I think the module not yet ready. I wont add more features soon.

Best regards,
Nikolay.
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2012 January 21 16:15:56
Just got the update for the blink module in PI. Fantastic work. Used it immediately. Wishlist (of course, what else. Appetite comes with eating):
- blue triange for storing current settings
- help button with documentation
- it would be nice to be able to sort the images by values of the statistics. Clicking on the column head should to this trick.
- would it be possible to not only include FITS keywords, but also values embedded in RAW file, such as aperture, time+date of exposure, ...? I see that it already gets the exposure length.
- would it be possible to add RAW format hints (as in image calibration for example)?

Great tool!

Georg
Title: Re: PCL: Blink module
Post by: NKV on 2012 January 22 03:28:31
Juan, thank you for publish the module. And thank you for fix the code ( for me very interesting to see how you fix some parts ).

Georg, give me a some days.

Best regards,
Nikolay.
Title: Re: PCL: Blink module
Post by: troypiggo on 2012 January 22 13:22:18
Is this a Windows-only module?  Nothing for Mac?
Title: Re: PCL: Blink module
Post by: pfile on 2012 January 22 13:33:01
no, the mac version is included in the official update that just came down. i used it last night - it can animate really fast compared to the script version!
Title: Re: PCL: Blink module
Post by: troypiggo on 2012 January 22 17:36:12
Aah, I see.  Just downloaded it and played with it.  Awesome!  Thankyou!
Title: Re: PCL: Blink module
Post by: NKV on 2012 January 25 20:12:57
Hello Juan,

You changed logic of the module at close of the user interface.
The module displays pictures from memory. A lot of pictures = a lot of memory. My version is freed memory when user hide the interface. (push X at TopRight)
Your version leaves all the images in memory until the user forcibly remove the files from the interface.
I guess that is not an advanced user will be surprised, not knowing why PI has taken so much memory.

Perhaps it makes sense to notify the user and to make a choice when user hide the interface? Dialog pops up: "Free memory? Yes / No"

Waiting for your opinion
Nikolay.
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 January 25 23:52:52
Hi Nikolay

The OnHide() event is generated each time the interface is hidden with respect to PI's workspace. That means this event will be received (1) when the interface is shadowed, (2) when the user switches between workspaces, (3) when the interface is closed by clicking the x button, and since interfaces are top-level windows, (4) as a result of platform-dependent spontaneous hide events sent by the underlying operating system and/or window manager. Currently there's no way to know the actual reason that has triggered an OnHide() event. In future versions of PCL we'll have a richer set of events available to the Control and ProcessInterface classes.

I disabled the automatic memory clear feature mainly due to (1) and (2), as it is very annoying to have everything lost during a Blink session each time you want to minimize the interface, or if you have to change momentarily to a different workspace for any reason. On the other hand, the standard behavior of all static tools in PixInsight is to preserve their current settings, irrespective of whether their windows are visible or not, and Blink shouldn't be an exception. In fact, I think most experienced PixInsight users would be surprised if all selected files are lost when they open the Blink tool after a previous session.

Don't worry about memory consumption in the Blink tool. Once a set of images has been loaded, the user is responsible for their deallocation when they are no longer needed. A warning message box each time the tool is hidden would generate more annoyance than benefit, in my opinion.
Title: Re: PCL: Blink module
Post by: NKV on 2012 January 26 00:35:46
Thank you for explanation. Now I absolutely agree with you.
Best regards,
Nikolay.
Title: Re: PCL: Blink module
Post by: NKV on 2012 January 28 06:58:17
- it would be nice to be able to sort the images by values of the statistics. Clicking on the column head should to this trick.
There are problem: I don't see PCL event handler on TreeBox sorting by mouse click on TreeBox Header. So, I don't know when I must re-calculate real blinkMaster position after sorting. I need onTreeBoxHeaderClick event handler. Juan ???
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 January 28 08:11:07
Have you tried with:

TreeBox::EnableHeaderSorting()

If you call this member function for your TreeBox control (for example, in BlinkInterface::GUIData::GUIData()), the user will be able to sort files by header items, by clicking them in the usual way.

Let me know if this is what you want to do. The upcoming new PCL version will provide more event handlers to control TreeBox header items.
Title: Re: PCL: Blink module
Post by: NKV on 2012 January 28 09:27:12
I know about TreeBox::EnableHeaderSorting(), but if user click(sort row by header items) I need to know about. So I need event handler.

 
Title: Re: PCL: Blink module
Post by: NKV on 2012 January 29 21:48:52
- it would be nice to be able to sort the images by values of the statistics. Clicking on the column head should to this trick.
Done. Ver.1.0.5 in post#1

Title: Re: PCL: Blink module
Post by: Mike Reid on 2012 January 31 17:16:25
Nikolay,

Just wanted to say, "well done!"  This module works great and eliminates the last reason that I was keeping around CCDStack.

Thanks,
Mike
Title: Re: PCL: Blink module
Post by: JamieInCLT on 2012 March 03 07:44:49
How do you load/find the blink module?

I am on the demo version, on a mac.  I don't see Blink under processes -> all processes, and I don't have a processes -> ImageInspection category.

I see the blinkModule listed in the update history, but don't see how to start it.

I re-downloaded and installed the updates again to no avail.  Am I looking in the wrong place?

Thanks
Title: Re: PCL: Blink module
Post by: Carlos Milovic on 2012 March 03 10:05:46
Go to the main menu, under Process, Modules, and Install Modules. Click on Search, and then install the new modules. It should find the blink module, and install it right away, no need to restart PI.
Title: Re: PCL: Blink module
Post by: JamieInCLT on 2012 March 03 10:11:14
That did the trick, Thank you!
Title: Re: PCL: Blink module
Post by: budguinn on 2012 March 04 08:24:45
Nikolay,

This is just a wonderful implementation of my (somewhat simple request) to be able to 'eyeball' the images quickly.
This is miles past what I had hoped for, and just want to say thanks for all of the hard work.

best regards,

bud
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 04 18:46:04
Welcome!
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 14 07:27:21
I have got new skill. I can compile module for Linux x64. But unfortunately, there are no good place for publication.
So if you need latest version for Linux x64, show me your email via PM.

Best regards,
Nikolay.
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2012 March 15 13:53:13
Hi Nicolay

Thank you for the module. I installed Blink in bin folder but Install Module tool does not found it. I think that it is because I have Ubuntu 11.10

Saludos.
Alejandro.
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 15 20:34:17
I installed Blink in bin folder but Install Module tool does not found it. I think that it is because I have Ubuntu 11.10
I use same Ubuntu 11.10. See PrintScreen.

Please check:
Do you see any version of Blink module in PI menu > Processes > Module > Manage Modules ?
If Yes, which version? ( latest 1.05.0001 )

Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2012 March 15 21:04:21
Oppsss!!. It appeared   ::)

Thank you Nicolay
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2012 March 16 01:20:23
...But unfortunately, there are no good place for publication...
How about publising it via Juan's update-develop repository?
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 16 02:15:48
...But unfortunately, there are no good place for publication...
How about publising it via Juan's update-develop repository?
Juan, do it please.
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 March 16 02:31:23
Morning!  Someone called me? :D

OK, I'm going to build and publish your module for all platforms --- sorry for the delay but I've been real busy these days. However, why through update-devel instead of update? Isn't this a release version?
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 16 02:36:08
However, why through update-devel instead of update? Isn't this a release version?
Via standard update much better. It's release version. The source code in first post. Thank you!
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 March 16 02:42:56
No, thank YOU :) Your module will be released as an update today.
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 March 16 04:52:05
Nikolay,

Quote
The source code in first post.

Either I am really thick, or I guess you forgot to attach the source code. There are compiled modules but no source...  ::)
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 16 06:37:48
Either I am really thick, or I guess you forgot to attach the source code. There are compiled modules but no source...  ::)
Sorry... Added. Take Blink.rar in first post.
Title: Re: PCL: Blink module
Post by: Josh Lake on 2012 March 16 08:48:49
The Blink module has been a MAJOR boon to my workflow, and I thank you all for your efforts on it.

One feature request for a potential future version -- specific FITS header info displayed along with the image. I've been dealing with some rather unruly data and have had to Blink quite a bit through it, looking to track down some exposure errors and chip defects. Parameters that I'm tracking include CCD temp, exposure time, and date/time of the exposure. For now, I use the FITSHeader tool to cycle through them, but having information like that available right in Blink would be huge.
Title: Re: PCL: Blink module
Post by: mmirot on 2012 March 16 09:15:55
There is also a basic fits key word tool that help sort files by key words.
It helped me sort out a flat matching mess or two.

Anything that helps data organized is a great benefit to my work flow.  Database tools are needed using the fits.

Any advancement in fits info or image sorting functions would be helpful either during blink or seperately.
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 16 09:56:56
The Blink module has been a MAJOR boon to my workflow, and I thank you all for your efforts on it.

One feature request for a potential future version -- specific FITS header info displayed along with the image. I've been dealing with some rather unruly data and have had to Blink quite a bit through it, looking to track down some exposure errors and chip defects. Parameters that I'm tracking include CCD temp, exposure time, and date/time of the exposure. For now, I use the FITSHeader tool to cycle through them, but having information like that available right in Blink would be huge.
Try push the button located at left-bottom corner ;)
(http://pixinsight.com/forum/index.php?action=dlattach;topic=3604.0;attach=3653;image) (http://pixinsight.com/forum/index.php?action=dlattach;topic=3604.0;attach=3652;image)
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 16 10:04:07
Any advancement in fits info or image sorting functions would be helpful either during blink
Image sorting by any FitsKeywords and image statistics implemented in 1.05 version. Clicking on the column head.
Title: Re: PCL: Blink module
Post by: Josh Lake on 2012 March 16 15:01:28
Whoa, NKV, I didn't even know that was there! Glad I asked.
Title: Re: PCL: Blink module
Post by: Harry page on 2012 March 17 12:07:35
Hi

Sorry I am really thick at the moment , how do you get the fits details  :-\

Harry
Title: Re: PCL: Blink module
Post by: Harry page on 2012 March 18 03:21:21
Hi

Ok sussed it

Might be better if it was a quick I key shortcut  :D

Harry
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2012 March 21 14:47:49
I have the impression that the PCL Blink module is not releasing image memory when closing:
I tried to blink 51 light frames (10 MPixels each). This was dead slow because of lack of memory (4GB on this system), of course. When I closed the dialog, memory consumption of PI stayed where it was. Memory was only released when I closed PI.
Georg
Title: Re: PCL: Blink module
Post by: mschuster on 2012 March 21 15:51:43
Nikolay, really excellent tool.

Comments:

- Wish list: An easy way to reorder images in list. An ability to manually drag rows up and down to reorder them would be nice.

- On very first run of Blink, statistical columns were missing. I got them to appear by selecting one fits keyword. But subsequence runs of Blick show the statistical columns, even though no fits keyword is selected. Confusing.

- Selection of fits keywords is reset whenever report window is opened. Can selection be preserved?

 
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2012 March 21 16:58:33
I have the impression that the PCL Blink module is not releasing image memory when closing:
I tried to blink 51 light frames (10 MPixels each). This was dead slow because of lack of memory (4GB on this system), of course. When I closed the dialog, memory consumption of PI stayed where it was. Memory was only released when I closed PI.
Georg
That is right Georg, the only way by now is to "Close all images" before exit

Saludos, Alejandro.
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2012 March 22 00:12:52
I have the impression that the PCL Blink module is not releasing image memory when closing:
...
That is right Georg, the only way by now is to "Close all images" before exit
...
I think "Close all images" should be implied when I close the dialog with the "X" window symbol. What sense does it make to have those images in memory without being able to access them?

Two other points on my never ending wish list:
- Blue triangle  to store the settings (file list) as a process icon.
- Could the layout of the tool be changed from mainly horizontal to vertical, as is the case with most PI tools? I usually arrange my desktop to be suitable for tools like ACDNR or Integration, and they are of the long kind.

 8) Cool tool! Thanks a lot for it.

Georg
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 22 03:41:14
I have the impression that the PCL Blink module is not releasing image memory when closing:
Georg, Please read Juan's answer. (http://pixinsight.com/forum/index.php?topic=3604.msg26072#msg26072)
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 22 04:01:01
- Wish list: An easy way to reorder images in list. An ability to manually drag rows up and down to reorder them would be nice.
Do you see similar manipulation(drag rows up and down) in any PI module? I can if it possible.

[/quote]- On very first run of Blink, statistical columns were missing. [/quote] Because Blinking not required statistics, so no need calculate statistics, and no need wait while statistics will calculated for every image. If you want see statistics - push button and wait.
About FitKeywords: I will create new menu for separate access to Statistics and Keywords. Please wait.

Quote
- Selection of fits keywords is reset whenever report window is opened. Can selection be preserved?
Not problem, I will. User preferable FitKeywords will shown in main FileList automatically.
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2012 March 22 04:19:52
I have the impression that the PCL Blink module is not releasing image memory when closing:
Georg, Please read Juan's answer. (http://pixinsight.com/forum/index.php?topic=3604.msg26072#msg26072)

I have read Juan's answer, and although I consider myself an experienced user, I find this behaviour surprising...  :-[ . It probably is no problem for a process that consumes only a few bytes, but Blink tends to consume gigabytes.

Maybe an additional check box "Keep images in memory on dialog close" would give the user a more intuitive choice than the current "Clear all Images" button. If the user selects, images will stay in memory, and Blink can be reactivated quickly. If he unselects, images are released on hiding the dialog, and reloaded when the dialog is re-opened.

Georg
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 22 04:41:44
- Could the layout of the tool be changed from mainly horizontal to vertical, as is the case with most PI tools?
Why not. Do you have idea how show Statistics and FitKeywords. I mean: If user show/hide very wide FileList section with file names/keywords/statistics, should I change wideness of other sections? Or leave GUI with non-used blank spaces?
For example, see pic in attachment. What should i do with blank space?
I personally don't like blank spaces, because some times I use PI on low resolution notebook.
Title: Re: PCL: Blink module
Post by: NKV on 2012 March 22 04:50:21
Maybe an additional check box "Keep images in memory on dialog close" would give the user a more intuitive choice than the current "Clear all Images" button.

A warning message box each time the tool is hidden would generate more annoyance than benefit, in my opinion.
:)

Georg, it's not my idea to keep images in memory on dialog close. And of course I can add check box.
Title: Re: PCL: Blink module
Post by: mmirot on 2012 March 23 19:16:54
Current version , Win x64 is 1.0.5, is not availible for download.

Please upload

Max
Title: Re: PCL: Blink module
Post by: bitli on 2012 March 25 07:26:57
Is there a way to script the Blink module?
I have a script that apply a process varying a parameter and I generate one image with each value of the parameter (with a name reminding me of the value of the parameter). I can then blink them to easily see the effect of that parameter.  I would like to directly populate Blink with the list of files generated. Methods to clear the list and populate it would be required, if possible at all.
-- bitli the lazy
Title: Re: PCL: Blink module
Post by: mmirot on 2012 April 11 14:54:47
Nikolay,

It would be nice to sort images into directories and delete or move the bad ones.

Max
Title: Re: PCL: Blink module
Post by: NKV on 2012 April 11 22:56:26
It would be nice to sort images into directories and delete or move the bad ones.
Delete from HDD is dangerous. You can close bad images and copy good images to new location.

Also,
1.0.6.0001 - Added button MoveToFolder. So you can move a bad files to trash ;)
Title: Re: PCL: Blink module
Post by: NKV on 2012 April 11 23:20:57
Is there a way to script the Blink module?
It's impossible, because script running modally, so impossible to push buttons in any external module. Is it possible to Run Animation, but impossible to Stop when you want.
Title: Re: PCL: Blink module
Post by: bitli on 2012 April 12 00:44:41
I was just thinking of populating the file list (with the result of my script VaryParams) and launching the user interface (fire and forget, with the launch() method).
Oh well, thank you very much.
I learned a lot of thinks by blinking the raw images with a common STF, I really see the sky becoming darker, the effect of filters, the comsic rays that need to be supressed at integration time, .... This is really a grat tool. Thank you very much.

-- bitli
Title: Re: PCL: Blink module
Post by: Grey on 2012 May 01 08:06:20
Hello,

I just tried to test the Blink module with ~300 Canon CR2 raw files. On the harddisk they consume about 2,6 GB. PI ran during the loading process out of memory. I have 8 GB installed in my machine (Win 7 64bit). Is the problem, that they are still Canon raws? Would it be better to first register the images and blink them afterwards (I think so due to the fact that they are easier to compare then)? How do the other users integrate the blink tool in there workflow?

Thanks,
Tobias
Title: Re: PCL: Blink module
Post by: NKV on 2012 May 01 08:44:19
~300 Canon CR2 raw files. On the harddisk they consume about 2,6 GB. PI ran during the loading process out of memory. I have 8 GB installed in my machine
Convert files to Fits and you will know how much memory is needed. ;)
Title: Re: PCL: Blink module
Post by: mschuster on 2012 June 14 13:25:02
Nikolay, I am trying to blink variations of processed images and so I don't want Blink to apply AutoSTF to them. I don't see a button to turn off AutoSTF. Is this possible?
Thanks,
Mike
Title: Re: PCL: Blink module
Post by: NKV on 2012 June 14 17:55:45
button to turn off AutoSTF. Is this possible?
Just click on AutoSTF once more.
Title: Re: PCL: Blink module
Post by: mschuster on 2012 June 16 12:42:22
Thanks, Nikolay, that works. Another question: I can pause the blink and use the up/down arrow keys to display different images. This is good. But the readout values around the cursor do not change. I would like to compare pixel values numerically while switching images with the arrows. Is this possIble?
Mike
Title: Re: PCL: Blink module
Post by: NKV on 2012 June 17 05:52:38
But the readout values around the cursor do not change.
Good idea!

Juan,  PixInsight calculate readout value if mouse position is changed.
And PixInsight don't calculate readout value when only pixel value is changed without mouse movement.
How to force PixInsight to calculate new readout value?
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 June 18 08:32:40
I have never tried to do this, so I'm not sure if it will work. Try this:

ImageWindow blinkScreen
// ...
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition() );


If this doesn't work, try this one:

blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition()+1 );
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition()-1 );


Let me know if it works. Anyway, I'll add this functionality to pcl::ImageWindow in version 1.8.
Title: Re: PCL: Blink module
Post by: Philippe B. on 2012 June 18 08:58:19
Hi folks

Something which should be very very very... nice should to have possibility to save a ANIMATED GIF file from the BLINK menu (or another new PI module)

I explain : we can easily make BLINK with this wonderful module. This will help to see difference between images. But, often, we want to save this blink as a GIF file, animated to show on website or forum a process difference...

So we have to save each PNG file and use a ANIMATED GIF program to generate the animated gig. Too complicated...

If PI could do this, it should be usefull

Thanks !
Philippe

Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 June 18 10:11:09
That's a powerful idea :)

But I don't like GIF. It is an obsolete format that supports only 256 colors and no transparency.

How about a movie? How about calling ffmpeg or mencoder from the Blink process with a list of frames (in PNG format for example), to create a movie (.ogv, .avi, .mov, etc)? That would be an absolute BOMB!

Nikolay?  >:D
Title: Re: PCL: Blink module
Post by: vicent_peris on 2012 June 18 10:39:52
That's a powerful idea :)

But I don't like GIF. It is an obsolete format that supports only 256 colors and no transparency.

How about a movie? How about calling ffmpeg or mencoder from the Blink process with a list of frames (in PNG format for example), to create a movie (.ogv, .avi, .mov, etc)? That would be an absolute BOMB!

Nikolay?  >:D


This would be very nice six months ago. ;)

I was thinking also on this solution. On one hand, it would be useful to save all the transformed images *separately* in the chosen format. On the other hand, you can also output a movie... The problem is the incoding: relying in an external software package can be problematic. Mencoder and FFMpeg are available under Linux and can be commanded through command; could be this a problem under Windows or OSX?? Also is not very nice the idea of asking the user to install two external programs...


Regards,
V.
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2012 June 18 11:06:56
There are enough programs out there than can create a video from a sequence of images. IMHO, let's PI do what it can do best, and leave the other things to other expert programs.
Title: Re: PCL: Blink module
Post by: vicent_peris on 2012 June 18 11:25:00
There are enough programs out there than can create a video from a sequence of images. IMHO, let's PI do what it can do best, and leave the other things to other expert programs.


Anyway, it would be good if it can export the images with the applied HT.

V.
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 June 18 11:33:08
ffmpeg has been ported to Windows (http://ffmpeg.zeranoe.com/builds/). The same is true for mplayer (http://oss.netfarm.it/mplayer-win32.php) (which contains mencoder). As Georg says, there are other alternatives too.

On Mac OS X, both applications can be built without problems since OS X is a UNIX OS.

Of course, writing the individual images should also be easy and a useful option.

Quote
not very nice the idea of asking the user to install two external programs...

We can distribute a compiled version of the video encoder for each platform, as part of the PI distribution. This is very easy with the update system.
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 June 18 11:35:25
Georg,

Quote
let's PI do what it can do best, and leave the other things to other expert programs.

In the case of video encoding, I have to agree with you completely.
Title: Re: PCL: Blink module
Post by: vicent_peris on 2012 June 18 11:41:27
The license of ffmpeg and mencoder allows to distribute them with PixInsight??

In the (near?) future it would be great to use them to *decode* videos.


V.

ffmpeg has been ported to Windows (http://ffmpeg.zeranoe.com/builds/). The same is true for mplayer (http://oss.netfarm.it/mplayer-win32.php) (which contains mencoder). As Georg says, there are other alternatives too.

On Mac OS X, both applications can be built without problems since OS X is a UNIX OS.

Of course, writing the individual images should also be easy and a useful option.

Quote
not very nice the idea of asking the user to install two external programs...

We can distribute a compiled version of the video encoder for each platform, as part of the PI distribution. This is very easy with the update system.
Title: Re: PCL: Blink module
Post by: NKV on 2012 June 18 20:51:07
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition() );
doesn't work
Quote
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition()+1 );
blinkScreen.SetViewportPosition( blinkScreen.ViewportPosition()-1 );

doesn't work

nice should to have possibility to save a ANIMATED GIF file from the BLINK menu (or another new PI module)
Of course i can integrate video coding to Blink. But why inside Blink? I think it should be independent PI module. Also BachFormatConverter much better place. ;)

Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 June 19 01:40:24
Quote
doesn't work
doesn't work

I was afraid that would be the case ... was just a shot in the dark :) Anyway, I'll implement this functionality in version 1.8. Right now this can't be done, or at least I'm not aware of a way to do it. If I discover one, I'll let you know.

Quote
Of course i can integrate video coding to Blink

No! Please don't do that! The idea is to invoke an external application to perform the video encoding task (divide and conquer strategy). It is basically a two-step procedure:

- Generate a set of video frames at a user-selected resolution. Wikipedia has a nice chart in SVG format (http://en.wikipedia.org/wiki/File:Vector_Video_Standards2.svg) that compares all standard resolutions. These video frames could be generated as PNG images on a working directory; that's super easy to do with PCL. I'd include the possibility to select a region of interest. Note also that in order to create smooth transitions at video rates of 25 fps or more, this may involve generation of intermediate video frames by interpolation from images loaded in Blink.

- From the Blink module, invoke a command line application to perform the video encoding work.

- Optionally, delete the working frames once a video has been successfully encoded. Or leave them in case the user wants to use them later (see Vicent's comments).

I think ffmpeg (http://en.wikipedia.org/wiki/FFmpeg) is our best option. It is cross-platform, works extremely well, and is released under LGPL license, which allows us to include it in PI distributions.

Now the only problem is that PCL does not currently support execution of external processes (the PJSR does support it for JavaScript scripts). However if there is interest in this development line, I can push inclusion of this functionality in PCL and the core application.

Quote
But why inside Blink?

Because Blink is already a perfect movie maker/previewer. Note the icon that I drew for your module :)
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2012 June 19 01:54:53
...
Now the only problem is that PCL does not currently support execution of external processes (the PJSR does support it for JavaScript scripts). However if there is interest in this development line, I can push inclusion of this functionality in PCL and the core application.
...

I definitely would like to see the ability to launch(+kill) exterrnal processes in PCL, optionally with control of stdin/out/err. Using PI to drive other tools is certainly interesting in a number of cases.
Georg
Title: Re: PCL: Blink module
Post by: mschuster on 2012 June 19 10:04:08
Nikolay, a couple convenient features I want to suggest:

- Add image views as well as files to the list.

- Reload views and files if they change. Maybe a "Reload" button?

Mike
Title: Re: PCL: Blink module
Post by: Philippe B. on 2012 June 20 09:23:56


nice should to have possibility to save a ANIMATED GIF file from the BLINK menu (or another new PI module)
Of course i can integrate video coding to Blink. But why inside Blink? I think it should be independent PI module. Also BachFormatConverter much better place. ;)

Goal is to get directly an ANIMATED GIF from the blink. No need to go in another process because animated GIF is only possible if BLINK needed.
If you want to make a BatchFormat for GIF, why not, but you need to add the option ANIMATED (put all frame together in a GIF file with delay inside) so I think only BLINK process can fully do this 



That's a powerful idea :)

But I don't like GIF. It is an obsolete format that supports only 256 colors and no transparency.

How about a movie? How about calling ffmpeg or mencoder from the Blink process with a list of frames (in PNG format for example), to create a movie (.ogv, .avi, .mov, etc)? That would be an absolute BOMB!

Nikolay?  >:D

Yes, Juan, it is a nice idea too, but sometimes, you need to show on forum some BLINK effect to compare process for example, then animated GIF is supported in all forums
AVI is more complicated (you need video viewer to open file, file can be huge in size...)

Cheers
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2012 June 20 12:44:46
Philippe,

Note that ffmpeg can generate animated GIFs (GIF is just one of the output file formats supported). So movie generation does not exclude this possibility.
Title: Re: PCL: Blink module
Post by: Philippe B. on 2012 June 21 01:59:57
Juan,
In this case, it is PERFECT !   ;)
Title: Re: PCL: Blink module
Post by: NKV on 2012 October 06 04:15:17
Now the only problem is that PCL does not currently support execution of external processes
Really?  See picture :D

New version 1.1.1.0001 - Added: Make Video from images. 8)

PS: avconv (http://en.wikipedia.org/wiki/Libav)  and PI 1.8 required.
PSS: modules for PI 1.7 under preparation. Please wait.

Title: Re: PCL: Blink module
Post by: Herbert_W on 2012 October 06 04:49:31
Juan,
In this case, it is PERFECT !   ;)
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2012 October 06 06:39:30
wow this is hugh!!!! big, big, big adition to Blink! Thank you!  :) :) :)

Regards, Alejandro.
Title: Re: PCL: Blink module
Post by: NKV on 2012 October 06 07:30:11
Module for PI 1.7.x added.

How to install avconv which required for coding:
Ubuntu: ~$ sudo apt-get install libav-tools
Windows: goto http://win32.libav.org/ download 32 or 64 package. Unpack it and put all files from bin folder to C:\Windows\System32\
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2012 October 06 08:24:27
Hi Nikolay,
I have install libav-tools successfully in KDE but the module freeze creating the first file. PI do not close, only restarting the computer.

Try again selecting all files and freeze in the last one.

Regards,
Alejandro.
Title: Re: PCL: Blink module
Post by: NKV on 2012 October 06 09:26:08
in KDE
I tested the module in Ubuntu 12.04
I am not sure, but i think KDE required other method for running terminal. Can you try run this command in system terminal:
gnome-terminal -e "avconv -r 5 -i /home/alejandro/Blink%05d.jpg /home/alejandro/Blink.avi"
Did you see one more terminal window?

Anyway give me some time to install KDE OS.
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2012 October 06 10:27:01
Hi Nicolay, those magic words make Blink works in KDE, this time it did not freeze and create Blink.avi. I have yet to download some codecs for Dargon Player to see it.

I tested it in Ubuntu 12.04 and works perfect (PI 1.7). I can reproduce the .avi

Now I am trying in Win7 without success until now:

See the picture. Blink0000x images are correctly created but not Blink.avi (Win7 PI 1.7)

Regards, Alejandro
Title: Re: PCL: Blink module
Post by: NKV on 2012 October 06 11:25:48
Now I am trying in Win7 without success until now:
To understand what is wrong, run cmd.exe and copy from PI console to the CMD command. It should make Blink.avi file.
Or you must see where is problem.
Title: Re: PCL: Blink module
Post by: NKV on 2012 October 06 11:50:29
1.1.2.0001 - Improved STF usability. Make Video with STF.
You can define STF manually in STF module and apply to Blinking screen and make Blink.avi with same brightness.
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2012 October 06 11:59:08
 :-[  oops, user missteake. I made something wrong when paste in C:\Windows\System32\. Sorry  :angel:

It works perfect in Win7 too.
Title: Re: PCL: Blink module
Post by: gvanhau on 2012 October 06 16:11:18
Hello I tried in win7 x64
It creates the images, but not the avi.
The reason is that AVCONV aparently canot handle the spaces in the directory names.
I then moved the files to another dir (ie wo spaces) and if worked ok.

Regards
Geert
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2012 October 07 09:09:22
Hi Nicolay, I did the first video and Blink has generated all jpg in almost the same size, but see the screen shot. The first image in the video has perfect quality while the last one lost it compleately. Any idea?
Title: Re: PCL: Blink module
Post by: NKV on 2012 October 07 09:31:18
Alejandro, avconv made video with default settings. If you know which settings i must to change to improve quality, welcome.
Also, you can run avconv manually via terminal command like that avconv -r 5 -i /home/alejandro/Blink%05d.jpg /home/alejandro/Blink.avi

Any idea?
Yes, i have many ideas! I want add command line into Blink interface, and user will able to change any settings of avconv.
But, before, i must redirect avconv output to PI Console.

Title: Re: PCL: Blink module
Post by: NKV on 2012 October 07 10:36:51
Hello I tried in win7 x64
It creates the images, but not the avi.
The reason is that AVCONV aparently canot handle the spaces in the directory names.
I then moved the files to another dir (ie wo spaces) and if worked ok.

1.1.3.0001 - BugFix: Spaces and regional symbols in folder/file name.

Note: PixInsight 1.7 core on Windows can't write to folder which name included regional symbols.
Linux - no problem. ;)
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2013 January 29 17:50:38
Hi Nikolay,
I can't isntall Blink v1.1.3 for PI 1.8.x: Bin Linux64 in PI 1.8 RC3.
Is there something wrong between my monitor and the chair or the module needs  something else for RC3?

Saludos, Alejandro.
Title: Re: PCL: Blink module
Post by: NKV on 2013 January 30 02:11:51
I can't isntall Blink v1.1.3 for PI 1.8.x: Bin Linux64 in PI 1.8 RC3.
Dear Alejandro,
Please use standard version of Blink module which included inside the distribution package.
Or you have any problem with standard version? 
Best regards,
Nikolay.
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2013 January 30 02:26:25
Hi Nikolay, standard version works perfect, but it don not have the "create video" option.

Saludos, Alejandro.
Title: Re: PCL: Blink module
Post by: pfile on 2013 January 30 16:10:12
also, nikolay, you may have seen the "automatic histogram xform" thread. i *swear* i used blink to apply a HT to each image and save them to disk with the HT applied, but i can't duplicate the behavior. the Animation script works when i try to do this. in blink i've both tried to copy the files and to save a crop from blink and the HT is not applied to the saved file.

i am not sure what version of blink i am running. as far as i can tell i have never compiled your source code, so it must be the default version that comes with 1.7.
Title: Re: PCL: Blink module
Post by: NKV on 2013 January 30 20:41:09
Hi Nikolay, standard version works perfect, but it don not have the "create video" option.
PI 1.8. don't allow run external processes, or maybe i not understand something in c++.
My compiler not allow to use fork() command in PCL namespace.
So, i cant build latest Blink version for latest PI right now. Give me Give me some time.
Title: Re: PCL: Blink module
Post by: NKV on 2013 January 30 20:44:39
also, nikolay, you may have seen the "automatic histogram xform" thread. i *swear* i used blink to apply a HT to each image and save them to disk with the HT applied, but i can't duplicate the behavior. the Animation script works when i try to do this. in blink i've both tried to copy the files and to save a crop from blink and the HT is not applied to the saved file.
yes, you are right. Latest Blink version much better, more features for HT processing.
I will adapt the module for PI 1.8 RC3 soon.
Title: Re: PCL: Blink module
Post by: georg.viehoever on 2013 January 30 23:52:43
PI 1.8. don't allow run external processes, or maybe i not understand something in c++.
...
See http://www.pixinsight.com/developer/pcl/doc/html/classpcl_1_1ExternalProcess.html
Georg
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2013 January 31 00:04:16
I was going to write the same link; Georg he has been faster :)

Nikolay, please let me know if you need help to adapt the latest version of Blink. Movie generation is definitely a must-have for PI 1.8 on all platforms. By the way, what applications are you using to generate the movies? Can I suggest ffmpeg? It is cross-platform and distributed under LGPL 2.1, so we can distribute it with PixInsight on FreeBSD, Linux, Mac OS X and Windows.
Title: Re: PCL: Blink module
Post by: NKV on 2013 January 31 00:31:08
By the way, what applications are you using to generate the movies? Can I suggest ffmpeg? It is cross-platform and distributed under LGPL 2.1, so we can distribute it with PixInsight on FreeBSD, Linux, Mac OS X and Windows.
Juan, i use avconv because Ubuntu says about ffmpeg:
Code: [Select]
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Anyway no matter which converter is better. User can choose it via menu.
Title: Re: PCL: Blink module
Post by: NKV on 2013 January 31 00:32:31
See http://www.pixinsight.com/developer/pcl/doc/html/classpcl_1_1ExternalProcess.html
Georg, thank you!!!
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2013 February 01 06:17:53
Hi Nikolay, thank you.

The version I can download for RC3 say "Blink-pxm.so.Linux64.PI1.8RC3.v1.1.3.1.gz", not 1.1.4.1. Is the correct one?

I have instaled it but fail when creating the .jpg

Saludos.
Alejandro.
Title: Re: PCL: Blink module
Post by: NKV on 2013 February 03 22:08:01
The version I can download for RC3 say "Blink-pxm.so.Linux64.PI1.8RC3.v1.1.3.1.gz", not 1.1.4.1. Is the correct one?
It's just mistake in file name of the gz file. Inside there are version 1.1.4.1. fixed.
Any way you can see which actually version is installed in ProcessExplores>ProbertyBrowser> description.

Quote
I have instaled it but fail when creating the .jpg
it's standard access restriction to system folders. Try to do it inside your home folders.
Title: Re: PCL: Blink module
Post by: NKV on 2013 February 05 00:34:33
v1.1.4.1 for PI1.8 RC3
Linux64
Win64
Title: Re: PCL: Blink module
Post by: NKV on 2013 December 23 08:46:02
Can anyone help me with ExternalProcess problem (http://pixinsight.com/forum/index.php?topic=6496.msg44179#msg44179) ?
Title: Re: PCL: Blink module
Post by: NKV on 2014 January 28 03:29:43
v1.2.1.0001 - Make Video adapted for Linux and Windows OS.

You can use the Blink module for video coding from images.
Instruction:
1)Define by green rectangle region of interest.
2)Link Blink module to command line coder and set parameters of coding.
3)Select output folder.
4)Push Run.
Title: Re: PCL: Blink module
Post by: Juan Conejero on 2014 January 28 03:52:38
You are great Nikolay!

This is a wonderful feature. I'm going to see if we can distribute ffmpeg with PixInsight on FreeBSD, Linux, Mac OS X and Windows. The problem is not with ffmpeg (which is LGPLed). I am concerned about legal issues with some codecs such as MPEG-4 and H256. If someone can help with this, any information or ideas will be very welcome.

In the worst scenario, the end user would have to install ffmpeg on his or her machine...
Title: Re: PCL: Blink module
Post by: NKV on 2014 January 28 10:00:50
I am concerned about legal issues with some codecs such as MPEG-4 and H256.
Juan, the Blink module independent from any legal issues, because user can use any processing software which installed in system. So, legal issues is problem of user.
You can distribute the Blink module without ffmpeg and user can choose coder which convenient for him.
Title: Re: PCL: Blink module
Post by: NKV on 2014 January 30 02:53:07
solar eclipse 2008 (http://endor.uv.es/files/data/public/835d77.php)
The video made in Blink module.
Title: Re: PCL: Blink module
Post by: FunTomas on 2014 January 30 05:15:11
Hi Nikolay. Maybe offtopic question, but how are you registered Moon disc?
Title: Re: PCL: Blink module
Post by: NKV on 2014 January 30 21:07:42
Hi Nikolay. Maybe offtopic question, but how are you registered Moon disc?
See that topic http://pixinsight.com/forum/index.php?topic=6662.0
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2014 February 17 19:10:23
Hi Nikolay, thank you for the improvement!. Blink is a great module.

I wonder if it is possible to generate a video that reproduce indefinitely

Saludos, Alejandro.
Title: Re: PCL: Blink module
Post by: NKV on 2014 February 17 21:52:14
I wonder if it is possible to generate a video that reproduce indefinitely
Are you mean loop gif ?
The module just run external codec. So, if yours codec can, Blink module can too.

Try this:
Program: convert
Arguments: -delay 5 -loop 0 Blink*.png Blink.gif

or this:
Program: ffmpeg
Arguments: -y -r 5 -i Blink%05d.png -pix_fmt rgb24 Blink.gif

PS: convert it's Command-line Tools (http://www.imagemagick.org)
my result via convert in attachment.
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2014 February 18 19:20:43
Hi Nikolay, Thank you!, that is what I need. I will make a try
Title: Re: PCL: Blink module
Post by: NKV on 2014 March 04 00:55:11
Hi Nikolay, Thank you!, that is what I need. I will make a try
Welcome!
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2015 May 01 15:59:43
Hi, I need some help with Blink again. :angel:

I am trying to make a video with 360 images. It worked perfectly with the following command for .avi extension using ffmpeg

-y -r 18 -i Blink%05d.png -qscale 1 Blink.avi 

But I need the video in .mp4 and webm. Then use the following command

-y -r 18 -i Blink%05d.png -qscale 1 Blink.mp4

and beside the quality is lower than .avi, it is good enough for what I need. The problem here is that it seems that some frames disappear, at least the latest are not present. Am I using the correct command for mp4?

For .webm, If use:

-y -r 18 -i Blink%05d.png -qscale 1 Blink.webm

the result is very low in quality. I changed -qscale values and also delete it, but the result is allways the same. Any help in which command line should I use?

Thanks,
Alejandro.
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2015 May 03 11:36:54
Solved. I used -y -r 18 -i Blink%05d.png -vcodec mpeg4 -b:v 9600k Blink.mp4 and then converted to .webm

Saludos, Alejandro.
Title: Re: PCL: Blink module
Post by: pfile on 2015 May 20 20:49:55
Nikolay,

is there any way to load files into blink except for the "file open" dialog? i was hoping that i could create an xpsm for blink, but there's no way to save a process icon for blink.

thanks

rob
Title: Re: PCL: Blink module
Post by: Alejandro Tombolini on 2015 August 09 16:11:02
Hi Nikolay, I have another wish to your fantastic tool. Could be possible to have a drop down menu in "Program" and "Arguments" that remember the latest commands used?
Thank you!
Alejandro.
Title: Re: PCL: Blink module
Post by: NKV on 2016 March 31 00:07:23
Added new mode into AutoHT: Link/UnLink RGB channels.

PS Juan, see GitHub ;)
Title: Re: PCL: Blink module
Post by: msmythers on 2016 April 10 20:17:15
Just thought I'd link a thread that is going on in the General section about an issue with the move files function in the latest Blink module. This should probably be in the Bug Reports section.

http://pixinsight.com/forum/index.php?topic=9773.0 (http://pixinsight.com/forum/index.php?topic=9773.0)


Mike