JPEG decode: how to use it?

Hello experts,
I am using Labview 7 Express and Windows XP.
I am downloading continuous datastreams of JPEG images from network cameras (Motion-JPEG streams, not MPEG).
I use the TCP Read VI to get the streams, and I save them to disk on the fly. It works really great. I can also extract the JPEG files from the M-JPEG files on the fly, which works fine too. Now, I would like to display the JPEG images, using the JPEG Decode VI, but I am puzzled about how to do that: the output of the VI is a cluster of a string and a U32 number. What am I supposed to do with this number ? Is it a pointer?
Thanks!
Philippe

Philippe,
I am trying to do the exact same thing as you here: I have a network camera (Axis 206), and I am currently using 'URL Get HTTP Document.vi' to receive the stream og MJPG (multipart JPEG's). This works fine, but I have som problems displaying and compressing the images. At the end, logging data from a DAQ-card is supposed to be combined with the image stream into a single file.
The 'IMAQ JPEG Decode.vi' is supposed to compress the images into a binary format. I have tried the setup you proposed, but any way I implement this vi the vi executes for less than a second and Labview shuts down.
Any ideas what may be wrong? Displaying live JPEG's (not from a file) is obviously not something NI gave much thought.

Similar Messages

  • In iPhoto 11 imported tiff files remain tiff after editing.  I need to convert to large file jpegs. How? using the "export" function they become too small

    I thought imported tiff files would be converted by iPhoto to JPEGS in previous versions of iPhoto.  this might have been a disadvantage but my current project requires JPEGs as the final product.
    thanks for any guidance
    Jim

    Drag the photo from the iPhoto window to the desktop or export as kind = JPEG
    As to too small - what is too small?  The pixel dimensions of the exported JPEG will be identical to the original TIFF - the file size is smaller because JPEGs are compressed - which of course reduces file size - which of course is the reason that JPEG exists
    LN

  • How to use CASE or DECODE in this?

    Hi , I have a query like this
    AND ...smthng
    AND --smtg
    AND age BETWEEN ....For the last AND clause for age column, I have the values passed from IN param of this SP in form of strings
    '0-30', '31-60', '61-90', and '91+'. The IN param is of course VARCHAR2.
    What I want to do in this AND clause
    e.g. for age range '0-30', the AND clause should be
    AND age BETWEEN ( if this range is '0-30' then ) 0 AND 30 ( if range is '31-60') then BETWEEN 31 AND 60.. and so on...
    However this BETWEEN will work till 61-90 range but for 91+ , there is no upper bound so it should be
    AND age>91
    Now , i am not sure how to achieve this both BETWEEN and '>' clauses in the same AND statement.
    DECODE will not work and am not sure how to use the CASE in this situation as even that can not solve this issue.
    Dont want to make the last AND clause dynamic
    Please suggest me how to do this.
    Thanks,
    Aashish
    Edited by: Aashish S. on Oct 21, 2011 6:01 PM

    A third alternative would be to choose a suitably large value as a high end for the 91+ group and use something like:
    age between to_number(CASE WHEN instr(:param, '+') = 0
                                  THEN substr(:param, 1, instr(:param, '-') -1)
                                  ELSE substr(:param, 1, instr(:param, '+') -1) end) and
                to_number(CASE WHEN instr(:param, '+') = 0
                               THEN substr(:param, instr(:param, '-') +1)
                               ELSE '9999' END)John

  • How to use decode function in oracle apex 3.2.1

    Hello Friends,
    how to use decode
    var_decode := 'decode'||'('|| var1 ||','|| -800000000000000||','||'.A'||','||
    appreciate your help.
    regards/kumar
    Edited by: kumar73 on Apr 23, 2010 12:25 PM
    Edited by: kumar73 on Apr 23, 2010 12:27 PM

    Hey just on this particular point, there's a handy PL/SQL method for escaping quotation characters which may reduce the complexity of the string.
    For example, if I had a string:
    I can't understand why quoting my 'quote' characters never seems to "work"!and I wanted to pass that into a variable, I could do this:
    vc_foo:= 'I can''t understand why my ''quote'' characters never seems to "work"!';or I could use the q function, whereby you enclose your string within a quote delimiter of your choice, like so:
    vc_foo:= q'^I can't understand why quoting my 'quote' characters never seems to "work"!^';
    note: I used the caret (^) character by convention but any valid character will do
    ...all of which leaves your original string more or less unadulterated.
    I find this particularly useful for generating dynamic SQL and dynamic PL/SQL, as it leave the query looking a tad more readable, although if you are chaining together multiple strings with double-pipes, it can make it a little muddier. I find it particularly useful if I'm going to deal with string data from, for example, a field with Irish-derived surnames such as "O'Reilly"...
    Give it a go!

  • How to use decode concept in htp.p?

    Hi All,
    How to use decode function in htp.p syntax?
    Thanks,
    Anoo..

    Hi,
    Could you please give more details on what you like to achieve? Decode function works only in sql query.
    You can first do sql query, and then do htp.p.
    Or you can use PL/SQL IF or CASE statements.
    You can also create custom decode function if you need.
    Regards,
    Oleg

  • How to use XVID MEPG4 DECODER in labview

    May i ask how to use Xvid MEPG4 Decoder to compress the AVI file. For this decoder have been installed in my computer but the VI(IMAQ AVI2 Get Codec Names)can not list this code name. So may i ask how can i use this decoder in the labview. For this decoder is relatively has good quality and also small size. Or what kind of other solution can be provieded for the relative small size of AVI file.
    Thanks
    Daniel

    I believe this was answered already in a different thread:  http://forums.ni.com/t5/LabVIEW/LabView-to-grab-and-save-video-to-mpeg/m-p/643864
    www.movimed.com - Custom Imaging Solutions

  • How to use DECODE function in Exspression?

    Hi,
    Can we use DECODE in Expression?
    I'm trying to use DECODE function but there is an error during the validation. But when i validate the mapping, it is successfully compiled but it is failed during deployment.
    But if I use CASE instead of DECODE, it works fine.
    Can we use DECODE in OWB???
    Thanks
    Raj

    Hi,
    In OWB 10gR2, if your are using only one DECODE in an expression, it's working. The package will compile when deploying the mapping. OWB will replace the DECODE by a CASE.
    But when you are using nested decode in an expression ( for example : decode(col1, 1, 'M', decode(col2, 'Madame', 'Mme', null)) ) only the first one is replaced by a case at deployment.
    In ROW_BASED mode, text of the expression is used outside of an sql statement and deployment will fails with "PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL statement only."
    If operating mode for the mapping is set to SET_BASED, it's working because the expression is used in an sql statement.
    I have logged a SR in metalink for this issue and a bug is opened (bug 5414112).
    But I agree with you, it's better to use case statement.
    Bernard

  • How to use same DFF for two different forms with :BLOCK.field reference

    Hi,
    Can anyone suggest how to use the same dff in two different forms by using :BLOCK.field reference.
    Scenario is the same DFF is referenced by two forms, viz. Form-1 & Form-2.
    Form-1 Reference Field is :BLOCK.field name, but the same block is not available in Form-2, which throws an error while opening it.
    Any pointers please.
    Thanks,

    In the environment I currently have access to do not have similar setup.
    Let say you setup the DFF1 default value to $HEADER.customer_name, the name of the DFF is CUSTOMER_NAME, description can be anything.
    In DFF2, default value should be a SQL, where you can reference the DFF1. For example, SELECT DECODE($FLEX.CUSTOMER_NAME, 'ABC', 1, 'DEF', 2, NULL) FROM dual
    In this case, you can reference the DFF1.

  • How to use the Dynamic Expression in BRFplus

    Hi Experts
                   I am new to BRFplus. Can you give any document on BRFplus how to use the Dynamic Expression.
    Thankyou
    Venkat

    OK I tried it and worked but for one condition:
    WHERE DECODE (E.qualification_sid, 1104,
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    But how to put two conditions for the same Expression:
    WHERE DECODE ((E.qualification_sid, 1104) AND (E.RANK_SID, 8),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
         (TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
         BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
    The previous code gives me this error: missing right parenthesis

  • How to use MS GSM support in JMF?

    Hello,
    Anyone has idea how to use the MS GSM encoding and decoding support in JMF.
    As Microsoft GSM is different from the standard GSM 6.10, however, JMF can both read and write MS-GSM coded file (in .wav wrapper). Here I would like to know whether it is possible to have real-time encoding and decoding in MS GSM format?
    This is very important for me as I need to use PocketPC for live audio streaming and it only support microsoft GSM coding.
    Thanks in advance
    /h.b.

    Hello,
    Did you (hotbee) eventually solved your problem ?
    I'm writing an application which listens to a GSM 06.10 audio stream from a multicast socket.
    The application that sends the audio is written in C++ and I don't manage to find the correct parameters for JMF to be able to decode it...
    Here is the C++ code that encodes the audio :
    m_WaveFormatEx.wfx.wFormatTag = WAVE_FORMAT_GSM610;
    m_WaveFormatEx.wfx.nChannels = 1;
    m_WaveFormatEx.wfx.nSamplesPerSec = 9920;
    m_WaveFormatEx.wfx.nBlockAlign = 65;
    m_WaveFormatEx.wfx.wBitsPerSample = 0;
    m_WaveFormatEx.wfx.cbSize = 2;
    m_WaveFormatEx.wSamplesPerBlock = 320;
    m_WaveFormatEx.wfx.nAvgBytesPerSec = (m_WaveFormatEx.wfx.nSamplesPerSec / 320) * 65; Is JMF (Windows performance pack) able to decode this ?
    If so, what is the AudioFormat I should return from my custom SourceStream ?
    I tried quite a lot of parameters (GSM, GSM_MS with various combination of parameters), but couldn't get an audible sound... :(
    Thanks for any help !
    Julien

  • How to  use data function using characterstics variable for calculation on

    how to  use data function using characterstics variable for calculation on  attribute as key figure

    Hi Gayatri
    Did you not see my answer for CASE because CASE does indeed offer the use of the BETWEEN clause, but DECODE does not. Let me give you a little synopsis of DECODE.
    In its most simple form it takes 4 values and looks like this: DECODE(A, B, C, D)
    This essentially means, IF A = B THEN C ELSE D
    The trick to solving BETWEEN in a DECODE is to work out algoriths where A = B. Because we don't know how many values are between 00 and 99, although I could guess there were 100 we could of course have 100 parts in the DECODE but that would be awful. How about if we look at it another way and say this:
    IF PART_NUMBER < 'SDK00' THEN pay_amount
    ELSE IF PART_NUMBER > 'SDK99' THEN pay_AMOUNT
    ELSE pay_amount + 100
    This statement only had 2 hard coded values, but how to make DECODE work with less than? Easy, we use the LEAST function. The LEAST function takes 2 values and returns the one with the lowest value. So I use LEAST(PART_NUMBER, 'SDK00') then whenever the PART_NUMBER is lower than SDK00 it will be true. A similar situation exists for the opposite function GREATEST. Putting all of this together then, you can do this:
    DECODE(PART_NUMBER, GREATEST(PART_NUMBER, 'SDK00'), DECODE(PART_NUMBER, LEAST(PART_NUMBER, 'SDK99'), PAY_AMOUNT * 100, PAY_AMOUNT), PAY_AMOUNT)
    In English this can be read as follows:
    IF the PART_NUMBER is greater than or equal to SDK00 and the PART_NUMBER is less than or equal to SDK99 THEN PAY_AMOUNT x 100 ELSE 0
    Best wishes
    Michael

  • How to use complex function as condition in Oracle Rule Decision Table?

    How to use complex function as condition in Oracle Rule Decision Table?
    We want to compare an incoming date range with the date defined in the rules. This date comparison is based on the input date in the fact & the date as defined for each rule. Can this be done in a decision table?

    I see a couple of problems here.
    First, what you posted below is not a syntactically valid query. It seems to be part of a larger query, specifically, this looks to be only the GROUP BY clause of a query.
    Prabu ammaiappan wrote:
    Hi,
    I Have a group function in the Query. Below is the Query i have used it,
    GROUP BY S.FREIGHTCLASS,
    R.CONTAINERKEY,
    S.SKU,
    S.DESCR ||S.DESCRIPTION2,
    S.PVTYPE,
    RD.LOTTABLE06,
    R.WAREHOUSEREFERENCE,
    RD.TOLOC,
    R.ADDWHO,
    R.TYPE,
    S.CWFLAG,
    S.STDNETWGT,
    S.ORDERUOM,
    R.ADDDATE,
    C.DESCRIPTION,
    (CASE WHEN P.POKEY LIKE '%PUR%' THEN 'NULL' ELSE to_char(P.PODATE,'dd/mm/yyyy') END),
    NVL((CASE WHEN R.ADDWHO='BOOMI' THEN RDD.SUPPLIERNAME END),SS.COMPANY),
    RDD.BRAND,
    S.NAPA,
    RD.RECEIPTKEY,
    R.SUSR4,
    P.POKEY,
    RDD.SUSR1,
    r.STATUS, DECODE(RDD.SUSR2,' ',0,'',0,RDD.SUSR2),
    rd.SUSR3Second, the answer to your primary question, "How do I add a predicate with with a MAX() function to my where clause?" is that you don't. As you discovered, if you attempt to do so, you'll find it doesn't work. If you stop and think about how SQL is processed, it should make sense to you why the SQL is not valid.
    If you want to apply a filter condition such as:
    trunc(max(RD.DATERECEIVED)) BETWEEN TO_DATE('01/08/2011','DD/MM/YYYY') AND TO_DATE('01/08/2011','DD/MM/YYYY')you should do it in a HAVING clause, not a where clause:
    select ....
      from ....
    where ....
    group by ....
    having max(some_date) between this_date and that_date;Hope that helps,
    -Mark

  • How to use File Adapter Receiver to write attachments

    Hi,
    i have a scenario, in which our own XInotes adapter sends an XIMessage from an IBM Lotus Notes database into XI. This XIMessage contains an XML document as application main document and several PDF files as additional attachments 
    On the receiver side, i must use a File Adapter to write both the XML documents and the PDF attachments into a directory.
    The problem is i don't know how to use the file adapter receiver to write the attachments. In the Channel Monitoring, i can see that all PDF files are transferred to the file receiver. But the file adapter writes only the XML document into the directory.
    I've also tried the AF_Modules/PayloadSwapBean, but it can only swap one PDF file into the application payload. And the file name must be hard coded in the module configuration as swap.KeyName.
    Could anyone give me any ideas?
    thanks a lot in advance
    Xiang

    hi,
    receiver file adapters do not supprt attachments.
    Only File Sender adapter is capable of handling attachments not the receiver.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm
    Configuring the sender FILE adapter
    The sender file adapter is configured to pick the normal payload (file1.xml), which is specified in the File
    access parameters, and the additional image file (file1.jpg) that is to be sent as an attachment is configured
    under the Additional File(s) as shown in the screenshot below. The file type would still remain binary.
    Since, by default, XI sends payload and attachments in XML format, we need to call two beans, namely the
    MessageTransformBean and the PayloadSwapBean to help us is transforming the content to jpeg format
    and also change the file extension.
    The PayloadSwapBean module is used to replace the application payload of the XI message that holds the
    data with another payload which is appended to the message as an attachment. In our case, the payload
    would be file1.xml whereas the attachment would be file1.jpg
    The swap module is denoted in our scenario with the module key ‘swap’. It has two parameters from the
    MIME header.
    regards,
    pradeep.

  • (Urgent)help: how to use sdk add a gif image into a pdf document

    I had use sdk plus-in add a new button of mine,if I click the button,a gif image will be inserted into the current page of pdf document
    My questions:
    one : When I clicked the button,there was a warnning box said:the image has not enough data.I don't known why?
    two : How can I be sure the position of the image which I inserted? and how to change it's position?
    three:  how to use sdk get the content of the document?

    hi Leonard:
    I do it like you said, but
    Why my image can not display in the pdf.
    code is:
    //====================================================================
    const ASInt32 theImageByteSize = IMG_WIDTH * IMG_HEIGHT;
    char* buff = new char[theImageByteSize];
    PDEImage volatile pdeImage = NULL;
    PDEImageAttrs pdeImageAttrs;
    PDEColorSpace pdeColorSpace;
    ASFixedMatrix imageMatrix;
    memset(&pdeImageAttrs, 0, sizeof(PDEImageAttrs));
    int hdl = _open(ImagePath, _O_RDONLY | _O_BINARY, _S_IWRITE | _S_IREAD);
    if (hdl == -1)
         AVAlertNote("[%s] create fail !!!!") ;
    if (_read(hdl, buff, theImageByteSize) == -1)
         AVAlertNote("read image fail!") ;
    pdeImageAttrs.width = IMG_WIDTH;
    pdeImageAttrs.height = IMG_HEIGHT;
    pdeImageAttrs.intent = ASAtomNull;
    pdeImageAttrs.bitsPerComponent = 8;
    pdeImageAttrs.flags = kPDEImageExternal | kPDEImageIsIndexed;
    pdeImageAttrs.decode[0] = fixedZero;
    pdeImageAttrs.decode[1] = fixedOne;
    pdeImageAttrs.decode[2] = fixedZero;
    pdeImageAttrs.decode[3] = fixedOne;
    pdeImageAttrs.decode[4] = fixedZero;
    pdeImageAttrs.decode[5] = fixedOne;
    ASFixedRect theMediaBox;
    PDPageGetMediaBox( AVPageViewGetPage(pageView), &theMediaBox );
    ASFixed theFixedWidth = (theMediaBox.right - theMediaBox.left);
    ASFixed theFixedHeight = (theMediaBox.top - theMediaBox.bottom);
    imageMatrix.a = ASInt16ToFixed(theFixedWidth);
    imageMatrix.d = ASInt16ToFixed(theFixedHeight);
    imageMatrix.b = imageMatrix.c = fixedZero;
    imageMatrix.h = 0;
    imageMatrix.v = 0;
    const Int32 cPaletteColors = 256;
    PDEIndexedColorData theIndexedData;
    theIndexedData.size = sizeof(theIndexedData);
    theIndexedData.baseCs = PDEColorSpaceCreateFromName(ASAtomFromString( "DeviceRGB"));
    theIndexedData.hival = cPaletteColors - 1;
    unsigned char data[3] = {255, 0, 0};
    theIndexedData.lookup = (char *)data;
    theIndexedData.lookupLen = cPaletteColors * 3;
    PDEColorSpaceStruct theColorData;
    theColorData.indexed = &theIndexedData;
    pdeColorSpace = PDEColorSpaceCreate(ASAtomFromString( "Indexed" ), &theColorData );
    pdeImage = PDEImageCreate(&pdeImageAttrs, sizeof(pdeImageAttrs), &imageMatrix,
                                                0, pdeColorSpace, NULL, NULL, NULL, (unsigned char*)buff, theImageByteSize);
    I want die, I had done this for so many days, My GIF doesn't insert into pdf,
    unsigned char data[3] = {255, 0, 0};
    theIndexedData.lookup = (char *)data;  "
    whether the data set wrong?
    I confused what I do next   

  • How to use %  Symbol for parameters in conditions in Discoverer

    Hi All,
    Actually I should add four parameters in that
    two param's should be given %(means to select all) as default value.
    ie as we use LIKE '%' in Query.
    the problem is when I enter a value for a parameter, it should result me for that particular value,
    and if I need all, I should enter % symbol,
    so for this Iam confused How to use this,
    even I tried with some options, it is not getting satisfactory results.
    will any one please help me in reaching this.
    Thank's in Advance
    Edited by: user10271105 on Sep 17, 2008 3:37 AM

    Hi,
    You can create a parameter and give % as the default value. If you set the condition to use LIKE then when the default value is used for the parameter then the query contains LIKE '%' and everything is selected.
    If you are using a List of Values with your parameter then you must add the '%' to your list of values so that the user can select this value.
    However, this method will not work if some of the values in your database contain percent characters, because the condition LIKE 'ABC%DEF' will return ABCXYZDEF as well as ABC%DEF.
    Unfortunately the like escape syntax is not available in Discoverer so you have to invent an value that the user can enter for all, e.g. ALL and set this as the default for the parameter.
    Then use a condition similar to:
    item LIKE :param OR item = DECODE(:param,'*ALL*', item)
    Rod West

Maybe you are looking for