How copy part of the array buffer from ColorFrame

I want copy part of the color frame When I receive it.
Is there way to do that without copy all the byte array first? (+ example)
(Question similar to Kinect 1,
but for kinect 2)

if you access the raw data you can set offsets based not he width/height of the color frame(y*width+x). The c++ and managed api provide that as a function of the frame. These api's are used in some of the samples so review the code if you are
unsure of the api use:
c++ AccessRawUnderlyingBuffer
https://msdn.microsoft.com/en-us/library/microsoft.kinect.kinect.icolorframe.accessrawunderlyingbuffer.aspx
.Net c# - LockRawImageBuffer
https://msdn.microsoft.com/en-us/library/windowspreview.kinect.colorframe.lockrawimagebuffer.aspx
Carmine Sirignano - MSFT

Similar Messages

  • How can I copy and paste the art work from album covers?

    How can I copy and paste the art work from album covers?

    I don't think the list style transfers. Copy and paste the text in to Mail, select it and then choose "Insert Numbered List" as a work around.

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How can I get the "text" field from the actionEvent.getSource() ?

    I have some sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.ArrayList;
    public class JFrameTester{
         public static void main( String[] args ) {
              JFrame f = new JFrame("JFrame");
              f.setSize( 500, 500 );
              ArrayList < JButton > buttonsArr = new ArrayList < JButton > ();
              buttonsArr.add( new JButton( "first" ) );
              buttonsArr.add( new JButton( "second" ) );
              buttonsArr.add( new JButton( "third" ) );
              MyListener myListener = new MyListener();
              ( (JButton) buttonsArr.get( 0 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 1 ) ).addActionListener( myListener );
              ( (JButton) buttonsArr.get( 2 ) ).addActionListener( myListener );
              JPanel panel = new JPanel();
              panel.add( buttonsArr.get( 0 ) );
              panel.add( buttonsArr.get( 1 ) );
              panel.add( buttonsArr.get( 2 ) );
              f.getContentPane().add( BorderLayout.CENTER, panel );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.setVisible( true );
         public static class MyListener  implements ActionListener{
              public MyListener() {}
              public void actionPerformed( ActionEvent e ) {
                   System.out.println( "hi!! " + e.getSource() );
                   // I need to know a title of the button (which was clicked)...
    }The output of the code is something like this:
    hi! javax.swing.JButton[,140,5,60x25,alignmentX=0.0,alignmentY=0.5,
    border=javax.swing.plaf.BorderUIResource$CompoundBorderUIResource@1ebcda2d,
    flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,
    disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=2,left=14,bottom=2,
    right=14],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,
    rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=first,defaultCapable=true]
    I need this: "first" (from this part: "text=first" of the output above).
    Does anyone know how can I get the "text" field from the e.getSource() ?

    System.out.println( "hi!! " + ( (JButton) e.getSource() ).getText() );I think the problem is solved..If your need is to know the text of the button, yes.
    In a real-world application, no.
    In a RW application, a typical need is merely to know the "logical role" of the button (i.e., the button that validates the form, regardless of whether its text is "OK" or "Save", "Go",...). Text tends to vary much more than the structure of the UI over time.
    In this case you can get the source's name (+getName()+), which will be the name that you've set to the button at UI construction time. Or you can compare the source for equality with either button ( +if evt.getSource()==okButton) {...}+ ).
    All in all, I think the best solution is: don't use the same ActionListener for more than one action (+i.e.+ don't add the same ActionListener to all your buttons, which leads to a big if-then-else series in your actionPerformed() ).
    Eventually, if you're listening to a single button's actions, whose text change over time (e.g. "pause"/"resume" in a VCR bar), I still think it's a bad idea to rely on the text of the button - instead, this text corresponds to a logical state (resp. playing/paused), it is more maintainable to base your logic on the state - which is more resilient to the evolutions of the UI (e.g. if you happen to use 2 toggle buttons instead of one single play/pause button).

  • How can I remove the moon phases from iCal?

    I need to remove ALL the moon phases that appear in iCal 5.0.3. Every time iCloud updates it sends 6 to 10 moon events to my MacBook Pro. Going forward 3 0r 4 months, there are too many moon phases. How can I remove the moon phases from iCal?
    I am on a MacBook Pro 2.2 with 4 GB using Mountain Lion 10.7.5.

    Try:
    items.RemoveAll(s => string.IsNullOrEmpty(s));
    Or you can filter them out using where:
    var noEmptyStrings = items.Where(s => !string.IsNullOrEmpty(s));
    Having fun with custom collections!
    Basics of .NET Collections in C#
    How does it work in C#? - Part 3 (C# LINQ in detail)
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • How can i remove the shell case from cath kidston?

    Hi how can i remove the shell case from cath kidston

    Try:
    items.RemoveAll(s => string.IsNullOrEmpty(s));
    Or you can filter them out using where:
    var noEmptyStrings = items.Where(s => !string.IsNullOrEmpty(s));
    Having fun with custom collections!
    Basics of .NET Collections in C#
    How does it work in C#? - Part 3 (C# LINQ in detail)
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • How can I remove the Demo Viewer from my MacBook?

    How can I remove the Demo Viewer from my MacBook?

    Drag it to the Trash.
    Uninstalling Software: The Basics
    Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash.  Applications may create preference files that are stored in the /Home/Library/Preferences/ folder.  Although they do nothing once you delete the associated application, they do take up some disk space.  If you want you can look for them in the above location and delete them, too.
    Some applications may install an uninstaller program that can be used to remove the application.  In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
    Some applications may install components in the /Home/Library/Applications Support/ folder.  You can also check there to see if the application has created a folder.  You can also delete the folder that's in the Applications Support folder.  Again, they don't do anything but take up disk space once the application is trashed.
    Some applications may install a startupitem or a Log In item.  Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder.  Log In Items are set in the Accounts preferences.  Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab.  Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
    Some software use startup daemons or agents that are a new feature of the OS.  Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
    If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term.  Unfortunately Spotlight will not look in certain folders by default.  You can modify Spotlight's behavior or use a third-party search utility, EasyFind, instead.
    Some applications install a receipt in the /Library/Receipts/ folder.  Usually with the same name as the program or the developer.  The item generally has a ".pkg" extension.  Be sure you also delete this item as some programs use it to determine if it's already installed.
    There are many utilities that can uninstall applications.  Here is a selection:
        1. AppZapper
        2. AppDelete
        3. Automaton
        4. Hazel
        5. AppCleaner
        6. CleanApp
        7. iTrash
        8. Amnesia
        9. Uninstaller
      10. Spring Cleaning
    For more information visit The XLab FAQs and read the FAQ on removing software.

  • How can i remove the empty sting from IList collection?

    How can i remove the empty sting from IList collection. If i use the code i got  System.NotSupportedException was unhandled exception. How can i achive this?
    IList record = (IList)records;
    int count = record.Count;
    for (int i = 0; i < count;i++)
    bool contains = record[i].Equals("");
    if (contains)
    record.Remove(record[i]);
    Is anyone know, please suggest me.
    Thanks in Advance!

    Try:
    items.RemoveAll(s => string.IsNullOrEmpty(s));
    Or you can filter them out using where:
    var noEmptyStrings = items.Where(s => !string.IsNullOrEmpty(s));
    Having fun with custom collections!
    Basics of .NET Collections in C#
    How does it work in C#? - Part 3 (C# LINQ in detail)
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • HT201269 My computer crashed and had to be restored to factory settings. My ipad has my ituned library. how do i get the music collection from the ipad to the computer?

    my computer crashed and had to be restored to factory settings losing ituness collection of music. My ipad has my itunes library. how do i get the music collection from the ipad to the computer?

    You should be able to copy iTunes purchases over to your computer's iTunes via File > Devices > Transfer Purchases. For music from other sources (e.g. copied from CDs) you will need a third-party program to copy them back from your iPad - there are some listed half-way down this page which should work : https://discussions.apple.com/docs/DOC-3991

  • How can I reinsert the deleted audio from clips in my sequence?

    How can I reinsert the deleted audio from clips in my sequence?

    I can tell you a work around to get you going in the meantime, just may be time consuming if you have a lot of clips in the timeline.
    double click a clip missing audio
    press the go to in point and copy the timecode to notepad
    press the go to end point and copy timecode
    right click clip, and reveal in project
    double click the original in project
    paste in timecode and set in & out points again
    drag audio
    As I said not the quickest way, but it works, and won't actually take as long as you'd think, 30 secs or so per clip, i just hope you don't have over 100 clips without audio
    Troy

  • HT1202 My home computer has died. How can I transfer the music/ photos from my ipod classic to another computer

    My home computer has died. How can I transfer the music/ photos from my ipod classic to another computer

    See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
    https://discussions.apple.com/thread/2452022?start=0&tstart=0
    B-rock

  • HT4913 How do you download the entire library from match to a new computer?

    How do you download the entire library from iTunes Match to a new computer?

    Download each song individually.
    Or the faster method is to COPY the ENTIRE iTunes folder from the old computer or the backup of the old computer to the new computer.

  • How can I dispaly the FML buffer to validate my .tbl files

    Having sporadic problems with custom FML files in our .tbl files. Sometimes they
    work and sometimes get an error: "FML Field Not Found". How can I display the fml
    buffer that tuxedo thinks it's generated from the .tbl files?
    I've been through all the tmadmin commands and can't find anything appropriate.
    Thanks.

    Colin,
    I don't really understand your question here... Tuxedo doesn't generate FML
    buffers by itself, application code does that. That's why tmadmin has no
    concept of "dispaying an FML buffer" - which buffer? In which context?
    What exactly is going on in your application when you are seeing a problem?
    What leads you to think that the field tables are at fault?
    Regards,
    Peter.
    Colin McNulty wrote:
    Having sporadic problems with custom FML files in our .tbl files. Sometimes they
    work and sometimes get an error: "FML Field Not Found". How can I display the fml
    buffer that tuxedo thinks it's generated from the .tbl files?
    I've been through all the tmadmin commands and can't find anything appropriate.
    Thanks.

  • How can we remove the following zeros from quantity field ?

    Hi All.
    how can we remove the following zeros from quantity field while populating ALV by using FM REUSE_ALV_GRID_DISPLAY ?
    eg:getting output zqty = 2.000
    but i need           zqty = 2.
    help me to reslove this issue.
    Regards.
    jay

    Hi,
      While populating the field catlog do the following thing to   avoid zeros.
      wa_fieldcat-tabname = 'I_OUTPUT'.    " Curr
      wa_fieldcat-fieldname = 'FWAER'.
      wa_fieldcat-seltext_l = text-023.
      wa_fieldcat-no_zero = 'X'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR  wa_fieldcat.
    Thanks,
    Khushbu.

  • I've a new account on iMac.  When composing an email the contact list does not show up on the bar.  WWhen I start keying in a name, it comes up with the address.  How do I engage the  contact list from the email?

    I've a new account on iMac.  When composing an email the contact list does not show up on the bar, which would allow me to select the persons I want to include on the distribution of the email.  When I start keying in a name in the email, it comes up with the person's address, which shows it is synced.  How do I engage the contact list from the email like I do on my old account (where a contact list icon shows up, along with the "attach" and other icons) ?

    With the New Message window open, go to the View menu and select "Customize Toolbar...".
    In the screen that opens, drag the item labelled "Address" into the Toolbar area of the New Message window, then click the "Done" button.
    That item should be then added to the Toolbar for the New Message window.
    Note that the main Mail window and the New Message window (as well as the separate message window if you open a message that way) use different toolbars - the settings/inclusions for one do not carry over to another.

Maybe you are looking for

  • Displaying custom drawn panels in a panel with FlowLayout vs GridLayout

    I am having trouble to display my custom panels(on which I have drawn) in another panel with FlowLayout. When I use this layout only a small part of their top-left corner appears, when using the GridLayout they are displayed as should, all. Why is th

  • Unable to open PDF files with acroread

    Hi, We have a solaris 9 server with acroread installed on the server. When I log in to the server with any local user (root or any other user) I'm able to open the PDF files which are locally on the server as well the PDF files which are on NFS Share

  • Youtube Comment Typing Lag, Help Please.

    Ok so this problem seems to only be happening on firefox, ( I tried google chrome and it was working fine ). I'll try to comment on a video and i type fast, and it takes forever for the characters i type to show up, can someone help me please, thanks

  • How to add music files from other hard drives

    how to add music files from other external hard drives??

  • Cursor movement in JTable

    Hi i have a JTable and it is populated with some values from database. for example if the data is as follows mahesh ramesh rakesh suresh ravi amar naturally the first row will be highlighted with some color. the requirement is when i type a key on ke