Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6766467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:50:04+00:00 2026-05-26T14:50:04+00:00

I am working with Kinect and am trying to take in depth data and

  • 0

I am working with Kinect and am trying to take in depth data and process it.

Essentially, when I process depth frames from the Kinect I want to save 2- the front depth data of a player and the back. I then need to flip round the back data so that it can then be used to build a 3D model of the player.

The problems I am having is flipping this back data around.

I have the depth data in the form of of a 1D array of length (320*240 = 76800) for which I was planing to flip each row (320 positions in the array) to reverse the image.

let mutable flipped = Array.create (320*240) 0
for y=0 to 239 do
    for x=0 to 319 do
        let n = ((y)* 320 + x)
        flipped.[n] <- depths.[(320*(y+1))-(n+1)]

System.Diagnostics.Debug.WriteLine("DepthsMax:" + Array.max(depths).ToString())
System.Diagnostics.Debug.WriteLine("FlippedMax:" + Array.max(flipped).ToString())

The depths array contains the data I am trying to flip round, however, this code makes the flipped array consist entirely of 0s.

Can anyone spot what I am doing wrong?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:50:04+00:00Added an answer on May 26, 2026 at 2:50 pm

    First of all, note that you don’t need for flipped to be mutable since you never reassign it (you only modify it).

    On to the problem itself. Given n = 320*y + x, you are looking at index:

    320 * (y+1) - n - 1
    = 320 * y + 320 - (320 * y + x) - 1
    = 319 - x
    

    Thus, you’re only ever accessing data from the first row. You want to be accessing index y*320 + (319-x) or 320*(y+1) - (x+1), not 320*(y+1) - (n+1).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on calling a C function from my asm project. I'm trying to push
Working through C++ Primer Plus and am trying to cin data to a dynamically
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
I am working on a 3D model reconstruction application with Kinect sensor. I use
Working on an old Kohana 2 project and I want to link two models.
Working on rewriting the front-end of my site in Coffeescript. I understand how to
I just started learning about Kinect through some quick start videos and was trying
I'm working with NITE/OPENNI and opencv in xcode 4 to work with the kinect.
Working with stl:list and stl::vector types under interrupt handlers I want to avoid malloc()
Just downloaded the new Kinect SDK Beta from Microsoft and am really excited to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.