How do I properly use imaqCentroid() ?

Hi,
Earlier, I used particle filtering and imaqCalcCoeff(IMAQ_CENTER_MASS_X, Y) to find the center of mass of a black circle printed on a white piece of paper.
Then I would like to try to calculate the center-position using the grayscale image, to achieve sub-pixel accuracy.
I have tried running imaqCentroid() on the image, with a mask surrounding the black circle (the ROI is set to a few pixels larger than the binary particle found at same position).
But the results from imaqCentroid() is much worse than when using blob/particle analysis. The center position is quite different, and there is much more jittering.
I suspect that I need to modify my grayscale image before running imaqCentroid(), but I am not sure which st
eps/functions to use.
Comments?
Thanks,
Torbjørn

Try a white circle on a black background. It will work better. Another option is to invert your current image.
The white pixels carry the most weight (255) when using IMAQ Centroid. The black pixels carry the least weight (0). Right now, you are calculating the centroid of the white strip around your circle. By inverting the image, you will calculate the centroid of the circle.
The best results for IMAQ Centroid are obtained with a white object on a black background. If the lighting is not even or the color/brightness is not even, you will get shifts in your centroid away from the actual center.
I think your results with blob analysis will be better and more consistant than IMAQ Centroid. Another option, if your blobs are all circles, is to us
e Find Circular Edge once you know their approximate location. This uses edge finding to very accurately determine the position of a circular object.
Bruce
Bruce Ammons
Ammons Engineering

Similar Messages

  • How do I properly use symlinks for SSD/HHD hybrid MBP?

    So, I have OS X (10.8.4) on the 120 SSD in my MBP. There's also a 500GB HDD partitioned into "Machintosh HDD" (250GB; this partition is what I intend for the storage drive) and "Time Machine" (250GB; I'm backing up the boot drive, am not doing so for the storage drive. Any remarks about this?). I don't want to dump the whole home folder on the the HDD, but I can't get the symlink commands in terminal correct. This guide seems to have the right idea, but it's not working. Example. I open the SSD (/Users/anotherwalrus/) and the HDD and drag the Pictures folder from the home folder into /Volumes/Machintosh\ HDD/storagedrive/ (Note: "storagedrive" is a folder I created at the base of the HDD). I open terminal. In ~/Users/anotherwalrus/ typing "sudo rm -rf Pictures" deletes the folder. I see it happen. Then again in ~/User/anotherwalrus/ I type "ln -s /Volumes/Machintosh\ HDD/storagedrive/Pictures". Okay, now there's an alias file in the home folder in Finder on the SSD that when clicked takes me to the copied Pictures folder on the HDD. However, and here is the problem, Pictures no longer exists. I mean, going into Finder Preferences and resetting it to show Pictures doesn't work because once you leave the Preferences page: * A) It's not in the sidebar * B) Going back into Preferences shows that it's unchecked Also, when trying to download photos from the net, there's not option to download in to the Pictures folder. Isn't the whole point of symlinks to show that the folder is in the home folder like normal, just it doesn't actually live or store data on the drive? Right now I don't have a Pictures folder in /Users/drtobin/ with the other folders (Documents, Movies, Applications, etc.). There are all of the folders I haven't messed with yet, and a white page alias icon that goes to the HDD. I thought the beauty of the symlink method of a mixed drive was that you can still interface (put files in, etc.) with the folder that pretends to be in /Users/anoherwalrus/ but really is on the HDD. Are there commands that will accomplish this properly. Wat do?

    I don't know that copying them from an external would be any different than doing it internally because they are physically seperated.  I have tried many different configurations.  It won't let me erase or format the SSD so that I can clone the Hybrid to it. Which is what I prefer to do but I haven't boot from the recovery or an external and tried doing it that way.  But even then I have to boot from each seperately, what is holding me up is I've lost both product keys to office and adobe ms 6 due to the fact of not only having them so long and always upgrade using dmg's as well as upgrading os's so often.  So those programs are only available on one computer. Which happens to be on a seperate internal disk.  A slick unix script would be nice.  I am just really tired of trial and error and would like to get back to using my stuff.

  • How do I properly use permission reset?

    I, among many, am having trouble installing Logic Pro X.  At first, it got hung up during the installation process.  While the status bar was still blue and "flowing", the installation made no progress from time I went to sleep and woke up....and I was on wifi.
    At the suggestion of someone way more Mac-savvy than myself, I downloaded permission reset from apple, and followed their instructions (dragging Logic contents folder into permissions window, then selecting "read" in 1st box, "write" in 2nd box, and "execute" in third box.)  After that, when I click reset (as instructed), the boxes restore to the previous settings (box 1: read & write, box 2:read & write, etc)
    I noticed I also have several options at this window as far as a "locked" check box as well as others, and user options (staff, wheel, admin, myself)
    Does anyone have any idea what I'm talking about? lol
    I'm really close to just erasing the program and going with something else, as this is really killing my creative flow.  I've been wanting to record some demos for my band to learn for several days now, and I cant even install the software.
    In summary, Logic ProX gets stuck during install.  It doesnt "freeze", per-se, as I can still "read more about Logic" or whatever, and my staus bar remains blue and moving....just no progress.  If anyone can help I would really appreciate it.  I might even pay you!!

    Greetings ... it depends what you want to use the Voice Separation tool for... your question is quite general but here are a few pointers: explore the menu around Score Styles. The Voice separation tool only seems to work if you have a polyphonic score style with different staves assigned to different midi channels. So if you were doing say a piano part you need to assign the treble to Channel 1 and bass to Channel 2. Then when you drag the Voice Sep Tool through a cluster of notes, those below will drop down onto the lower stave of the score.
    If you say more precisely what you are doing.. I am sure others more expert than me in the Score Editor will chime in
    good luck
    PS As to the value of the notes: those you can check out more precisely in the Piano Roll ( or what was previously known in L7 as the Matrix). This is an essential tool for making a score as you can see exactly how long or short the notes actually are. Often the Score Editor does not give a completely accurate display in my experience
    Message was edited by: musicspirit

  • How do I properly use the HDR function in Photoshop CS4?

    It appears that I must be doing something wrong when attempting to use the HDR capability in Photoshop CS4.  I follow the tutorials.  I go to File>Automate>Merge to HDR.  Then I select the bracketed photos to merge.  I have used RAW file combinations of "normal" with +1 and -1 exposures, and "normal" with +2 and -2 exposures.  Inevitably the result comes out looking like the most overexposed shot...or even more washed out.  Since CS4 normally works for me as intended, I feel that I must be doing something wrong with the HDR function.  Can anyone offer any helpful suggestions?  Thanks!

    Don't feel bad.  While I haven't seen just what you're describing, the Merge to HDR function seems, in my opinion, kind of a bust.  I can't say I've seen any "magic" at all in the way it combines the exposures.
    I've tried to use it several times and I just don't see results that make me feel it's worth using.  I have in every case been able to make better images out of a single well-exposed raw file than with the Merge to HDR function and several bracketed exposures (even with CS5's Merge to HDR Pro).
    If people offer suggestions here, I'll be trying them too.
    -Noel

  • How do I register my adobe photo shop 5 to properly use?

    How do I properly download the program on my computer in order to use the program I bought?

    Ab photography for information on how to register your Adobe software title please see Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.  What Adobe software title are you wishing to download?

  • How do I properly archive or save projects so they could be used in the future

    Help would be greatly appreciated
    How do I properly archive or save projects so they could be used in the future, but yet delete or trash the events folder they came from, to clear hard drive space

    Hi to all of you Seniors and one junior [i.e. the the OP who started this thread]. I feel that this thread is a very vital subject relevant to practical and economical 'creativity oriented videography'!!!
    As a newcomer I always have tried to have a grasp over this matter and the insecurity of 'incomplete knowledge' has been a constant mental niggle.
    May I tell you that I have been struggling to 'hear' what I am now 'hearing' in this present discussion for over the past 10 months and have not been able to!!!
    I shout out a million cheers to all the participants, OP included, involved in this thread.
    May I request that this discussion be not allowed to die down but be used as a guidepost for all folks, especially those whose primary work is videography? By the time the this thread comes to an end, every reader should be able to make an 'informed and learned' decision of how to economically and safely preserve his work.
    Salty's observation regarding opting for SD looks attractive just because of the lack of a suitable [read economical] means of having your work in HD...but, if in the coming days, were there to be any pathbreaking discoveries in terms of data storage, and hugh capacity drives are available at 'throwaway prices' would we not for the rest of our lives regret having done our works in SD?
    Appleman's foray into this common problem, as to how it should be tackled, needs to be greatly lauded. Tom Wolsky's precise observations which obviate the need to check out and painfully realize some of the errors in Appleman's hypothesis neccessitate that the laurels, as usual, be handed over to him.
    Now having said what I felt after reading through this thread, I would like these clarifications:
    1] what is meant by having a backup of 'currentevent.fcpevent.'? How do we go about it. Where are we to store it? After doing this 'backup' can the 'currentevent.fcpevent.' file be deleted from the event folder?
    2] Some word of enlightenment regarding the meaning and usage of 'event metadata '...i.e. say after 3 years of having the 'projected related event data' in cold storage, were one have the need to put his project back again on to the timeline for further editing...what are the exact steps which one should take?
    DR.SOMANNA

  • How do I properly zero out or erase the hard drives in my early 2009 Mac Pro 4,1 tower?

    How do I properly zero out or erase the hard drives in my early 2009 Mac Pro 4,1 tower?
    I assume there are already instructions on Apple.com someplace but haven't seen them yet… I have to one terabyte drives one the operating system the other is blank I want to start fresh I want to zero out both drives but I didn't want to make any mistakes
    I know I can use disk utility to 0 Out Dr., #2 that means I will have to take out the operating system hard drive out of my 2008 Mac Pro and put it into my 2009 Mac Pro to use the disk utility to zero out drive one the OS drive in my 2009 Mac Pro am my correct
    I just need a little bit a help I want to go slow so I don't make any mistakes with the sleds or with the erasing process which journaled to choose encrypted or not etc. etc.
    Furthermore is there instructions on the site on how to change the hard drive into a different sled because the sleds and my 2009 are different than my 2008 any advice
    Thank you

    I'm doing this because my friend told me that zeroing out the drive can nap bad sectors and also later for some kind of diagnostics usage of the drive or something like that he wasn't really clear
    My friend was really specific he said choose the option that writes zero's once over the drive that is plenty good enough I was inclined to use the maximum seven write ...I just want to make sure the drive has no bad sectors and that's it's it's zeroed out for possible future diagnostics usage or something that he said was usable later
    he also advised me to run a test on it but I don't have the software you mentioned or the software that he has… So I may have to take the drives over to his house unless you have some kind of free software that's easy to use that you could suggest that will not only zero out the drive but test the drive completely
    I am completely new to Mac I'm no dummy but at the same time I'm not super technically capable I mean I can surprise myself I'm pretty good but I need a good teacher… How expensive is this lifeguard software?
    Thank you

  • How do i properly erase an iphoto folder?

    unfortunately (and ironically), in my paranoia to not lose any photos, i've imported similar photos several times into iphoto. i then used iphoto diet, but it does strange things sometimes - in my experience, it doesn't always remove the proper duplicate (but the thumbnail), etc. so i've resorted to manually sorting each of 15K (ouch!) photos to remove the correct duplicate. i do this by sorting through the photos for different years. i've started working on 2004, and wanted to start with a clean slate and erase all the photos, then only import the orinigals i want, but iphoto 'residually' shows the saved thumbnails (i think they're thumbnails b/c they are only about 16kb, and don't open to full size - i get the 'white screen' that others have mentioned). i entered the iphoto folder (i know - a no no, but didn't know how else to erase 2004 photos) and deleted the 2004 folder.
    sorry for being so wordy - can you suggest a way to eliminate my 2004 photos in a way that would be iphoto-friendly ?
    thanks for any suggestions.
    -vince

    There are several ways to erase photos, slideshows and albuns from iPhoto.
    First of all, to make you more feel secure all you photos are actually in your iPhoto library- that means they have been copied to you pictures folder. Whatever you do with them, the originals are kept. I mean, if you have one photo in a certain album and if you erase it from that album, the original is kept in the Library and pictures folder. All iPhoto does is like an alias to the Library, so it is perfectly safe to erase an album or slideshow in iPhoto, since the real photos are in the Library, and the most real ones are still kept in the pictures folder on the finder.
    ..."how do i properly erase an iphoto folder?"- select it and press "delete" or on the "edit" menu--> "erase/delete/cut"... again... don't worry about the content of this folder/album, because they will remain either on the iPhoto Library and pictures folder on the Finder.
    Sorry to be so confusing...
    Hope I've been helpfull.
    Kisses from Portugal
    CV

  • Hello guys..does anybody know how to install and use adobe master collection with the new lion?   I need to use Flash and illustratore, but apparently those programmes are incompatible with the new operative sistem...   I am a new mac users and I'd like t

    Hello guys..does anybody know how to install and use adobe master collection with the new lion?
    I need to use Flash and illustratore, but apparently those programmes are incompatible with the new operative sistem...
    I am a new mac users and I'd like to know if there are other similar programmes I can use with lion!

    Lab79 wrote:
    Are you on Apple's payroll?
    well dude I can only let you know that as I work with those programme I don't have to pay for it is my company that pays the programme I whant to use( that's why I was asking if there where other programmes ..that I could use with lion insted that Illustrator and Flash!)..I know Adobe since 2005 and I can say that Adobs products are very good...I think that if it's an Adobe probleme or fault ..they will solve it very soon...but unfortunally I have the impression that after Jobs passed away Appel decided to change politics..and everything started to go very bad! (see FCP X)..
    good luck with apple dude..
    Where is the Apple problem? I have CS4 and CS5 running perfectly fine on my Macbook Pro. Installed 5 after Lion upgrade. Worth every cent. Adobe did have some catching up to do with Lion but with the CS5.5 update all runs fine. But not yours. So it is a problem with the Lion OS? You say you have been with Adobe since 2005. So you would be aware of all the other issues that Adobe had catching up with past Oss in Mac and Windows then. They get it right, but it is up to them. It is not up to Apple, nor Microsoft for that matter, to run around and check that every software developer in the world is running their business properly.
    And what has politics got to do with anything. Some people just have to blame Software for their poor Hardware maintainence of failure of the same.
    <The only think I can really do is to go back on my old windows...give back this orrible lap top and ask for my money back!>
    Great suggestion. You should go with that one, but good luck getting a refund.
    Bye

  • How can I make use of the CSS feature?

    <p>Hi </p><p>I am using Cr4E to design a report that will be deployed over the web both as an html page and in PDF format. I now want to assign styles to the fields in the report so that the PDF and the HTML version look differently . </p><p>My questions:</p><p>1) Is there a short explanation on how to that properly?<br /></p><p>2) I assume that the CSS styles will only  be used in the HTML version and will be ignored in the PDF. Is that correct and - if not - is there another way to apply different styles to the PDF and HTML? </p><p> </p><p>As always any suggestions are highly appreciated!</p><p>Peter Buchmann from  a rainy Zurich, Switzerland </p><p> </p>

    <p>Hi Peter, </p><p>Ok, I learned something new on this one as well. It appears that the JRC has not yet been updated to include CSS support. As you mentioned, the CSS feature will enable specific output when rendered in our HTML viewer. So to answer your question, yes, if this was indeed supported, it would provide a different output when viewed over the web as opposed to PDF format.</p><p>Now, I know the next question you have is "If it is not supported, then why is it exposed?". There are actually 2 reasons for this:</p><ol><li>This same Designer is also bundled with IBM Rational Application Developer. With the RAD integration we include an Enterprise Repository Explorer view which will allow users to publish reports to a BusinessObjects Enterprise or Crystal Reports Server system. On these systems the CSS field will work.<br /><br /></li><li> Backwards-compatibility - if you open an existing report designed by the external designer then you will need to ensure that all of the properties are re-saved when the report is saved in the CR4E designer. Users can still modify these values, it&#39;s just that they will not be honored by the runtime engine.</li></ol><p>The good news is that we should have support for this feature in the next full release of Crystal Reports for Eclipse. Unfortunately, I don&#39;t think I can officially comment on timelines until early next year, once I get some resource commitments. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p><p>P.S.</p><p>Did I mention I live in Vancouver? We have 2 seasons in Vancouver...the rainy season and August. </p><p> <strong><a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a></strong>          </p>

  • How to delete properly a group calendar ?

    Hello,
    How to delete properly a group calendar ?
    We have not problem to use webcalendar, but when we try to subscribe us with ical, we have encounters a access problem authorisation.
    There's only one group that make problem.
    The others work perfectly.
    Thanks, Chris

    _Calendaring Services : Enabling iCal Service for a Group_ : Web Group Calendars
    With a web browser, my Wiki group , "Calendar group"and blog service are fine. In "Calendar", i can create event with any date and time. but with iCal application when i try to subscribe to my group (http://ical.servername:8008/calendars/groups/mygroupname/calendar/), i have an error:
    "(sudoers)wikiserver as (groups)mygroupname"
    "REPORT /calendars/groups/mygroupname/calendar/ HTTP/1.1"
    "REPORT /calendars/groups/mygroupname/calendar/ HTTP/1.1"
    "(sudoers)wikiserver as (groups)mygroupname"
    "REPORT /calendars/groups/mygroupname/calendar/ HTTP/1.1"
    [caldav-8009] [AMP,client] GET /calendars/groups/mygroupname/calendar/ HTTP/1.1
    [caldav-8009] [AMP,client] Unauthenticated users not enabled with the 'calendar' SACL
    [caldav-8009] [AMP,client] Allow proxy: user 'wikiserver' as 'mygroupname'
    [caldav-8009] [AMP,client] REPORT /calendars/groups/mygroupname/calendar/ HTTP/1.1
    Message was edited by: eXpresso

  • How do I properly change a Mac's name?

    My laptop (a MacBook with Tiger) was assigned a name when I first activated it. I am using it as an airport router (using a mobile broadband system, via a "modem" connected to the laptop to access the internet) with two iMacs. One of the iMacs has the same name as the laptop. I found I had problems with the airport network, because of the common name.
    I changed the name of the laptop, using Sharing in Preferences to "Eric's Laptop". However, the name seen by the airport connection on both iMac's remains as it originally was, and I continue to have problems with the airport network.
    How do I properly change the name of the laptop so its network name is, indeed, changed?

    Thank you Baby Boomer, Texas Mac Man, and Neville Hillyer. I have taken those actions, now several times. They have not changed the laptop's name, _as seen_ on the AirPort drop-down on the right of my iMac menu bar, and the problem continues.
    When I first bought and activated the laptop and used it for this purpose, I ran into this same problem. After hours of frustration, since the laptop was still under warranty, I called Apple Service, and a helpful and knowledgeable support technician walked me through a very different and simple process that did change the name as seen by the other computers on the AirPort network. At that time, I asked why that information was not available anywhere for Mac customers, and he did not know. I (obviously) do not remember what that process was.

  • How do you properly disconnect a vga monitor?

    I use a vga monitor at work about 2 to 3 times a week. I have a MBP 13, 2011.  I use it for powerpoint presentations.
    I was wondering how do you properly disconnect it once I'm done?
    I normally close out the application; turn off VGA, and then just disconnect.
    I feel like this may not be the proper way to do this.  I've looked for some sort of eject, but haven't found anything.
    Any feedback would be greatly appreciated.

    If you are switching between a monitor and a projector and the display resolutions are not the same as the MBP's then you should turn off the computer as well. I have found when using a projector that things tend to work best if the computer's display resolution is set to the resolution of the projector. It may not turn out to be necessary, but keep it in mind.

  • How do I properly remove an app from iphone6

    How do I remove an app forever properly?
    Marquis1562

    touch and hold the icon when it starts to wiggle press the cross in top corner
    OR
    Go to Settings and tap General > Usage > Manage Storage.
    Select any app to see how much space it uses, and tap Delete App to remove it.

  • Properly Using Configurat​ion Informatio​n/Files

    I've read through the previous posts on the forum and have scoured the internet looking for information, but I still don't feel that I know how to properly use configuration information for my program.
    Basically, this program is a large scale application that requires a ton of configuration information (as opposed to just specifying constants).  The reason I am doing this is because the scientists we are working for want to be able to adjust almost any parameter at any time.  Right now, I am using a standard .ini file (which is getting unwieldy).  There are 7 main segments for my program (Output HW, Input HW, Network Comms, Calcs, etc.) that need to have configuration information stored.  Currently there are 178 different "sections" with up to 7 "keys" per section.
    I have thought about...
    1.  Using a single configuration file.  This is getting unwieldy, and being able to change any parameter at any time can lead to a ton of old config files (each old file is time/date stamped and saved so that all old config's can be available).  Creating a parser for this is a bear.
    2.  Using multiple configuration files.  Seems better, but this leads to 7 config files and 7 config file parsers to maintain.
    3.  Go with an XML format config file.  I'm not too familiar with this, but it seems more scalable than .ini.
    4.  Using an Excel file with columns and rows that are parsed for config information.  Doesn't seem to be the way to go... (as there are many different sections and each section has different types of keys)
    I am just confused now on the way to approach this problem.  Any help or direction would be appreciated.
    Nathan - Certified LabVIEW Developer
    Solved!
    Go to Solution.

    pjr1121 wrote:
    "being able to change any parameter at any time can lead to a ton of old config files"
    This statement is a little confusing to me.  I certainly hope you aren't creating a brand new config file everytime a control is changed on the front panel.  
    Seems I didn't explain myself well.  Every time any one of the configuration options changes, we have to create a new file and move the old file (with time/date stamp) to an "Old Config Files" folder.  That way, in case they need to do any post-processing of the data, they can use the configuration settings that occurred when the specific time-stamped data file was recorded.
    The reason why there is so many is because we have a ton of channels to record data from (including network and calculations) which brings us to about 178 different configuration options to be addressed, each option with several keys of its own.
    Nathan - Certified LabVIEW Developer

Maybe you are looking for