Ask Your Question

project_310's profile - activity

2017-09-06 18:32:13 -0500 received badge  Student (source)
2013-02-28 06:18:10 -0500 commented answer Width measurement of image parts

I still am unable to find the width . Can you help me with the code for it pls ? It's urgent.

2013-02-14 03:16:08 -0500 asked a question Determining the distance

Hello I am not able to find the width of the red boxes given below. image description

I actually want to find the ratio of those 3 .

Also can someone please explain is there any way we can get the above width in millimeters .

Or is there any conversion of number of pixels to width in millimeters. The photo is taken from a constant height ( 4 cm). I am new to the world of opencv .Kindly help

2013-02-14 02:53:19 -0500 commented answer Width measurement of image parts

It worked perfectly , thanks ! Now , I need to measure the width between the two red lines ( of all 3 red boxes ) I was thinking of traversing from one red pixel top to botton for all 3 , is that feasible in opencv? Can you suggest something else for measuring width ?

2013-02-13 07:45:49 -0500 commented answer Loading image

I cant find this setting , can u pls elaborate and explain where to find and activate the above settings?

Sorry for troubling you on this trivial problem , but it's really not working !

2013-02-13 05:21:48 -0500 asked a question Sobel Edge Detection

Hello

I am using again a direct code from documentation and it is still not working after many efforts and tweaks , so I'm posting it here ...it's related to loading image using Mat operator which I still cant get to work ( I can load via IplImage operation)

So pls tell me how to rn the following code or if theres any thing wrong with it

#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>

using namespace cv;

/** @function main */
int main( int argc, char** argv )
{

  Mat src, src_gray;
  Mat grad;
  char* window_name = "Sobel Demo - Simple Edge Detector";
  int scale = 1;
  int delta = 0;
  int ddepth = CV_16S;

  int c;

  /// Load an image
  src = imread( argv[1] );

  if( !src.data )
  { return -1; }

  GaussianBlur( src, src, Size(3,3), 0, 0, BORDER_DEFAULT );

  /// Convert it to gray
  cvtColor( src, src_gray, CV_RGB2GRAY );

  /// Create window
  namedWindow( window_name, CV_WINDOW_AUTOSIZE );

  /// Generate grad_x and grad_y
  Mat grad_x, grad_y;
  Mat abs_grad_x, abs_grad_y;

  /// Gradient X
  //Scharr( src_gray, grad_x, ddepth, 1, 0, scale, delta, BORDER_DEFAULT );
  Sobel( src_gray, grad_x, ddepth, 1, 0, 3, scale, delta, BORDER_DEFAULT );
  convertScaleAbs( grad_x, abs_grad_x );

  /// Gradient Y
  //Scharr( src_gray, grad_y, ddepth, 0, 1, scale, delta, BORDER_DEFAULT );
  Sobel( src_gray, grad_y, ddepth, 0, 1, 3, scale, delta, BORDER_DEFAULT );
  convertScaleAbs( grad_y, abs_grad_y );

  /// Total Gradient (approximate)
  addWeighted( abs_grad_x, 0.5, abs_grad_y, 0.5, 0, grad );

  imshow( window_name, grad );

  waitKey(0);

  return 0;
}

IT builds successfully but shows nothing as output !

2013-02-13 05:15:49 -0500 commented answer Loading image

I keep trying that again and again and I still cant load the image using the Mat operator I tried the method via Iplimage one , that works good but after reading documentation it's an old method and the memory management is not good !

So pls help me with this MAT method as it still isnt working , it builds successfully , but shows Command prompt with following line ...

Usage: display_image ImageToLoadAndDisplay

Either give me a different code using Mat operator or help me out with this one code one. I am using all codes from documentation , still they dont work ..serious problems and frustrating !

2013-02-13 05:11:40 -0500 commented answer Errors in visual c++

yes , codes work without any problem ...just warnings Thanks.

2013-02-13 05:11:12 -0500 commented answer Width measurement of image parts

Thank you sir It's a good result , as I am pretty new to this , some explanation of your code would be very helpful..just a brief one will do ! And btw thanks a lot !

2013-02-13 04:23:15 -0500 received badge  Scholar (source)
2013-02-13 04:23:07 -0500 received badge  Critic (source)
2013-02-13 04:23:00 -0500 received badge  Supporter (source)
2013-02-12 10:27:14 -0500 asked a question Loading image

Hello

I dont understand where exactly do i write the filename or pathname of image in the most basic code , I have tried different versions of code and successsfulyl loaded images ..bt the documentation has the following code :

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
    if( argc != 2)
    {
     cout <<" Usage: display_image ImageToLoadAndDisplay" << endl;
     return -1;
    }

    Mat image;
    image = imread(argv[1], CV_LOAD_IMAGE_COLOR);   // Read the file

    if(! image.data )                              // Check for invalid input
    {
        cout <<  "Could not open or find the image" << std::endl ;
        return -1;
    }

    namedWindow( "Display window", CV_WINDOW_AUTOSIZE );// Create a window for display.
    imshow( "Display window", image );                   // Show our image inside it.
    waitKey(0);                          // Wait for a keystroke in the window
    return 0;
}

PLS tell me where do i write the pathname/filename to load my image.

2013-02-12 08:25:05 -0500 commented question Width measurement of image parts

I want to measure the width of the 3 bands formed , and then take their ratio . I have reached till the above image after various operations ( the original image had clear bands but edge detection wasnt possible , now it is due to clear difference between the bands and background)

2013-02-11 22:29:02 -0500 asked a question Width measurement of image parts

Hello

I've been working on opencv for past few days , I have successfully run tbe basic operations of images on it.

I have an image whose edge detection was performed and the edges are showing up now . Now , I need to measure the distance between the two edges Note : The edges are not straight lines , also the edges are basically part of a band .!

Also the edge detection of this image is not working , so I need help on both parts , the edge detection and also the width measurement of the 3 bands shown .

Any help would be appreciated .

image description

2013-02-08 02:09:23 -0500 asked a question Errors in visual c++

Hello I am trying to integrate the opencv libraries to the ms visual c++ 2010 . After a lot of efforts the libraries are loaded witht hte help of the youtube video , but now another bunch of errors regarding missing dll files show up. I tried same method on different laptop ...same problem !

ERRORS :

'pks1.exe': Loaded 'C:\Users\Eternity\Documents\Visual Studio 2010\Projects\pks1\Debug\pks1.exe', Symbols loaded. 'pks1.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'E:\opencv243\build\x86\vc10\bin\opencv_core243.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\msvcp100.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\msvcr100.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'E:\opencv243\build\x86\vc10\bin\opencv_highgui243.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\avifil32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\winmm.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\msacm32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\msvfw32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\shell32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\avicap32.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file 'pks1.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded. 'pks1.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded. 'pks1.exe': Loaded 'C:\Windows\System32\imm32.dll ... (more)