tag:blogger.com,1999:blog-5723396229922797462.post4555435969337370401..comments2023-05-15T09:06:24.855-07:00Comments on Computer Vision for Fun: Creating OpenNI '.oni' files from OpenCV/Jpeg ImagesTayyab Naseerhttp://www.blogger.com/profile/11285265024683890051noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-5723396229922797462.post-13640430376186281452017-11-27T23:20:06.714-08:002017-11-27T23:20:06.714-08:00how to convert .xed files into .bin or avi files?how to convert .xed files into .bin or avi files?Anonymoushttps://www.blogger.com/profile/07238395664789665035noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-86098299169682660502016-09-11T12:06:21.350-07:002016-09-11T12:06:21.350-07:00I am programming in C++ and have been able to save...I am programming in C++ and have been able to save a .oni depth file for testing purposes using OpenNI2.<br /><br />I am now however unable to load this .ONI file back into a program to use. My code used is as follows:<br /><br /> <br /><br />Status rc_ = openni::STATUS_OK;<br /><br />Device device_;<br /><br />rc_ = OpenNI::initialize();<br /><br />char* fileaddress = "C:\\Users\\James\\DepthRecording1.oni";<br /><br />rc_ = device_.open(fileaddress);<br /><br /> <br /><br />After the .open line has been executed, rc_ has the following status : STATUS_NO_DEVICE.<br /><br />This is however the method of loading files as specified in the OpenNI2 documentation, and this code is proven to work if file address is switch for "openni::ANY_DEVICE", in which case it loads my 3D camera (Orbbec Astra).<br /><br />Does anyone know what needs to be changed/ added in order to be able to load the file?Anonymoushttps://www.blogger.com/profile/08905111207375388381noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-38195262806769733102014-01-06T08:16:01.479-08:002014-01-06T08:16:01.479-08:00Hi Tayyab,
I am totally new to this openni and ha...Hi Tayyab,<br /><br />I am totally new to this openni and has little computing background knowledge so I sincerely hope you can assist me on this.<br /><br />Basically I have been trying to capture images using the niviewer under openni. However, I do not know how to save those images.<br /><br />I understand that you have been trying to explain on the processes but I don't really understand. Could I trouble you to provide a step by step explanation on doing so?<br /><br />Thanks <br />KelvinKelvinhttps://www.blogger.com/profile/02576323816178829961noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-20944358712125021402013-11-25T21:01:10.733-08:002013-11-25T21:01:10.733-08:00Do you know if there's a way to do the same (m...Do you know if there's a way to do the same (modify\create oni files) in OpenNI 2? Looks like NiRecordSynthetic sample is no longer available in 2.0.Alexanderhttps://www.blogger.com/profile/16092567371451747109noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-26324381579260461292013-11-19T02:00:10.426-08:002013-11-19T02:00:10.426-08:00Hi Tayyab,
first of all, thanks for the above cod...Hi Tayyab,<br /><br />first of all, thanks for the above code! It was very useful!<br /><br />Now, i have a small issue, converting image sequences to oni files:<br />I am opening a dummy oni file and i can create an outfile with my images, but only if the input sequence has fewer frames than the dummy file!!!!!<br />Using a huge dummy file is not a good solution, so i was wondering if you have any idea how to adjust the size of the file, or add extra frames at the end, or any other way it can be done!!!<br />Thank you in advance!Giorgoshttps://www.blogger.com/profile/12240700373960092514noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-41288300204076103672013-09-30T04:29:58.226-07:002013-09-30T04:29:58.226-07:00Hi Hai,
I guess it shouldn't be much of a prob...Hi Hai,<br />I guess it shouldn't be much of a problem. Please have a look at one of my other posts where one can use mock depth generator to run other utilities on the modified depth data or in your case just fill in the custom depth values and then saving them with ROS or otherwise. Basically one should be able to simulate the depth stream using these tools. Hope it helps.<br />http://tayyabnaseer.blogspot.de/2012/04/running-ros-openni-tracker-with.htmlTayyab Naseerhttps://www.blogger.com/profile/11285265024683890051noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-40011001073269688512013-09-17T18:24:26.436-07:002013-09-17T18:24:26.436-07:00Hi Tayyab,
I am a new user to OpenNI. I want to c...Hi Tayyab,<br /><br />I am a new user to OpenNI. I want to create a sequence of depth images and specify the depth for their pixels and convert it as a depth stream.In other words, I want to simulate a depth image, is there any way to do this?<br /><br />Thanks in advance!Anonymoushttps://www.blogger.com/profile/11886366896762911082noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-31679132047806921412013-05-28T03:28:38.453-07:002013-05-28T03:28:38.453-07:00Hi Rahim,
Have a look at the
pcl::ONIGrabber Clas...Hi Rahim,<br />Have a look at the <br />pcl::ONIGrabber Class of PCL<br />It has a member function "convertToXYZRGBAPointCloud" and takes in Depth and RGB image.<br /><br />Hope it helps.<br />Tayyab Naseerhttps://www.blogger.com/profile/11285265024683890051noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-31299845052636859952013-05-22T09:57:33.330-07:002013-05-22T09:57:33.330-07:00Hi Tayyab,
Is there any way to covert rgb and de...Hi Tayyab, <br /><br />Is there any way to covert rgb and depth image to .oni. Actually I want to covert the rgb and depth image to XYZRGBA point clod. do you have any suggestion?<br /><br />Thanks Rahimhttps://www.blogger.com/profile/02823073580906877386noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-27727089437955003602013-04-08T02:47:40.586-07:002013-04-08T02:47:40.586-07:00@haggag87 link to which project ?
If you are talki...@haggag87 link to which project ?<br />If you are talking about the project for this conversion, I haven't really put it online anywhere, might do it in future, btw this project would mainly contain the changes which i have defined in these excerpts :) . Tayyab Naseerhttps://www.blogger.com/profile/11285265024683890051noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-19574155639932283322013-03-29T05:48:46.640-07:002013-03-29T05:48:46.640-07:00Could you post a link to the project please?Could you post a link to the project please?haggag87https://www.blogger.com/profile/00233836688787189604noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-67988555941814371152013-01-20T04:07:30.753-08:002013-01-20T04:07:30.753-08:00Hi Shivani,
You can have a look at NiSimpleRead sa...Hi Shivani,<br />You can have a look at NiSimpleRead sample of Openni to read the .oni files. Once you have a frame in the original format you can convert it to Opencv format and then save them either as Video or save them to disk as single frames. For converting the frames to Opencv format you can use the same approach as mentioned in this post. <br />#Reference NiSimpleRead.cpp for help<br /> Tayyab Naseerhttps://www.blogger.com/profile/11285265024683890051noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-37433422951932439282013-01-10T01:05:34.313-08:002013-01-10T01:05:34.313-08:00Hey...I am working on openni for the first time. I...Hey...I am working on openni for the first time. I need some help, so I have this .oni file of depth images and I need to extract frames from this...how can I do this???shivanihttps://www.blogger.com/profile/00175702771908618627noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-13805172763182072402012-09-25T23:48:10.903-07:002012-09-25T23:48:10.903-07:00@Sue Yes the way it is defined here, it assumes th...@Sue Yes the way it is defined here, it assumes that streaming is from Openni program and when you get an image in the openni format, how to convert it to Opencv during runtime. XnRGB24Pixel is the data type for RGB pixels defined in Openni so if you are not using openni then it will give error.<br />To avoid openni you can use only opencv as well. The later versions of opencv provide the option of streaming depth/rgb images from kinect.You can try that.<br />Or you can use Matlab SDK for kinect as well. <br />Hope it helps .Tayyab Naseerhttps://www.blogger.com/profile/11285265024683890051noreply@blogger.comtag:blogger.com,1999:blog-5723396229922797462.post-76847583635319082822012-09-24T00:03:19.515-07:002012-09-24T00:03:19.515-07:00In order to convert .oni images to OpenCV images.....In order to convert .oni images to OpenCV images..do i need to have OpenNI?..or just openccv itself?..i have error at XnRGB24Pixel when running it in visual studio..can u help me on this?AnnSorayAhttps://www.blogger.com/profile/01480280570375050703noreply@blogger.com