Пример #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            SARI sARI = await db.Sariler.FindAsync(id);

            db.Sariler.Remove(sARI);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        // AssetDatabase.ImportPackage("/packages/UnityToolkit",false);

        #region Instantiate HandData and DepthData
        if (WithDepth)
        {
            DepthData = new HumanRobotInteraction.DepthData(); // Configure and setting of the getting of the depth data
        }

        HandsData = new HandsData(MaxHands, MaxJoints); // Configure and setting of the getting of the hand data
        #endregion

        #region Instantiate the SARI Algorithm
        /* Instantiation of the SARI and initializing the filters */
        for (int i = 0; i < MaxHands; i++)
        {
            Sari[i] = new SARI(MaxJoints);
            Sari[i].InitializeFilter();
        }
        SariPlane = new SARI();
        #endregion

        #region Instatiate the visualization
        for (int i = 0; i < MaxHands; i++)
        {
            VisPredicted[i] = new Visualization("Hand Predicted " + (i + 1).ToString(), MaxJoints, new Color(0, 0, 1), new Color(0, 0, 1), new Color(0, 0, 1), new Color(0.47f, 0.108f, 0.221f));
            VisFiltered[i]  = new Visualization("Hand Filtered " + (i + 1).ToString(), MaxJoints, new Color(0.65f, 0.22f, 0f), new Color(0.9f, 0.62f, 0.43f), new Color(0.65f, 0.22f, 0f), new Color(1, 0, 0));
            VisRaw[i]       = new Visualization("Hand Raw " + (i + 1).ToString(), MaxJoints, new Color(0.65f, 0.22f, 0f), new Color(0.9f, 0.62f, 0.43f), new Color(0.65f, 0.22f, 0f), new Color(1, 0, 0));
        }

        VisPlane = new Visualization("Plane");

        #endregion

        #region Prepare arrays for coordinates
        /* Declaration of the array for the hand data*/
        for (int i = 0; i < MaxHands; i++)
        {
            RawCoord[i]       = new HandCoord(6, MaxJoints);
            FilteredCoord[i]  = new HandCoord(6, MaxJoints);
            PredictedCoord[i] = new HandCoord(6, MaxJoints);
        }
        for (int i = 0; i < 10000; i++)
        {
            for (int j = 0; j < 3; j++)
            {
                RecordedData[j, i] = new HandCoord(6, MaxJoints);
            }
            if (i < 200)
            {
                CalibrationData[i] = new HandCoord(6, MaxJoints);
            }
        }
        #endregion
    }
Пример #3
0
        public async Task <ActionResult> Edit([Bind(Include = "ID,GID,SOZCUK,CUMLE1,CUMLE2,CUMLE3,OTAR,GTAR")] SARI sARI)
        {
            if (ModelState.IsValid)
            {
                db.Entry(sARI).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.GID = new SelectList(db.Kelimeler, "ID", "SARI", sARI.GID);
            return(View(sARI));
        }
Пример #4
0
        // GET: SARI/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SARI sARI = await db.Sariler.FindAsync(id);

            if (sARI == null)
            {
                return(HttpNotFound());
            }
            return(View(sARI));
        }
Пример #5
0
        // GET: SARI/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SARI sARI = await db.Sariler.FindAsync(id);

            if (sARI == null)
            {
                return(HttpNotFound());
            }
            ViewBag.GID = new SelectList(db.Kelimeler, "ID", "SARI", sARI.GID);
            return(View(sARI));
        }