About us

Join us FREE!

Write and publish your ideas, thoughts, blogs or articles on any topic. You are at right place for guest blogging. Post tutorials for knowledge sharing. Upload respective images and tag your YouTube or Facebook videos with the articles and share it on various social media with simple steps. Join us Free to add your post.



Monthly trending articles on ConnectClue

Shivam  posted in History

Showing results for Abhishek Remove
clc;
foregroundDetector = vision.ForegroundDetector('NumGaussians', 3, ...
        'NumTrainingFrames', 50);
    V=VideoReader('bac cifix 15 min.avi');
    videoReader = vision.VideoFileReader('sample.avi');
    for i = 1:150
        frame = step(videoReader); % read the next video frame
        foreground = step(foregroundDetector, frame);
       end
       imwrite(frame,'C:\Abhishek\Paper\BlockMatchingAlgoMPEG\Video_Velocity\new.jpg','jpg');
       videoPlayer = vision.VideoPlayer('Name', 'Detected Subtitlis');
       videoPlayer.Position(3:4) = [650,400];  % window size: [width, height]
       se = strel('square', 3); % morphological filter for noise removal
       referenceimage=imread('C:\Abhishek\Paper\BlockMatching\Video_Velocity\new.jpg'); 
       X=zeros(2,121);
       Y=zeros(2,121);
       Z=zeros;
       while ~isDone(videoReader)
           frame = step(videoReader); % read the next video frame
           % Detect the foreground in the current video frame
           foreground = step(foregroundDetector, frame);
           % Use morphological opening to remove noise in the foreground
           filteredForeground = imopen(foreground, se);
           %-----------------------SPEED ---------------------------%
           frame2=((im2double(frame))-(im2double(referenceimage)));
           frame1=im2bw(frame2,0.1); 
           [Labelimage]=bwlabeln(frame1); 
           stats=regionprops(Labelimage,'basic');
           BB=stats.BoundingBox;
           i=2; %fblasst for
           X(i)=BB(1);
           Y(i)=BB(2);
           Dist=((X(i)-X(i-1))^2+(Y(i)-Y(i-1))^2)^(1/2);
           Z(i)=Dist;
           M=median(Z);
           %disp(M);
           %clc;
           %disp('speed=')
           Speed=((M)*(120/8))/(4);
           %disp(Speed);
           %SPEED = M ???????????
           i = i + 1;
           SE = strel('disk',6); 
           frame3=imclose(frame1,SE); 
           step(videoReader); 
           pause(0.05);
              %if(i==121) end; ??
        %-----------------------SPEED ---------------------------%
        % Detect the connected components with the specified minimum area, and
        % compute their bounding boxes
        blobAnalysis = vision.BlobAnalysis('BoundingBoxOutputPort', true, ...
        'AreaOutputPort', true, 'CentroidOutputPort', true, ...
        'MinimumBlobArea', 150);
        %bbox = step(blobAnalysis, filteredForeground);
        [areas, centroids, bbox] = step(blobAnalysis, filteredForeground);
        % Draw bounding boxes around the detected cars
        result = insertShape(frame, 'Rectangle', bbox, 'Color', 'green');
        % Display the number of cars found in the video frame
        %ICI
        disp(centroids); 
        disp(size(centroids));
        numCars = size(bbox, 1); %cars ...
        numCars_str = ['Frame:', num2str(size(bbox, 1))];
        speed_str = [num2str(Speed),'KM/h'];
        result = insertText(result,[10,10],numCars_str, 'BoxOpacity', 1, ...
            'FontSize', 14);
        for i=1:size(bbox, 1)
        result = insertText(result,[centroids(i,1),centroids(i,2)], speed_str, 'BoxOpacity', 1, ...
            'FontSize', 20);
           end;
           step(videoPlayer, result);  % display the results
       end;
       
       release(videoReader); % close the video file

Abhishek  posted in Technical

Post updated on:  Sep 6, 2020 10:53:00 AM

1. Download postgress -  ex - version 10 as zip file
 https://www.postgresql.org/download/
 2. unzip postgress. and go to command prompt.
 3. create a folder named data anywhere as ex - "C:\Users\Abhishek\data"
 4. go to bin folder of postgress and run command like below.
    C:\pgsql\bin>set PGDATA=C:\Users\Abhishek\data
5. run -  pg_ctl init
6. run below command
   pg_ctl -D "C:\Users\Abhishek\data" -l logfile start
  7. create user ? and enter password as shown below
   createuser.exe -P -s -e pguser
8. createdb.exe -U "pguser" localdb
 9 connect DB with username and password using pgadmin, HeidiSql.

Abhishek  posted in Technical

Post updated on:  Sep 6, 2020 10:49:17 AM

Discover your area of interest

More recent categories

Back to top