Jump to content

Chris Davis

Members
  • Posts

    423
  • Joined

  • Last visited

Posts posted by Chris Davis

  1. Hi i am having trouble designing part of my overall program. i am trying to take 700 or so b&w images,which i have managed to take and save, then to rotate each 2d image to make it a 1d slice, then to add all these 1d slices together to make up a new 2d image. i have tried adding each line of the original images on top of each other but it just becomes a bright white saturated blob. any help or hints would be appreciated. i remember seeing something before that might have helped, rotating a 3d image but that was for labview7 and i only have access to labview 6. Also if this is another example of how not to ask a question i am sorry and will continue to try myself.

    Well, you didn't provide quite enough information to solve your problem, but I might be able to help with a couple of things...

    Your "saturated" image is probably because you are adding up grayscale images and attempting to look at the result in a picture control. If you are adding the numbers up and storing the result in a u32 you should display the result in an intensity graph. In the intensity graph you'll be able to use the automatic scaling on the z axis to display the image with some kind of control.

    If you can provide some kind of idea of exactly what you are trying to do, maybe we could help more.

  2. I haven't had time to look at the code to solve the memory leak, but I have started an OpenG project to begin to make the LabView SQLite toolkit a reality. I've created a Requirements Document to state the project goals for those who want to be involved. This document is avaliable through the OpenG CVS system, so you'll have to check with Jim Kring if you want to be able to contribute to this project. I'm posting the first draft of the Requirements document here for everyone who was interested to review.

    Chris Davis

    Download File:post-2547-1139455457.doc

  3. I have been using NI's Database Conectivity tools with Sybase and Access database for years, with no problems. I recently have been investegating using PostgreSQL for windows, I did the full windows msi install package downloaded from postgresql.org, and installed with no problems. The pqAdmin III was very intutive and I was able to create a database with a few tables, and insert data into the tables, relativly easy. I created a udl link for the database using the PostgreSQL OLE DB Provider that was part of the MSI install, and was able to open a conection in LabView. Every thing was going well untill I tried a parameterized query, this is were things took a turn for the worst. The following error occured "Error -2147217887 occurred at Conn Get Properties.vi->DB Tools Create Parameterized Query.vi->". The cause of this is, after some investegation, due to the request for the "defaultdatabase" property node. I can easily fix this by modifying the NI VI's either in VI.lib or my own reuse, but I do not like these options. Inside the block diagram of the get DB properties is this comment "DefaultDatabase is not supported (fires an error) for all providers. mspersist is one of these...maybe check provider to filter out these cases. NI did not know what was ment by this note, and there suggestion, (contradicting previous NI good practices recommendations) was to modify there VI's. That was a lot to ask this question; "is there something I can change in the PostgreSQL database configuration, or the OLE DB Provider to fix this error"? I am not a "database guy" I use databases with labview because I found it easier then a lot of ini files.

    I don't know much about PostgreSQL either, but this might be a time to check out the idea of using SQLite with LabView, and join the LabView SQLite toolkit work we are doing at OpenG.org. You can contact me by PM if you have any questions. The LabView SQLite toolkit is posted in the LAVA forums by following the link below.

    http://forums.lavausergroup.org/index.php?...=2570&hl=sqlite

  4. I believe even that is cheaper than IMAQ, and if I remember correctly, the IMAQ Run-time license is several hundred $$$, so this would still be significantly cheaper, but you're right, that is not "almost free". Either way, since I haven't used any of them, I have no way to compare them.

    BTW, I just found out the prices for multiple distribution licenses for the PDA module.

    Are you ready?

    For 10 licenses - about $50 per license.

    For 100 licenses - about 30$.

    And the kicker - for an unlimited license - $11,000 (yes, that's 3 zeros).

    I think that making the licenses cost between a third and half of what Windows costs shows that NI does not yet think of the PDA module as a tool which will we be used to develop wide spread applications, but ones which can be priced to still make a profit on that. Most probably ones which include DAQ and communication.

    I'm trying to think of an application which would be developable in the current PDA module (although I haven't seen 8.0 yet) and which could cover the price of the unlimited license and I can't really think of one. Sure, I have all kinds of ideas, but I think that most of them (and I'm talking about general distribution apps, not specialized DAQ ones) would probably be much better off if they were written in the freely available (if I'm not mistaken) eVC++ (although LV is obviously much more fun).

    BTW, I'm not disputing NI's right to price their toolkits at the prices they see fit, but I think that this is an example where using an NI product may cost you more and give you an inferior result than using another product and in this case, I don't really see the justification for such a price. The PDA module is simply not that good yet.

    BTW, the VideoCapX ActiveX control is $80 for a single developer with free redistribution rights. That's $80 total cost, for a control that captures, edits, recompresses and allows you to playback AVI, MPG, and WMV files. I don't own stock or anything, but that is not a bad cost for all you get.

  5. In order to get our beloved IT staff off my back, I'd love to deploy systems with Linux using the ethernet FP-1601. Yet, NI dosen't seem to be to interested to offer this capability. Any body have any ideas (other than FP-1000's w/ optomux)? I realize this is probably wishfull thinking, as complete hardware support for the Mac isn't even there ....

    DanW

    I've got no help for you, but I have recently purchased some cFP-1808's and would like them to show up on Linux and Mac systems too. I just read a DevZone post about the same request. NI's only solution was to use the Optomux protocol, even though they wouldn't offically support it.

    Good Luck.

    Chris

  6. Hi everybody,

    I'm using since a few month WDM drivers based on ActiveX video capture object (videocap, I think). As I can't buy IMAQ vision, the USB for video camera provided by NI can't be used.

    It's works fine but I can't configure automatically the settings of the acquisition such as resolution, number of frame, etc. The driver just calls the device property page and we have to manually select the setting we want to use.

    As the default setting for resolution is 320x240, and we always work in 720x576, the user has to select himself these setting in the displayed window.

    So, I'd like to know wether :

    - someone knows how to change the default settings of a standard video acquisition board based on WDM so that the re-configuration is not necessary anymore?

    - someone knows another ActiveX object that provides full controls of the video acquisition, and how to use it correctly?

    - anyone has ever build a function that configures automatically the controls of the top level window?

    - does anyone have any other solution (as free as possible) to simply control the video acqisdition, capture images, etc. ?

    I'm really looking forward to your answer.

    Thank you in advance.

    Bim

    I've used VideoCapX from www.fathsoft.com (which it sounds like what you are using) and not experienced this problem. There is a sequence of events that are required to set the video resolution (I don't know of a way to change the default settings) and I think that sequence goes something like this.

    1. Connect to device

    2. Set which video input you are going to use

    3. Set the video format to the desired width and height

    4. Preview the video

    If you have Visual Basic the included example will show you some of the other steps on how to connect with the video capture card and get the settings you want. If not, you'll have to read the help file and try to figure out what order you need to call the correct activeX methods to setup the card the way you want.

    Chris

  7. first of all, nice job Chris, I think that this wrapper can be fairly useful, since sqlite3.dll makes lv8 think it's corrupting it's memory. :thumbup:

    I've been playing around with your example, and one thing I noticed is that the memory usage continues to climb. Not sure where the memory leak is.

    Run LV SQLite Read Database Into Table.vi in continuous mode, and you'll eventually run out of memory.

    I'll take a look today or this weekend to see if I can figure out what is going wrong and causing the memory leak. If I find it I'll upload another version.

    The next step is to make a database with some blob data in it to see how to access that type of data easily. I'm thinking of a simple database with some JPG's in it to start with. That is my original use case for this particular project so I think I'll try doing something along those lines now. I'll have to find the memory leak first, since when you start working with Blob data, your memory usage goes up dramatically.

    Chris

  8. hello,

    we are student and we are trying to display a usb webcam image on labview 7.0.

    Could you explain us how can we do that please?

    thanks

    You've asked an interesting question, I'll give a couple of answers.

    Solution 1: Purchase an ActiveX toolkit to read image data from webcams. My favorite is VideoCapX from www.fathsoft.com. It costs $80 and not only allows you to display the video from any WDM source, but also record that video, take snap shots from that video, replay a recorded video, recompress a recorded video, record striaght to MPEG2 (if your hardware supports it), broadcast the video via HTTP, and many many other things which I can't recall. As a student I know you may be saying $80 is a lot of beer and pizza, but it will make whatever project you are working on so much easier you will be thankful you spent the money. They give you a free fully functional version to work with, and it pops up a dialog every now and then to let you know you are using the demo version.

    Solution 2: NI has a free USB driver for WDM sources, but it requires you to have LabView 7.1 and Vision Assistant 7.1 which may be out of the question.

    Solution 3: Roll your own DirectX DLL that will talk with the camera. I don't know if the $80 you saved will buy enough pizza and beer to make this worthwhile.

    Solution 4: Look at the free crossplatform (windows and mac) QuickTime library that has been around for a few years, it may do everything you want, if all you want to do is display the image. I tried using it about a year ago, but have lost track of it since then.

    All of these solutions will require some level of LabView experience. If you don't have much experience, this may not be the best project to learn LabView with.

    Chris

  9. I know I should post up my code to make this easier but I don't feel it necessary yet. My delema is this; I'd like to move all of my configurable data to a seperate dialog vi. How to go about this is just beyond me right now. I know how to pass in and out of vi's but my large application uses these user configure items in multiple places. Which means I'm using local's in a lot of area's. Not a TON, less than 4 of each but there are a good 20+ configurable user values from file paths to general numeric. In the main program, it's easy because right now the local variables are just that. If I move to a seperate vi for the configurables then there will be no more locals :( . Oh so confusing. Maybe I should just re-write all of my code in a better architecture because right now I'm getting overwhelmed just looking at it.

    I've been using the OpenG Toolkit for awhile, in fact the INI config VI's is the first reason I started. For the last several projects I've used them on I develop a functional global to provide read and write access to the INI file's variables. This allows me to use any of those variables in any part of my program. You should probably check out a different architecture for your code to make less use of locals. You should be able to get by with one instance of a local for every control you want to update from the INI File. Simply call this case of a state machine to update from a change, or on startup. I personnally use a state machine architecture, which is probably the most popular. There are some shipping examples with LV, and probably some on this forum for you to research.

    Chris

  10. G'day,

    why not calling the sqlite3.dll directly? e.g.: sqlite.viDownload File:post-3293-1138210594.vi

    Get your latest sqlite3.dll form www.sqlite.org. e.g. http://www.sqlite.org/sqlitedll-3_3_2.zip

    Thomas

    Thomas,

    You can call that particular function directly from the SQLite DLL, but when I tried to interfact to it directly on some of the functions that actually execute SQL commands or deal with the database I crashed LV. I may be wrong, but I'm sure it will be easy to see when I've uploaded the interface code. I'll be through with my interface and example code soon and someone who has done this before can begin to look at what I've made and make it better. That's the idea behind open source isn't?

    Thanks,

    Chris

  11. Maybe you can educate us a little bit. I've worked with several database engines but not SQLite. I understand it's embedded. Does this mean you cannot access it from an ODBC interface? Can you create a DLL that can be called through LabVIEW?

    Not a problem. SQLite is an embedded database, which means that the database you create is just a single file on your computer. This single file can be backed up easily and even moved across platforms (windows, mac, linux) to be read using the appropriate SQLite DLL ( or shared library on other platforms). It claims speed as one of its advantages, but I can't back that up with any hard numbers. In my case, the speed of execution is not as important to me as other properties. I'm mostly interested in the ability to access data with SQL commands without having to install and maintain all the seperate database administration tools and packages on the windows platform. I'm interested in the "crossplatform-ness" because I run LabView on the Mac and Linux as well. As for access with ODBC, there are some ODBC drivers / wrappers for SQLite, but I haven't played with them yet. There are also some ADO drivers / wrappers for SQLite but I have had little success getting those to work in LabView, and of course they ruin the crossplatform idea since they are activeX based. I've created a CVI based DLL that can be called through LabView that lets you read and write to / from a SQLite database. This DLL simplifies the process of calling the SQLite DLL from LabView by taking care of some housekeeping and reformatting of data that are needed to make LabView happy.

    My initial test case is a program that I am attempting to write to allow a user to load and crop a directory of images (JPG's) with a thumbnail display to let the user select the image they want to crop. I was thinking about processing the thumbnails once and loading them into a SQLite database as blob data to be retrieved the next time that directory is called up. I am also going to try and provide non-destructive editing by logging the crop parameters into the database and executing them only in an export step when the images get uploaded to a web page for viewing by the general public. I know some programs like this exist out there now, but they don't meet all the needs of my particular user, and thus I've been asked to research the idea to see if I can do it without breaking the bank.

    Hope this provides a little more information.

    Thanks,

    Chris Davis

  12. I've been working with SQLite 3 (www.sqlite.org) for the last couple of days. And had good success with and had some good success in developing a wrapper for SQLite that can easily be used in LabView. I'm writing this wrapper in LabWindows/CVI, but it is all standard ANSI C, and not very much of it anyway. I was wondering if there is a call for an embedded database like SQLite in the LabView world. I don't use databases very much but when I ran across an article about SQLite I couldn't resist toying with it. I have no problem posting the code, if there is interest, and I think it could prove to be a useful addition to the OpenG toolkit, if there was a call to develop it into a library compatable with OpenG. One nice thing is that SQLite is at least as cross-platform as LabView!

    I await your responses!

    Chris Davis

  13. Is there anyone interested in setting up an open source alternative to the IMAQ Vision toolkit using OpenCV. I've done some preliminary work to see if it is possible, but before I go offering up my work so far I was curious if anyone was interested. I think this would be a good addition to OpenG's set of tools, but I thought this forum would be a good sounding board to see if such a toolkit would be desired. If this topic is of interest to you please reply to this post, where we can begin to work out some of the details.

    Thanks,

    Chris Davis

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.