Calculate the perimeter of object in binary image how!!!!!!!
Hi
I try to use labview to find area and perimeter of object in binary using vision function
for the area the labview find it in pixel]
but for perimeter I have problem I read from ni.com vision manual this words
http://zone.ni.com/reference/en-XX/help/372916M-01/nivisionconcepts/particle_measurements/
"""Length of a boundary of a region. Because the boundary of a binary image is comprised of discrete pixels, NI Vision subsamples the boundary points to approximate a smoother, more accurate perimeter. Boundary points are the pixel corners that form the boundary of the particle. Refer to the introduction for an illustration of pixel corners."""
what is the problem I really did not understand what he mean::"""Because the boundary of a binary image is comprised of discrete pixels""
can any one explain to us the case please and who will lv find the perimeter
best regards
hi ?Q>
Hornless.Rhino wrote:
mangood wrote:
what is the problem I really did not understand what he mean::"""Because the boundary of a binary image is comprised of discrete pixels""
can any one explain to us the case please and who will lv find the perimeter
best regards
Take the following image on the left. You can see it is quite jagged.
Since pixels are square/rectangular you cannot have a perfectly straight edge on a line that is not horizontal or vertical.
But looking at how the edge of the object actually is, the jaggedness can be "smoothed out" and hence help determine what the perimiter should be were it perfectly smooth.
thank you
do you mean that lv do a low pass filter for image before he caculate the perimeter?????
finally which connectivity is best 4 or 8 for finding the perimeter??? or which algorthem used by lv to find the perimeter???
best regards
hi ?Q>
Similar Messages
-
Draw by mouse the edges of an XY graph to calculate the perimeter and the area of it
I have signals taken from a stabilometer ... I have plot X in terms of y in an XY graph and I want to know how I can plot by mouse a cricle that join most of the points which is the graph of X in terms of Y and calculate the area of it plus the perimeter. I have attached my labview program with two file X and Y
Solved!
Go to Solution.
Attachments:
xB.txt 341 KB
yB.txt 305 KB
read data.vi 344 KBTry this. I create a circle, center where you click on the XY plot. Change the radius accordingly.
CLD Certified 2014
Attachments:
read data.vi 157 KB -
What is exact meaning of the perimeter?
I trouble about the particle information.
In my application, After processed the blob, and
I reported area and perimeter each indexed particle.
but In the first image, the area is 6, and the perimeter is 8.
What happen?
Before I knew, the perimeter is bigger than the area
But the perimeter is bigger in case of small Particle,
(Image 1)
and the area is bigger in case of big particle.
(Image 4)
So, let me know about How can analyze the perimeter in detail.
I attached image files.
Attachments:
Inspection_Images.ppt 534 KBPlease look at a atteched image again.
In the image, you will see the information of the area, perimeter.
so, please check again about the perimeter analysis
Indeed, the perimeter calculations that you appear to be seeing are incorrect. The Particle Analysis perimeter algorithm uses sub-pixel interpolation to calculate the perimeter of the particles. When you have very small particles, or very square shapes, the perimeter calculations loose some of their accuracy. For example, I tested on a rectangle that was 97x80 pixels (actual area = 7760, actual perimeter = 354), and the algorithm returned a perimeter of 350, a much smaller percent error than what you are seeing.
With larger, more irregular objects, the perimeter calculation is mo
re accurate with the interpolation algorithms.
Hope this clarifies the behavior you are seeing.
Regards,
Colin C.
Applications Engineering
Colin Christofferson
Community Web Marketing
Blog -
Measure the white area(s) in an image
I want to measure a white area in a binary image, how can i do this ?
I´m useing Imaq.With the IMAQ-VIs "IMAQ ComplexParticle" or "IMAQ ComplexMeasure" (Image Processing -> Analysis) measurements in a binary image are almost no problem ...
Just mail again if you need more detailed help ... -
Retain color to foreground in binary image
hi
i need some help in the java.
I have binary image whose foreground is white nad background is black by the following code
BufferedImage image = ImageIO.read(new File("f:/123.JPG"));
BufferedImage bwImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
BufferedImage fgImage = //foreground image
new BufferedImage(bwImage.getWidth(),bwImage.getHeight(),
BufferedImage.TYPE_BINARY_IMAGE);
now i want to retain color to the foreground only..
can anyone help me..pleaseeeeeeeHere is my idea to display the pic on the webpage:
The pic is stored in DB as binary, after retrieving it, the binary data will be converted to JPEG pic. Then, the pic will be saved to the local machine automaticly. After that, I get the pic's SRC, and use html display it.
My code is as follow (not completed), some errors in it. public static String getPayoffSRC(Services serv, long fileId)
throws FileNotFoundException,
DBException,
DbFileNotFoundException,
IOException {
BufferedImage buffy = new BufferedImage(300, 400,
java.awt.image.BufferedImage.TYPE_INT_RGB);
FileOutputStream out = new FileOutputStream(serv.getFileManager().getFileDb(fileId).getFileName());
JPEGImageEncoder jencoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam enParam = jencoder.getDefaultJPEGEncodeParam(buffy);
enParam.setQuality(1.0F, true);
jencoder.setJPEGEncodeParam(enParam);
jencoder.encode(buffy);
out.close();
return Pic's SRC,
} -
What is the use Business objects over WAD.
Hi Folks,
what is the use Business objects over WAD.
How sap bw is going to use Business Objects.
Thanks,
Cheta.hi,
A business object is a master record within the Measurement System, and is defined as part of the measurement class within Customizing.
Examples of business objects are wells, well completions, and measurement points.
Once the measurement object is maintained, it is saved with the business object so that when viewed, the measurement object is part of the business object.
regards,
Siddharth. -
How can I calculate the interest percentage dynamically?
Hi All,
Please look at these tables (Customer and Rates), having some sample data. I've created a function for returning the interest percentage for a particular customer based upon his/her investment start date and end date. I'm getting the desired result but I'm wondering if I need calculate the composite interest here...then how can I do that? Suppose a customer has invested some amount for 45 days, then I need to calculate the interest for initial 30 days as 5% and additional 15 days as 6% and I need to give the final amount. In this case how can I pull this task off? Please give me some ideas and correct me if I'm wrong. I just want to know how can we do this interest calculation by an Oracle program?
Regards
BS2012
Customer Table
CUSTOMER_ID AMOUNT START_DATE END_DATE
1000 40000 15-JAN-13 15-FEB-13
1001 34000 15-DEC-12 15-FEB-13
1002 35678 15-NOV-12 15-FEB-13
Rates Table
RATE_PCT LOW_TENURE HIGH_TENURE
5 0 30
6 0 60
7 0 90
CREATE OR REPLACE FUNCTION
F_INTEREST_PCT (V_CUSTOMER_ID IN CUSTOMER.CUSTOMER_ID%TYPE)
RETURN NUMBER AS V_RATE_PCT NUMBER;
BEGIN
SELECT A.RATE_PCT INTO V_RATE_PCT
FROM RATES A, CUSTOMER B WHERE (B.END_DATE - B.START_DATE) BETWEEN A.LOW_TENURE AND A.HIGH_TENURE
AND B.CUSTOMER_ID = V_CUSTOMER_ID;
RETURN V_RATE_PCT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE(SQLERRM);
WHEN OTHERS THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END F_INTEREST_PCT;BS2012 wrote:
Hi All,
Please look at these tables (Customer and Rates), having some sample data. I've created a function for returning the interest percentage for a particular customer based upon his/her investment start date and end date. I'm getting the desired result but I'm wondering if I need calculate the composite interest here...then how can I do that? Suppose a customer has invested some amount for 45 days, then I need to calculate the interest for initial 30 days as 5% and additional 15 days as 6% and I need to give the final amount. In this case how can I pull this task off? Please give me some ideas and correct me if I'm wrong. I just want to know how can we do this interest calculation by an Oracle program?
Regards
BS2012
Customer Table
CUSTOMER_ID AMOUNT START_DATE END_DATE
1000 40000 15-JAN-13 15-FEB-13
1001 34000 15-DEC-12 15-FEB-13
1002 35678 15-NOV-12 15-FEB-13
Rates Table
RATE_PCT LOW_TENURE HIGH_TENURE
5 0 30
6 0 60
7 0 90
CREATE OR REPLACE FUNCTION
F_INTEREST_PCT (V_CUSTOMER_ID IN CUSTOMER.CUSTOMER_ID%TYPE)
RETURN NUMBER AS V_RATE_PCT NUMBER;
BEGIN
SELECT A.RATE_PCT INTO V_RATE_PCT
FROM RATES A, CUSTOMER B WHERE (B.END_DATE - B.START_DATE) BETWEEN A.LOW_TENURE AND A.HIGH_TENURE
AND B.CUSTOMER_ID = V_CUSTOMER_ID;
RETURN V_RATE_PCT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE(SQLERRM);
WHEN OTHERS THEN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END F_INTEREST_PCT;
You will need to work out a formula or process to get the results you want, then write the code to do what you devise. When I have to do something hard it helps to write out what I want to do in psuedocode that I alter translate to real code. Let's say I want to do a factorial (1 * 2 * 3 * 4 ...) could be something like
get limit value
set factorial to 1
foreach loop value from 1 to limit
multiply factorial by loop index
v_factorial_n := 1; --set factorial to 1
for i in 1..p_limit_n loop --p_limit_n defined elsewhere
v_factorial_n := v_factorial_n * i;
end loop; --loop to compute factorial
. . . -
How to Calculate the minimum of all the dates in a column
Hi Reporting gurus,
I have to reporting requirement where i need to calculate the Actual cycle time.
This is how it goes.
The last four column should have
Actualstartdate(column1)
Actualfinishdate(column2)
column3 is the minimum of all the date values in column1(actualstartdate) i.e.,all the dates in column 3 should be same which is the minimum date value of column1.
column4 is the Actual Cycle time(column2 - column3)
somebody please throw light on this.
Thanks in advance,
Regards
Sam MathewSam,
If the dates are available as key figures, then simply compare.
(KF1 < KF2) * KF1 + (KF2 <= KF1) * KF2
This forumla should go in column 3 and then column 4 will be CL4 - CL3.
This report has to run at the lowest level, i.e. line item or document number. If you want to run it at a higher level, then create these as calculated KF on the cube and divide the result by a count of the lowest level, i.e. document number/line item using exception aggregatoin or a counter key figure. Resulting value will be an average.
Aneesh -
Any more information on :IMAQ Count Objects" vi?
It looks like you are correct. I was thinking of the input to "Complex Measure", which requires the binary image. I started with IMAQ back when we had to chain all the routines together ourselves, instead of having a single vi that did everything for us.
Bruce
Bruce Ammons
Ammons Engineering -
For my final year project at university I have designed and built a drop tower for testing the energy dissipation performance of test pieces.
In the system I specified having a biased Hall effect sensor (gear tooth sensor) to calculate the speed of the impactor by having a serrated target (ferritic) moving past it.
The idea behind having a serrated target was to enable an average of several readings of time period to be taken, then to use this to divide the known length of the serrations to calculate speed.
The problem I am having is when using the time period measuring block in LV it only wants to measure the period of the first wave, is there any way I could get LV to measure all four periods (there are four serrations) and average them?
Here is an image of the target incase what I have said was a little confusing: http://tinypic.com/r/2a0b8ck/6
Any help will be greatly appreciated!1. The NI 9201 has only analog inputs, so you have no other choices with that devices. I did not look it up before my earlier response. Something about the wording of your first post made me think you were measuring the period with a counter.
2. I am not sure which "time period measuring block" you are using. Please post your VI. Before you post it, run it with your Hall sensor so that you have some data recorded. Go to the Edit menu and choose Make Current Values Default." Save the VI. The indicators on your VI will then have your data saved. Post that VI.
3. I am assuming that you will get a signal which looks something like this, although not necessarily starting exactl at zero time or having exactly uniform spacing between the pulses.
Using some simple logic you can determine the time of the transitions between high and low. The differences between the times of successive transitions are your periods. For the image above the falling edges (going from +1 to -1) occur at about 64, 192, 320, and 448. The differences are 128 in each case. For your impact data the differences are likely to not all be the same as yout target decelerates.
After I see you VI, I can give some suggestions about how to proceed to calculate the differences.
Lynn -
Multiplied by the binary image
Hi every body
I want multiply a binary image to another image. another image is a withe image with 255 value across it.
please help me how can I?Hi Tandis,
I don't see the sense in multiplying with a constant value, but well:
convert your image to a 2D array, then use the standard multiply function… -
Revision: 14486
Revision: 14486
Author: [email protected]
Date: 2010-03-01 14:27:41 -0800 (Mon, 01 Mar 2010)
Log Message:
Add stream metadata support by extracting the actual metadata object from the binary data stream.
Fix bug 466
Modified Paths:
osmf/trunk/framework/OSMF/org/osmf/elements/f4mClasses/ManifestParser.as
osmf/trunk/framework/OSMF/org/osmf/elements/f4mClasses/Media.as
osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/HTTPStreamingUtils.as
osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/f4f/HTTPStreamingF4FIndexHandler.as
osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/f4f/HTTPStreamingF4FStreamInfo.assame problem, data not replicated.
its captured,propagated from source,but not applied.
also no apply errors in DBA_APPLY_ERROR. Looks like the problem is that LCRs propagated from source db do not reach target queue.can i get any help on this?
queried results are as under:
1.at source(capture process)
Capture Session Total
Process Session Serial Redo Entries LCRs
Number ID Number State Scanned Enqueued
CP01 16 7 CAPTURING CHANGES 1010143 72
2. data propagated from source
Total Time Executing
in Seconds Total Events Propagated Total Bytes Propagated
7 13 6731
3. Apply at target(nothing is applied)
Coordinator Session Total Total Total
Process Session Serial Trans Trans Apply
Name ID Number State Received Applied Errors
A001 154 33 APPLYING 0 0 0
4. At target:(nothing in buffer)
Total Captured LCRs
Queue Owner Queue Name LCRs in Memory Spilled LCRs in Buffered Queue
STRMADMIN STREAMS_QUEUE 0 0 0 -
How to calculate the rotation degree of tick marks
Hello Again,
Thanks to so much help that I received here, I've been able to move right along in learning how to perform my job digitally instead of with an old camera.
In my last discussion, I learned out to make the tick marks using copies and rotation. My question now is, how is the rotation calculated so A) I get the correct placement of the tick marks, especially the small ones as there are so many and B) how do I calculate the rotation degree so that I have the proper amount of space at the bottom of the guage/dial?
Here is an image to help show what I'm asking:
I know how to get the large tick marks and the small tick marks, if I were placing them evenly around the entire circle, I would know how to do that also - but since I'm placing them around only a portion of the circle (although still evenly) I'm lost. I can only figure out the space by hit and miss calculations and that is taking much too long. I would also need to know how much to rotate the entire thing by in order to get the open space at the bottom as shown.
thanks for your help!You need to use transform effects and you can get this in about 10 or so minutes.
first you need to set up the objects.
the thick lines I used effect>distort and transform>transform 20 copies angle 14
thi ones 100 copies angle 2,8
G -
How can I calculate total path length of a Binary Search Tree?
I have been trying to learn binary search trees, but I can't figure out a way to calculate the total path length and the number of leaves in a BST. I will utilize a linked list for the nodes in the tree. I will be using an innerClass for the nodes; each node will have a variable for an element and links for the left and right. Does anyone have any idea on how to calculate this? Thanks in advance.:)
By the way, all of the elements are comparable objects.
-
Running Windows 8.1 PRO RTM x64 upgraded from Win 8 PRO. Updates to 8.1 as of 17 October installed
Event viewer still shows newly triggered Error(s) CAPI2 event id 513.
I can trigger this error by manually creating a restore point invoking VSS.
The VSS System Writer is listed and is error free.
Log Name: Application
Source: Microsoft-Windows-CAPI2
Date: 17/10/2013 20:32:19
Event ID: 513
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: Machine -Name
Description:
Cryptographic Services failed while processing the OnIdentity() call in the System Writer Object.
Details:
AddLegacyDriverFiles: Unable to back up image of binary Microsoft Link-Layer Discovery Protocol.
System Error:
Access is denied.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-CAPI2" Guid="{5bbca4a8-b209-48dc-a8c7-b23d3e5216fb}" EventSourceName="Microsoft-Windows-CAPI2" />
<EventID Qualifiers="0">513</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2013-10-17T19:32:19.935384000Z" />
<EventRecordID>89898</EventRecordID>
<Correlation />
<Execution ProcessID="1404" ThreadID="2104" />
<Channel>Application</Channel>
<Computer>Machine-Name</Computer>
<Security />
</System>
<EventData>
<Data>
Details:
AddLegacyDriverFiles: Unable to back up image of binary Microsoft Link-Layer Discovery Protocol.
System Error:
Access is denied.
</Data>
</EventData>
</Event>Thank you excellent post! I confirmed this fix worked for my situation as well. Below is more detailed post since it did not jump out for me the first time.
############################ Details ##############################
My operating system is Windows 8.1 after installing Visual Studio 2013 when Symantec System recover 2013 ran started seeing
the following errors in event logs.
################## Example event log errors #######################
Cryptographic Services failed while processing the OnIdentity() call in the System Writer Object.
Details:
AddLegacyDriverFiles: Unable to back up image of binary Microsoft Link-Layer Discovery Protocol.
System Error:
Access is denied.
################## Example event log errors #######################
Note: Confirmed this fix resolved my issue.
Step 1. Download and unzip accesschk.exe to C:\Temp http://download.sysinternals.com/files/AccessChk.zip
Step 2. Run cmd.exe prompt as Administrator go to Temp directory
C:\>cd Temp
Step 3. Run accesschk.exe
C:\Temp>accesschk.exe -c mslldp
################# Example output 1 #################################
Accesschk v5.10 - Reports effective permissions for securable objects
Copyright (C) 2006-2012 Mark Russinovich
Sysinternals - www.sysinternals.com
mslldp
RW NT AUTHORITY\SYSTEM
RW BUILTIN\Administrators
RW S-1-5-32-549
R NT SERVICE\NlaSvc
################# Example output 1 #################################
Step 4. Run following command.
C:\Temp>SC sdshow MSLLDP <---- Example text 1.
################# Example output 2 #################################
D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BG)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SO)(A;;LCRPWP;;;S-1
-5-80-3141615172-2057878085-1754447212-2405740020-3916490453)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
################# Example output 2 #################################
Step 5. Run following command.
C:\Temp>SC sdshow MUP
################# Example output 3 #################################
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)
(A;;CCLCSWLOCRRC;;;SU) ######## <--- Example text 2. Grab this value. #######
S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
################# Example output 3 #################################
Step 6.
C:\Temp>
### Copy and past Example 1. line in notepad in command promt you can select all then copy the paste the text into notepad.
MSLLDP D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BG)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SO)(A;;LCRPWP;;;S-1-5-80-3141615172-2057878085-1754447212-2405740020-3916490453)
(A;;CCLCSWLOCRRC;;;SU) ######## <--- Insert Example text 2. here #######
S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
Run this command. (Note: Make sure its all one line no wordwrap that the webpage could be showing this text.)
C:\Temp> sc sdset MSLLDP D:(D;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BG)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SO)(A;;LCRPWP;;;S-1-5-80-3141615172-2057878085-1754447212-2405740020-3916490453)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
Step 7.
##### Check the result #####
C:\Temp>accesschk.exe -c mslldp
################# Example output 4 #################################
Accesschk v5.10 - Reports effective permissions for securable objects
Copyright (C) 2006-2012 Mark Russinovich
Sysinternals - www.sysinternals.com
mslldp
RW NT AUTHORITY\SYSTEM
RW BUILTIN\Administrators
RW S-1-5-32-549
R NT SERVICE\NlaSvc
R NT AUTHORITY\SERVICE <--- You should now see this line.
################# Example output 4 #################################
Step 8.
Ran backup using Symantect System Recovery 2013 the event errors did not return after this fix. Great post again!
############################ Details ##############################
Maybe you are looking for
-
I'm using an Acer Aspire Revo R1600 as a mediacenter using XBMC. It's connected to our Samsung TV (pretty sure it's the ES8000) through a Pioneer VSX-922 amplifier (or to be more precise, A/V receiver). It's connected to the receiver over HDMI, which
-
I created my iTunes account when I was living in Venezuela, but have relocated to the US now. How do I change my apple store to allow me to download apps that are not available in the store available to Venezuela? Sorry for the long 'subject'! haha
-
CRM Outlook client based synchronization
Hello , I am using CRM outlook client based synchronization, I am concern about moving to winter clock. Which steps and in which order should be performed on CRM and Exchange side? Rika
-
Hi, I am trying to design a trigger which launches a Perl script as external procedure. Ias it possible to do that? I have found only examples of external C/Java programs. Thanks, Rafael
-
CS5 Media Encoder - black bars of DOOOOOM
Hi Folks, Need a little help from my Friends: When I put a 720 x 576 .mov file through the video encoder, it's got black bars on the left and right of the actual video. I've got a feeling that Adobes Encoder doesn't particularly like anything other t