Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Motion Detection in VC++

Motion Detection in VC++

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tyagineha
    wrote on last edited by
    #1

    hye, i m trying to record video on motion detection in VC++. Can anybody tell the exact procedure i should apply motion detection has started but i dnt know how to write code for recording the video on motion detection..... Neha

    B H 2 Replies Last reply
    0
    • T tyagineha

      hye, i m trying to record video on motion detection in VC++. Can anybody tell the exact procedure i should apply motion detection has started but i dnt know how to write code for recording the video on motion detection..... Neha

      B Offline
      B Offline
      bankai123
      wrote on last edited by
      #2

      There isn't a exact procedure to implementing motion detection. There are many algorithms for doing that, and searching the articles on this site anf google should bring up some results. Good luck

      T 1 Reply Last reply
      0
      • B bankai123

        There isn't a exact procedure to implementing motion detection. There are many algorithms for doing that, and searching the articles on this site anf google should bring up some results. Good luck

        T Offline
        T Offline
        tyagineha
        wrote on last edited by
        #3

        i have used following four functions for motion detection part only: 1)AdjustMotionDetectPrecision() 2)SetupMotionDetection() 3)StartMotionDetection() 4)MotionAnalyzer() using these four functions,motion detected has started. but i dnt knw how to start recording???? i m sending u some code : here it is:::: if(frameType > 0) { if(frameType == PktSysHeader) { memcpy(FileHeader[channelNum], DataBuf, Length); FileHeaderLen = Length; } if(frameType == PktIFrames || frameType ==PktSubIFrames) { status = 1; } else { status = 0; } if(frameType == PktMotionDetection) { int result[4]; if(bOverlayMode) { hkdlg->m_VideoWin.DrawVectEx(channelNum, (char *)DataBuf); } else { hkdlg->m_bMoving[channelNum] = TRUE; memcpy(motionData[channelNum],(char*)DataBuf,Length); } MotionAnalyzer(ChannelHandle[channelNum],(char*)DataBuf,15,result); if((result[0] + result[1] + result[2] + result[3])) { if (channelNum ==0) TRACE("!!!!!!!CH=%d motion detect result is %d %d %d %d\n",channelNum,result[0],\ result[1],result[2],result[3]); //The function Trigger() do the following operation: write the video&audio data which are before the motion frame to file if(!hkdlg->baftermotion[channelNum]) alarmFile[channelNum].Trigger(gFileHandle[channelNum]); //when the motion frame returns,clear ualreadywriteframes[channelNum] and set it as 0 ,be ready for writing the video&audio data after motion hkdlg->ualreadywriteframes[channelNum]=0; hkdlg->baftermotion[channelNum]=TRUE; } return 0; } if(frameType == PktOrigImage) { return 0; } In this code should i start recording after motionanalyser() function????????????? Neha

        1 Reply Last reply
        0
        • T tyagineha

          hye, i m trying to record video on motion detection in VC++. Can anybody tell the exact procedure i should apply motion detection has started but i dnt know how to write code for recording the video on motion detection..... Neha

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          I am searching about an object on the codeproject and sudden see Motion Detection Algorithms[^] and remembered that a OP aksed about motion detection so I repled to you.;)


          WhiteSky


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups