Need help -- Unsupervised classification in QGIS of a non-georeferenced aerial photo?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help -- Unsupervised classification in QGIS of a non-georeferenced aerial photo?

Charlie Schweik
Hi GeoForAll colleagues,

I'm trying to generate an unsupervised classifcation of a single aerial photo taken by a quadcopter of gulls in a water body. I'm trying to count the gulls. 
The image is in X/Y Cartesian coordinates -- it is not georeferenced. I'm trying to use QGIS' Semi-automated classification plug-in.
I can't get it to work because the image isn't in a geographic or projected coordinate system.

Does anyone have any ideas on how I could do this in QGIS? 

Thanks in advance,

Charlie Schweik


--
Charlie Schweik

Professor 
Department of Environmental Conservation & School of Public Policy
University of Massachusetts, Amherst

Facebook: Charles.Schweik
Twitter: @cschweik


_______________________________________________
GeoForAll mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geoforall
Reply | Threaded
Open this post in threaded view
|

Re: Need help -- Unsupervised classification in QGIS of a non-georeferenced aerial photo?

labrinos

Hi Charlie,

You have to georefernce the image.
Go to Plugins and check the "Georeferencer GDAL" plugin and then run  
the plugin.
Follow the instructions.

Nikos



Παραθέτοντας από Charlie Schweik <[hidden email]>:

> Hi GeoForAll colleagues,
>
> I'm trying to generate an unsupervised classifcation of a single aerial
> photo taken by a quadcopter of gulls in a water body. I'm trying to count
> the gulls.
> The image is in X/Y Cartesian coordinates -- it is not georeferenced. I'm
> trying to use QGIS' Semi-automated classification plug-in.
> I can't get it to work because the image isn't in a geographic or projected
> coordinate system.
>
> Does anyone have any ideas on how I could do this in QGIS?
>
> Thanks in advance,
>
> Charlie Schweik
>
>
> --
> Charlie Schweik
>
> Professor
> Department of Environmental Conservation & School of Public Policy
> University of Massachusetts, Amherst
>
> Facebook: Charles.Schweik
> Twitter: @cschweik



--
Δρ. Νίκος Λαμπρινός
Καθηγητής της Διδασκαλίας της Γεωγραφίας
Τμήμα Δημοτικής Εκπαίδευσης
Α.Π.Θ. 54124 Θεσσαλονίκη
Τηλ.: 2310 991201 / 991230
Email: [hidden email]
Web Page: http://users.auth.gr/labrinos/
          http://www.digital-earth.edu.gr/
          https://www.auth.gr/univUnits

---------------------------------------------------------------------
Dr. Nikos Lambrinos
Professor of Geography Teaching
Director of Digital Analysis and Educational Design Laboratory
President of the Hellenic digital earth Centre of Excellence
Faculty of Education
School of Primary Education
Dept. of Science and New Technologies
Aristotle University of Thessaloniki
GR-54124 Thessaloniki, Greece
Tel: +30 2310 991201
Email: [hidden email]
Web Page:     http://users.auth.gr/labrinos/
              http://www.digital-earth.edu.gr/
              https://www.auth.gr/en/univUnits

_______________________________________________
GeoForAll mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geoforall
Reply | Threaded
Open this post in threaded view
|

Re: Need help -- Unsupervised classification in QGIS of a non-georeferenced aerial photo?

Lene Fischer
In reply to this post by Charlie Schweik

Hi

I made this workflow – a bit out of the original question – but found it fun to do  - (Like Saturday eve jigsaw puzzle)

 

How to count seagulls.

 

Workflow:

 

Open some sort of background – eg. OSM – Remember to have your CRS correct

Add your images to a folder

Use plugin Import Photos. This gives you the position of the image.

 

I estimated the area for the photo – Used the measure line for the ‘setup’.

Georeferenced the 4 corners and added the images (Raster>georeference)

 

Create a temp scratch layer as a mask for the area with seagulls.

Clip raster by mask layer

 

Change the image symbology from rgb to singleband grey

In Rasctercalculator find rasterband@1>=130 change col and row with divide by 4 – if I use original pixelsize the next step will have too many polygons.

 

Rasterpixel to polygon or polygonise

 

Select Expression find field ‘Value’ or DN = 0 (depends which finction you use for raster to polygons).  Delete selected

Buffer 0.01 Dissolve

Multipart to single part

Find features smaller than a seagullà delete

Find larger polygons (eg. Plastic)

Count polygons

 

In your image 463 seaguls.

Happy counting. In this way your student learn to manually do the tricks – and might do it in Modelbuilder too ;-)

 

 

 

cid:image005.png@01D4CBC4.6947D1D0

 

Regards

 

Lene Fischer

Associate Professor

 

University of Copenhagen

Department of Geoscience and Natural Resource Management

Forest and Landscape College

Nødebovej 77a

3480 Fredensborg

Denmark

 

 

MOB +45 40115084

[hidden email]

 

 

 

 

 

 

 

Fra: GeoForAll [mailto:[hidden email]] På vegne af Charlie Schweik
Sendt: 23. februar 2019 13:52
Til: OsGeo, GeoForAll
Emne: [Geo4All] Need help -- Unsupervised classification in QGIS of a non-georeferenced aerial photo?

 

Hi GeoForAll colleagues,

 

I'm trying to generate an unsupervised classifcation of a single aerial photo taken by a quadcopter of gulls in a water body. I'm trying to count the gulls. 

The image is in X/Y Cartesian coordinates -- it is not georeferenced. I'm trying to use QGIS' Semi-automated classification plug-in.

I can't get it to work because the image isn't in a geographic or projected coordinate system.

 

Does anyone have any ideas on how I could do this in QGIS? 

 

Thanks in advance,

 

Charlie Schweik


 

--

Charlie Schweik

Professor 

Department of Environmental Conservation & School of Public Policy

University of Massachusetts, Amherst

 

Facebook: Charles.Schweik

Twitter: @cschweik

 


_______________________________________________
GeoForAll mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geoforall
Reply | Threaded
Open this post in threaded view
|

Re: Need help -- Unsupervised classification in QGIS of a non-georeferenced aerial photo?

Charlie Schweik
In reply to this post by Charlie Schweik
Thanks tons Lene! And also I'm grateful to Nikos and Adam Steer for ideas as well. 
This will be one of a set of labs for an Unmanned Aerial Systems lab manual I am developing and will share with the GeoForAll community when finished. 

This is a simple 1-image RGB analysis lab counting gull populations on a reservoir, trying to get population #s as the water agency folks don't have a good idea how many and they make messes in the water supply!

Thanks again everyone!
Charlie Schweik


On Sat, Feb 23, 2019 at 4:24 PM Lene Fischer <[hidden email]> wrote:

Hi

I made this workflow – a bit out of the original question – but found it fun to do  - (Like Saturday eve jigsaw puzzle)

 

How to count seagulls.

 

Workflow:

 

Open some sort of background – eg. OSM – Remember to have your CRS correct

Add your images to a folder

Use plugin Import Photos. This gives you the position of the image.

 

I estimated the area for the photo – Used the measure line for the ‘setup’.

Georeferenced the 4 corners and added the images (Raster>georeference)

 

Create a temp scratch layer as a mask for the area with seagulls.

Clip raster by mask layer

 

Change the image symbology from rgb to singleband grey

In Rasctercalculator find rasterband@1>=130 change col and row with divide by 4 – if I use original pixelsize the next step will have too many polygons.

 

Rasterpixel to polygon or polygonise

 

Select Expression find field ‘Value’ or DN = 0 (depends which finction you use for raster to polygons).  Delete selected

Buffer 0.01 Dissolve

Multipart to single part

Find features smaller than a seagullà delete

Find larger polygons (eg. Plastic)

Count polygons

 

In your image 463 seaguls.

Happy counting. In this way your student learn to manually do the tricks – and might do it in Modelbuilder too ;-)

 

 

 

cid:image005.png@01D4CBC4.6947D1D0

 

Regards

 

Lene Fischer

Associate Professor

 

University of Copenhagen

Department of Geoscience and Natural Resource Management

Forest and Landscape College

Nødebovej 77a

3480 Fredensborg

Denmark

 

 

MOB +45 40115084

[hidden email]

 

 

 

 

 

 

 

Fra: GeoForAll [mailto:[hidden email]] På vegne af Charlie Schweik
Sendt: 23. februar 2019 13:52
Til: OsGeo, GeoForAll
Emne: [Geo4All] Need help -- Unsupervised classification in QGIS of a non-georeferenced aerial photo?

 

Hi GeoForAll colleagues,

 

I'm trying to generate an unsupervised classifcation of a single aerial photo taken by a quadcopter of gulls in a water body. I'm trying to count the gulls. 

The image is in X/Y Cartesian coordinates -- it is not georeferenced. I'm trying to use QGIS' Semi-automated classification plug-in.

I can't get it to work because the image isn't in a geographic or projected coordinate system.

 

Does anyone have any ideas on how I could do this in QGIS? 

 

Thanks in advance,

 

Charlie Schweik


 

--

Charlie Schweik

Professor 

Department of Environmental Conservation & School of Public Policy

University of Massachusetts, Amherst

 

Facebook: Charles.Schweik

Twitter: @cschweik

 



--
Charlie Schweik

Professor 
Department of Environmental Conservation & School of Public Policy
University of Massachusetts, Amherst

Facebook: Charles.Schweik
Twitter: @cschweik


_______________________________________________
GeoForAll mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geoforall
Reply | Threaded
Open this post in threaded view
|

Re: Need help -- Unsupervised classification in QGIS of a non-georeferenced aerial photo?

adam steer-2
Nice work Lene!

I'd still like to try an OBIA approach ( all in a Jupyter notebook) - it may help students with some approaches to trickier classification tasks later. It’s still more or less simple thresholding to say which type of object is which, but also can use more information to help with the decision. (years ago I tried some penguins on nests, this method would have counted a lot of rocks as well as a lot of penguins - but OBIA also didn’t work, since in RGB the response of a rock shadow is the same as a penguin, and also about the same size )

Cheers


--

_______________________________________________
GeoForAll mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geoforall

image001.png (1002K) Download Attachment
image003.png (1K) Download Attachment
image002.gif (6K) Download Attachment