Vertical distance- IMAQ clamp max Function

I need to find Vertical distance in an image-
First of all, I select a region using a rectangle box. Then i choose the scan direction : Left to right OR Top to Bottom.
For the Left to right scan direction, I use a IMAQ Clamp max function to calculate distance between the furthest opposite edges. It works fine when the measurement is done horizontal (See Figure 1).
Now I need to do the measurement in Vertical direction. i.e from top to bottom. I see that i cannot use the IMAQ Clamp max function since measurement is done horizontal in IMAQ Clamp Max. So i used a IMAQ Clamp Vertical Max VI to calculate distance in vertical direction. But now the problem is: If the image is a bit tilted, it gives a wrong result. (See Figure 2)
I also tried using IMAQ Clamp Vertical Min. But then it ignores the max point. If there is a variation ( bulge outwards or inwards) I need to have result depending on it.
Is there any ideas to correct the tilt?
Nghtcwrlr
********************Kudos are alwayzz Welcome !! ******************
Attachments:
Question1.JPG ‏22 KB

Hi Nghtcrwlr!
You can use the Max Clamp function with the setting "Vertical" in the Vision Assistant. Make sure that the ROI encloses the entire object in the image. The "Angle Range" parameter controls tolerance of the angle by which the edge can be rotated. If you set the parameter to a small value the algorithm will find the maximum dimension of the object along the vertical axis. However if you allow the algorithm to adapt to a slightly tilted image by setting the value to a higher value it will find the edges of the object and will determine the dimension perpendicular to those edges.
Hope that helps,
  Georg
Attachments:
tolerance 1 degree.PNG ‏207 KB
tolerance 15 degrees.png ‏151 KB

Similar Messages

  • How to Avoid Errors in Max Function When Data Contains Blank Cells

    I have a column with duration values. However, it also contains some blank cells. These "blank cells" have formulas in them, but as the cells they reference too are blank the formula doesn't produce a result.>/p>
    I want to get the max value from this column. When I simply do =MAX(column-name) I get an error, presumably because some of the cells are blank. This table is going to be highly dynamic, so I don't want to limit the range of the MAX() function to only those cells with values.
    So does anyone know a solution for this, please? If I was some how able to create a formula which returned the range of cells with actual values, then I could use that in the MAX() function. Or, if I could somehow tell the MAX() function to ignore blank cells, but I'm not sure either of these are possible.
    Thanks,
    Nic

    I don't see a problem with "blank" (null string) cells mixed with duration cells.  MAX works fine with this mix of cells. But if the "blank" cells are numbers, not text, that gives an error.
    A formula always produces a result. A formula cannot result in a blank cell. The closest you can get to "blank" is a null string (the result of two quotes next to each other with nothing between them) . So the question is, what is the result that you are calling "blank"?

  • MAX function

    Hi Everyone,
    Am aware of the following flavors of MAX function
    1) choose MAX from the folders/fields list (selected items tab)
    2) create calculation using: MAX keep dense
    3) create calculation using: MAX analytic function
    questions, pls:
    ===========
    a) with MAX regular, MAX keep dense, MAX - analytic function
    is it necessary to sort it using tools/sort - choose fields to sort by?
    or does the data get sorted due to the ORDER BY clause in MAX used in a calculation
    b) how to understand the diff. bet. MAX keep dense and MAX - analytic function
    1) i understand that analytic functions are applied after detail row processing
    does MAX keep dense calculation happen during detail row processing?
    2) how did you know to advise when to use MAX keep dense, and when to use MAX - analytic function?
    tx for your ideas and assistance, sandra

    Hi,
    a) with MAX regular, MAX keep dense, MAX - analytic function is it necessary to sort it using tools/sort - choose fields to sort by? or does the data get sorted due to the ORDER BY clause in MAX used in a calculationIt is only necessary to use a sort if you want to have the rows returned in a specific order. The order by in the max calculation defines the maximum within the group or window. It may affect the order the rows are returned, but if it does this is not guaranteed and you should use a sort on the main query.
    b) how to understand the diff. bet. MAX keep dense and MAX - analytic function
    1) i understand that analytic functions are applied after detail row processing does MAX keep dense calculation happen during detail row processing?Yes
    2) how did you know to advise when to use MAX keep dense, and when to use MAX - analytic function?In general, if you want the result on a single row, so you have one row for each group then you should use the aggregate max. If you want to use the same max on all the rows in the window (defined by the partition) then use the analytic max.
    Rod West

  • Using max function in PL/SQL

    VERY URGENT...
    Am new to oracle...
    I've written a package that display gif images in form of histogram/bar chart. using html,
    I need to use max function to display values proportionately.
    please help. i need to complete this assignment by 2/9/00 by 10.00 am at the latest. I've half written a function but I don't know if there's a simpler way fo doing this. html enabled

    First of all Thanks to all gentlemen who replied ..many thanks ...
    Tried the ROW_NUMBER() option but still it is taking time...have given output for the query and tkprof results as well. Even when it doesn't fetch any record ( this is a valid cased because the input header id doesn't have any workflow request submitted & hence no entry in the wf_items table)..then also see the time it has taken.
    Looked at the RANK & DENSE_RANK options which were suggested..but it is still taking time..
    Any further suggestions or ideas as to how this could be resolved..
    SELECT 'Y', 'Y', ITEM_KEY
    FROM
    ( SELECT ITEM_KEY, ROW_NUMBER() OVER(ORDER BY BEGIN_DATE DESC) RN FROM
    WF_ITEMS WHERE ITEM_TYPE = 'xxxxzzzz' AND ROOT_ACTIVITY = 'START_REQUESTS'
    AND SUBSTR(ITEM_KEY,1,INSTR(ITEM_KEY,'-') - 1) = :B1
    ) T WHERE RN <= 1
    call count cpu elapsed disk query current rows
    Parse 0 0.00 0.00 0 0 0 0
    Execute 1 0.00 1.57 0 0 0 0
    Fetch 1 8700.00 544968.73 8180 8185 0 0
    total 2 8700.00 544970.30 8180 8185 0 0
    many thanks

  • Regarding MAX() function

    Hi,
    I am having table A. I have few records in the table A. Database version : 9.2
    ID name deleted
    2 XYZ N
    3 ABD N
    4 GJK N
    5 GJK N
    6 HGY N
    7 YJG N
    8 PIN N
    9 BMF N
    10 OLG N
    I used the following query...
    SELECT MAX(ID) FROM A WHERE DELETED='N';
    It was worked fine until now....
    Now i used the same query...
    But the result is
    MAX(ID)
    9
    Please help me... What is the reason?
    I want the correct result...
    Thanks in advance....                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Kamran Agayev A. wrote:
    Yes you can use TO_NUMBER inside MAX function and it will not give any error in the futureHave you tested it?
    SQL> create table a (id,name,deleted)
      2  as
      3  select '2', 'XYZ', 'N' from dual union all
      4  select '3', 'ABD', 'N' from dual union all
      5  select '4', 'GJK', 'N' from dual union all
      6  select '5', 'GJK', 'N' from dual union all
      7  select '6', 'HGY', 'N' from dual union all
      8  select '7', 'YJG', 'N' from dual union all
      9  select '8', 'PIN', 'N' from dual union all
    10  select '9', 'BMF', 'N' from dual union all
    11  select '10', 'OLG', 'N' from dual
    12  /
    Tabel is aangemaakt.
    SQL> select max(id)
      2    from a
      3   where deleted = 'N'
      4  /
    MA
    9
    1 rij is geselecteerd.
    SQL> select max(to_number(id))
      2    from a
      3   where deleted = 'N'
      4  /
                        MAX(TO_NUMBER(ID))
                                        10
    1 rij is geselecteerd.
    SQL> insert into a values ('2A', 'ABC', 'N')
      2  /
    1 rij is aangemaakt.
    SQL> select max(to_number(id))
      2    from a
      3   where deleted = 'N'
      4  /
    select max(to_number(id))
    FOUT in regel 1:
    .ORA-01722: invalid numberRegards,
    Rob.

  • Use of MAX function

    Hi,
    I am using parent-child hierarchy and in my reports I want to show Max(hierarchy_level). When I use the function MAX directly in the report it works fine in every way. But I want to have this kind of column in the BI Server presentation catalog so the user does not need to add MAX in Analysis/Answers (this is 11g). Normally this would imply a Max(hierarchy_level) as a logical function, but in the BI Server it is not allowed with MAX function in the logical function so it does not work.
    The hierarchy level is just a column from a dimension table and creating it as a fact column is not a very good solution. I also tried to solve this in many different ways, but only the MAX funtion in Analysis/Answers allways give the correct result. Used in combination with other dimensions etc. I want the exact same behaviour as I get when using MAX in analysis.
    Any good ideas to solve this? Is there another function in the BI Server that works the same way as MAX ?

    Very often, about a primary key, see for example our italian accounting application (our VAT invoices:fatture IVA) ), where the holes might be a problem.
    Yes Rosario, of course I know that, and that's why I said "in this scenario" : if primary key is the only purpose, I don't think holes could be a problem.
    Buona giornata anche a te.

  • Use of MAX function in Query Designer

    Dear all,
    i want to create a report that gives ONE line per period that holds the MAX of several lines per period. So NO addition of the KF but just one line item.
    I tried to use the MAX function and/or MAX drop-down boxes via properties on KF,
    but they all provide the wrong result (mostly the MAX after summaction of the KF).
    Any ideas ??
    Greetz,
    Herman

    Hi Herman
        Please check the KF infoobject property which might have been set to Summation.  You need to change the property of the KF to MAX if you wish to have MAX value. 
        Hope this might be helpful to you
    Thanks
    Kishore Kusupati

  • How to use MAX function in SSAS MDX Query

    I want to run this Query with MAX Condition on LAST_DATA_UPDATE Column .

    Hi Ashishsingh,
    According to your description, you want to know how to use MAX function in SQL Server Analysis Services MDX Query, right? In this case, please refer to the link below which describe the syntax and sample of MDX function.
    http://technet.microsoft.com/en-us/library/ms145601.aspx
    http://www.mdxpert.com/Functions/MDXFunction.aspx?f=64
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Oracle:how to use max() function in case expression

    how to use max() function in case expression, Please explain with any example

    Hope this helps and should be self explanatory
    with t as
    (select 1 col,100 col2 from dual union
    select 2 ,100 from dual union
    select 2 ,200 from dual union
    select 3,100  from dual union
    select 3,200  from dual  )
    select col, case when max(col2)=100 then 'with 100 range'
    when  max(col2)=200 then 'with 200 range' end  from t group by col

  • How to use MAX() function with date field

    Hi Frzz,
    I have created a Graphical calculation view in which i have multiple records for each employee with different dates. But my requirement is to take the records which have maximum date.
    I have converted the date into Integer and applied the MAX() function. But still am getting multiple records.
    Is there is any other way we can achieve this requirement in Graphical Calculation view??  Your suggestion will really help me.
    Thank  you.
    Krishna.

    Hmm... what have you tried out so far?
    Look, I took the effort and created a little example, just for you
    Assume we have a table that contains the logon dates of users.
    Every line contains the logon date and some info on the user.
    Very much like a not-normalized log file could look like.
    Now, the output we want is: one line per user with the most current logon time.
    Not too difficult:
    1. Have a aggregation node that gives you the distinct user details - one line for every user:
    2. Have another aggregation node that gives you the last (MAX) logon date per user:
    Finally you do a 1:1 join on the USER_ID and map the result to the output.
    Easy as pie
    - Lars

  • Use COUNT or MAX functions inside of a query, and you have no data found

    I'm writing a query with a COUNT and a MAX function.
        SELECT  li.id
                 , MAX(m.display_date)
                , COUNT(*)
         FROM li JOIN m  ON (m.LIID=li.LIID)
        WHERE m.DISPLAY_DATE < SYSDATE - 7
        GROUP BY  li.id;I would like to write a query that returns always a row foe each row in the table li.
    If there are no records with the condition "WHERE m.DISPLAY_DATE < SYSDATE - 7", I would like to have a row with
    - COUNT(*) = 0
    - MAX(m.display_date) = TO_DATE('2010-06-08', 'YYYY-MM-DD'

    user600979 wrote:
    I'm writing a query with a COUNT and a MAX function.
    SELECT  li.id
    , MAX(m.display_date)
    , COUNT(*)
    FROM li JOIN m  ON (m.LIID=li.LIID)
    WHERE m.DISPLAY_DATE < SYSDATE - 7
    GROUP BY  li.id;I would like to write a query that returns always a row foe each row in the table li.
    If there are no records with the condition "WHERE m.DISPLAY_DATE < SYSDATE - 7", I would like to have a row with
    - COUNT(*) = 0
    - MAX(m.display_date) = TO_DATE('2010-06-08', 'YYYY-MM-DD'In that case tell me what do you want to display in the ID column. That is the first column?

  • What is the difference this 2 sample pictures? Use IMAQ Detect Circles function to detect the GREEN button.

    Hi All,
    Please refer to the attached 2 pictures, they are the similar, just the size is defferent. (pass.PNG, 5478 pass.PNG).
    But now i try to use IMAQ Detect Circles to catch the GREEN button. For pass.PNG, it works fine, but for another sample, it is always fail to detect this button. 
    I also try to change the Curve Parameters and score as input, but still failed. Another way, i also try to use IMAQ find circles function, but the result is worse than IMAQ Detect Circles, so give up. 
    The code is detect the circles.png, copy it to block diagram enough.
    So, what is the root cause? Thanks for help.
    Colin
    LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2013; testing system development
    Please Mark the solution as accepted if your problem is solved and donate kudoes
    Home--www.colinzhang.net
    Solved!
    Go to Solution.
    Attachments:
    pass.PNG ‏38 KB
    5478 pass.PNG ‏35 KB
    detect the circles.png ‏112 KB

    Hi colinzhang,
    The curve extraction mode if change it to Uniform mode, u can get the result.
    -Suggestion, if you want to use the entire image region as ROI no need to get the image size, getting rectangle and converting it to ROI descriptor. (I think this is unnecessary)
    -Be careful with color plane extraction, u're using by default which is Red plane. In this example it's fine. but make sure u know which plane u're extracting.
    -please find vi saved in 2010 version.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13
    Attachments:
    Detect_Circles.vi ‏53 KB

  • Using Max Function in View Criteria

    Hi
    I am having a requirement where by i need to make use of max function in view criteria but not able to see any such option. Can someone please help me over it. Here is the requirement.
    In table i will be having multiple rows for an employee and i need to pick latest row based on a column say request_id For e.g.
    Emp RequestId
    A 1
    A 2
    A 3
    A 4
    So if i pass the employee id i should get Row Number 4. In simple SQL language I want something like this
    select * from emp where empid=A and requestid=( select max(requestid) from emp where empid=A)
    Just wanted to know is there any approach that i can use to do all this as part of View Criteria or any other way.
    Any help is appreciated!!!
    Thanks
    AJ

    One way is this -
    1)https://blogs.oracle.com/adf/entry/using_groovy_aggregate_functions_in (You might need to create a self-referencing VL for this , try if it works using a ViewAccessor too)
    OR
    Order by RequestId descending in your SQL for the VO if thats ok , then have the ViewCriteria for the EmpId and programmatically pickup the first row...

  • Problem with max function in air

    Hello ,how are you,I write this query : [b]SELECT *, max(trackerId) FROM  sessiontracker [/b]in
    sqlite manager and it works ,but when I use it in Air application  ,it send me back this error:
    ReferenceError: Error #1056: Cannot create property max(trackerId) on
    com.afarinesh.models.SessionTracke
    ,I guess that Actionscript 3 can not pars max function.
    I appreciate your help

    Hello,
    AIR does support max function. Please see Page 1067 of the actionscript developer's guide, which can be download from http://help.adobe.com/en_US/as3/dev/as3_devguide.pdf. And I tried the max function in my AIR application: create a table, insert some records into the table, and use the "select *, max(column) from table". It works fine.
    I noticed your error is the ReferenceError and related to some AS class. So I am not sure if you use any ORM tool. If so, the issue may be caused by the use of the tool. Please check the configuration and usage of the tool.
    Thanks,
    Yang

  • Max value without using max() function

    Hi
    Is there any way to get the max value from a table without using MAX() function
    Thanks

    well if you think about it i'm sure you'll find a solution
    what does max(field) means, it simply is the value of the field where no other value of the same field that is > than this value exists.
    consider the following :
    table TAB(
    fld NUMBER(5));
    translate the logic and you'll have
    select a.fld from TAB a where NOT EXISTS(select b.fld from TAB b where b.fld>a.fld) and rownum=1;
    of course there are better ways i'm sure, you'll just have to figure'em out.

Maybe you are looking for

  • Doubt in ABAP Data types

    Hi friends, I want a clear idea of what is the diference between data type 'f' and 'p' with examples and in what situation which should be used. Similary what and where is 'x' and 'xstring' is used .. In what situations we 'll handly BYTE data ?????

  • ADDING CONTACTS TO ADDRESS BOOK SERVER!!!!!!!!!

    Can someone please help me figure out how to add contacts to the address book server. I tried to drag my contacts but it doesn't work. There is no "+" button for me to add new contacts. I've been trying for a couple days and nothing. Thank you in adv

  • Display for Qualification catelog

    Hi All, While changing the qualifcation catalog ( Transaction OOQA), The Key date for catelog display is 01.01.1900 - 31.12.9999. Can you all help me with following queries. 1) Where from this key date come from ??? 2) Can i set the key date for qual

  • RSS Feeds in Flex

    i have a page that displays live rss feeds. The thing is that, it works correctly when the project is just a Flex Project and run as a flex application. But when i create a Flex project that runs on a server (Tomcat 5.5) with Blaze DS, the rss feeds

  • Eror Creating New Technical System in portal(SLD)

    Hi creating SLD through Techinal system(in portal).When i click to register Message server to enter message server name and port ,it is displaying a below error:- Please help me out Error Summary While processing the current request, an exception occ