-
Posts
393 -
Joined
-
Last visited
-
Days Won
32
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by vugie
-
-
- Popular Post
- Popular Post
I know, I'm flooding the forum today...
I would like to share with you method for creating icons I invented recently.
Up to now I used great Mark Balla's icon editor (and I still use it sometimes). But whole the time it was hard to remember which bakcgroud color and which abberation mean what, simply to fit on the icon all the information I need using only limited amount of text and few colors. Besides this I simply like graphics on icons. But preparing graphical icons using LV editor is time consuming as well as using external editor and copy-pasting (which often leeds to some confusion as LV uses its own 200+ color palette). What's more LV don't update smaller bit depth versions of icons - even if one don't care about them (who cares nowdays?) they should look at least different then default ones.
To prepare graphical icons efficiently you have to have prepared common backrounds for projects or separate parts of code, glyphs for classes, glyphs for common actions as get, set, read, write, etc., glyphs for most important datatypes, some arrows or other symbols. If you have such a library (of course it is being created as project grows, parts may be imported from icon themes as Tango or Nuvola).
I started this approach for the project I call temporaily LVODE. It is set of wrappers with some my code for Open Dynamics Engine (ODE) (BTW, I plan to relase it to public and although it is already pretty usable for me and even documented, I need some motivation to make it usable for others).
I decided to use Inkscape - vector graphics editor. My icon development environment looked like this:
I was arranging icon by few moves of mouse (when not creating additional glyph), selecting it and exporing as 32x32 png file with always the same name. For importing to LV I wrote a VI I put to Tools menu which retrieved current VI reference and used "VI icon.Set from file" method. Pretty efficient but there were 2 major problems: color conversion from 24-bit image to indexed color icon sometimes led to ugly colors and interpolation of vector-raster conversion often caused limited readability of an icon.
Then I moved to GIMP. It is raster image editor, uses layers and has native indexed color support. I exported LV icon palette to ACT file, imported it in GIMP, so I was able to draw using target colors. The icon development environment looks now like this:
Glyphs and backrounds are located in separate channels - I simply turn on/off their visibility, there is also a possibility for editable text layers. It was little bit tricky to find font and options to be able to write readable text with small font size.
Now the best part: GIMP has so called Script-Fu - macro language to perform automated tasks. It also has Script-Fu server making it able to receive commands via TCP. So when the icon is made I do not have to export anything - just switch back to LabVIEW select a command from Tools menu and voila! Here is VI which do the trick:
Maybe GIMP is not so efficient and elastic for creating icons as Inkscape was (belive me - I was able to prepare an icon with some glyphs and text in 15 s), but this is the price for guarantee of readability. Now one icon takes me 0.5-1 min and it is always worth that time.
And I hope that some day my experiences and ideas will grow into new GRAPHICAL icon editor as fast and convenient as Inkscape and generating as nice effects as GIMP.
------
I was writing this post quite a long time uploading images successively as I was writing and after some time I wasn't able to upload anything more (Upload failed)... I had to start topic again. Is time to write the post limited?
- 4
-
Is it possible to give Code Repository entries back to their authors? Not even talking about updates, they could at least upload previous screenshots.
-
Correction:
"Picture to Pixmap" generates 24-bit image data (without a mask), so no transparency is preserved here in any form.
-
I found out that links in LAVA 1.0 content which pointed to another threads in LAVA now point to completly other threads, totally wthout sense. This is because links were coded as topics numbers and that numbers are different for new forum. Maybe it would be possible to automatically parse the old content in order to generate a list of posts with links to other threads and send this posts (as links to new forum) to their authors. Then the authors would correct the links (if they remember what they meant).
-
-
I attempted onece to use GOCR- open source command line tool. I don't remember exactly how it worked because project I used it for died at the beginning.
-
You might be also interested in this solution.
-
You loose transperency in both 1st and 4th stage. In 1st because "Picture to Pixmap" stores transparency only in 4th byte of 32-bit image data, not in the mask. You have to manually convert this data to mask and perform your operations on the mask as well. But I've noticed that the transparency data generated by "Picture to Pixmap" in not compatibile to similar data generated by "Load PNG"... Bug? I have to do more testing on this. If you know something about the image you may generate mask yourself from color image data (i.e. using "Create Mask").
I would reccomend you using my BitMan library which helps with such situations and perform all operations on transparency automaticly.
- 1
-
That's pretty! I'd still like to see the slight yellow glow in the background...
This glow is the main reason I wanted this banner to be changed
-
- Popular Post
- Popular Post
Sorry for doubleposting, but where is the edit button?
[edit]THIS post has edit button, previous one had not (even when it was the last one) [/edit]
...It should take on some characteristics of LabVIEW but not really look like a diagram.
I'm not too convienced that it looks too much like BD and why it should not, but ok - what about this? (background color is same as current one)
Yeah, the Web 2.0 style... forgive me.
- 4
-
I don't know what "View unread content" is actually showing. I everyday find a topic simply browsing forums which I didn't read and which was not showed in VUC. And the same with new post. Is VUC limited to some boards or sth like that? I'm not able to find a rule. Same situation for code repository files - just compare box with latest files showed on portal page to code repository tab in VUC.
I would like to simply see the list of all latest posts with user, date and board. I know better what I've read and what not.
-
And this is for the back side (as suggested in this thread):
This is loose variation around Amnesty International logo. As I am not a native English speaker, I'm not so sure what is an exact impression of this slogan. Please feel free to suggest something that sounds better.
Of course it is little bit late, and generally you shouldn't take me too seriously, but now I would change this slogan to "Don't let live them with such a documentation!"
-
So, where's the new code?
P.S. Great logo, but you should probably flip it, so that it looks more like the LV logo.
I'm going upload the code after making it really usable and with at least trace of documentation. Now even I has sometimes a problem to remember where I put top level VI... Because it's a member of a class and it is not obvious which one it should be.
I already tried the flipped version of logo but it doesn't look too good. I don't know why...
Very impressive, not sure if you've thought of this before, but with this you could possibly be able to create our own open source VI file format.
Pass in a VI into a program and get the SWF equivalent. Then take the SWF put it in another program and get the VI back. Of course there's alot of issues associated with that, like subVIs. But for basic stuff I think it could utilize the quick drop function to find code.
Creating universal text-based format for VI was already discussed few times as I remember. BTW it is a good subject for LAVA cooperative project, LAVA flagship or how too call it... I can think of many advantages of such a format and related utilities.
With VIpreVIEW I capture too less information for such an approach - just images of subsequent frames of multiframe structures and some text and position info from other objects for displaying tips.
-
-
- Popular Post
- Popular Post
I have a proposition for a new LAVA 2.0 top banner. Because you liked my design for t-shirt, I modyfied it a little bit to suit it better for horizontal orientation. It looks like this:
It is suited rather for light background (just like block diagrams are), but I can think of modyfing it for dark ones. For blue or dark blue also some colors should change.
What do you think?
- 4
-
- Popular Post
- Popular Post
I just wanted to inform that after total rewrite of everything (to LVOOP) I reached exactly the same functionality as it was before. That's a progress, isn't it?
So now it's time to start extending VIpreVIEW. For the beginning, following Yair's suggestions, I designed a logo:
I also attached recently generated swf, as these from previous posts are gone, but I'dont know how to embed it in the post... BBcode is not working.
Also if someone who got the power could move this topic to uncertified code repository where is much better place for it?
- 3
-
Name: BitMan (Bitmap Manipulation Library)
Submitter: vugie
Submitted: 04 Jul 2009
File Updated: 03 Jan 2011
Category: Machine Vision & Imaging
LabVIEW Version: 8.2
License Type: BSD (Most common)
Copyright © 2009, Wojciech Golebiowski (vugie)
All rights reserved.
Author: Wojciech Golebiowski (w_golebiowski (at) tlen.pl)
Name: BitMan (Bitmap Manipulation Library)
Type: framework, library
LabVIEW version: 8.2.1
Description:
Bitman library is designed for image processing based on a specially-defined structure to store the image, and a system of filters. It is not only a set of tools performing specific operations on images, but also a framework to help create your own image processing functions with a mechanism called "dynamic filters".
Library contains few basic built-in filters. Their design concentrates on the versatility, ease of use, and the clearance of the code. This results in a decrease of efficiency and consequently, processing of large images using standard filters may be slow. But this is not a limitation of the framework and it is possible to create user filters, which may - as a more specialized - operate much more efficiently. Built-in filters are good for processing of relatively small images and can be used to support programming user interfaces, operations on the icons, creating graphical documents, etc.
Library was written using object-oriented programming techniques (LVOOP).
Installation
Libraries can be used after unpacking it anywhere on disk. Access to all of the features is possible then by opening the library file "BitMan Lib.lvlib". However, it is most convenient to copy entire BitMan directory to the directory \user.lib. After the restart of LabVIEW on a pallet, in the User Libraries, sub-palette "BitMan" will appear.
Documentation
A description of all VIs from palette is available in the file "docs\BitMan docs.html". Descriptions are also included (for all functions) in the Documentation section of the VI Properties dialog, as well as for more important front panel controls and, as such, are available through the LabVIEW context help.
Examples
Examples of applications can be found in the directory "examples" (examples of the use of the library itself) and the directory "examples\Dynamic Filters" (examples of the creation of filters). Examples along with descriptions in the diagrams are an integral part of the documentation.
Functionality
The most important class it the Bitmap class. It contains structure for storing an image (the description of the structure may be found in documentation under Bitmap type.ctl) and the basic access methods. The main assumption of this structure is to store the image in three-dimensional U8 array, where subsequent dimensions mean respectively height (y coordinate), width (x) and subsequent color channel. Number of channels in the image depends on the bit depth, additionally you can define any number of user channels. It is possible to store pictures 1 -, 4 -, 8 -, 24 - and 32-bit, while the 32-bit means here CMYK color model, rather than - as is sometimes used - RGB images with transparency . Transparency (the so-called alpha channel) is stored in a separate field of the structure. Support for CMYK images is not fully implemented yet.
The processing of images is done by the use of system of filters implemented in General Filter class. This class stores a reference to strictly typed VI processing an image and its runtime parameters. The filter is launched with Filter Run method, which uses the dynamic call mechanism. Filter runtime parameters are stored in the object as a variant variable for unified method for passing them.
Users can create their own filters in two ways: by using methods of Dynamic Filter class and filter template or by creating a new class inheriting from General Filter class. It is also possible to create a function-specific interfaces for the use of filters as the normal LV function. Inheriting and transparent interface is the way buit-in filters work, so they are also a specific example of use of the library.
Template to create your own filters may be found in "typedefs".
Using of dynamic filters is supported Library Filter class designed for managing filters. It makes use of the functional global mechanism for storing and providing access to pre-loaded filters with assigned names. It can call the filters by using short names anywhere in the code, without a burdensome wiring of filter objects.
Another supporting class is Bitmap With Filters class, inheriting from the Bitmap class and extending its functionality with a possibility of using a sequence of filters.
More detailed descriptions of individual functions and applications can be found in the above mentioned documentation and examples.
Version History:
1.0.0:
Initial release of the code.
1.0.1:
Packaged version with small bugfix
-
Could you sketch an example? I'm not sure I understand it well...
-
QUOTE (Aristos Queue @ Jun 2 2009, 07:07 AM)
... I have no idea how you'd get a relative measure of "code size".That's very interesting problem I'm thinking about from time to time. Metric used here is byte size of gzipped code with removed comments and reduced whitespaces. I guess that it's somehow proportional to time spent writing the code, but not taking into account time spent on searching in documentation, debugging, etc. For LV it should be similar. For each node and terminal in LV code we may assign the word which lenght should be proportional to its depth within palette tree. Plus one or two characters for each wire, maybe more for longest wires (scrolling is so slooow when wiring), plus some overhead for each subvi, plus 500 characters per each openning of control properties dialog (grrr),plus whitespace between above and that's it.
But such a comparison wouldn't show few of many LV strenghts such as time spent on debuging or on creating GUI.
-
Something has irrevocably ended...
I don't have 8.6 so I cannot check it directly, but I read help file and realized that not so many properties were released, not so many... So my T-shirt design is still actual. Maybe I have to change property. Any candidates?
-
There are generally two ways to achieve color map with 3D Picture control: "per vertex" coloring scheme or texture. First one is probably simpler and provides potentially nicer, scale independent result. With second one you may get more sophisticated result (i.e. cobining map with an image), but you have to earlier map 3D surface to 2D image and provide texture coordinates for each vertex.
What concerns displaying grid I did't find efficient way to do this. You can set either polygon or wireframe draw style and I found no way to get shaded object with wireframe. I tried two create two identical objects - one shaded and second "wireframed" but effect was little bit strange - kind of blinking during rotation. Maybe the method would be to move wireframe vertices a little in normal direction, but still it is not a way how it should be done.
Another problem with 3D control is speed (at least when you don't use a separate window).
Although 3D Picture Control is very simple to use, for a longer term I find it not flexible enough, and therefore already for a long time I experiment with various external 3D engines. Recently I found .NET bindings for VTK (which is widely known scientific visualisation engine) and first results are very promising.
-
QUOTE (MikaelH @ May 26 2009, 11:28 PM)
In my http://forums.lavag.org/BitMan-Bitmap-Manipulation-Library-file177.html' target="_blank">image manipulation library there is an example "clock.vi" where I created fancy gauge using picture control. It looks lie this:
-
QUOTE (jdunham @ May 7 2009, 08:04 PM)
...in the old days there was only the False constant.It reminded me old russian joke: The beginning of the russian Bible edition: At the beginning there was nothing. Only Comrade God was walking around the streets of Moscow.
However it sounds best in russian...
QUOTE
But it is really nice on the BD constant to drop it and then, if you need floating point, to type in a value using a decimal point and the constant will automatically change to double type.I don't belive! It's the first thing I'll check tomorrow!
-
QUOTE (Antoine Châlons @ May 6 2009, 11:08 AM)
QUOTE (crelf @ Apr 25 2009, 07:11 PM)
... You can make it themed so that it ties into NIWeek 2009 if you want, but this is not a requirement.And besides this, it is hard to design graphics for event I have no idea about. Also I won't have a chance to take part in NIWeek, so I decided to design something more general.
I used Inkscape - the great open source vector graphics application. Maybe it is little bit slow, but at current stage it is even comparable to Adobe Illustrator which is top of the topest.
- 1
Image rotation
in Machine Vision and Imaging
Posted · Edited by vugie
Because picture control has such
On the front panel you have to switch to set color tool, right-clik on picture control and select transparent color (upper-right corner, marked with T)
And the angle for rotation should be in radians
proba transp.vi