Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - dobedobedo

Pages: 1 [2] 3
Hi Alexey,
Yes I check 'calibration by panel' option, as well as both 'by panel' and 'sun sensor'. I followed the manual instruction to set primary channel to each band and mask every except the black panel (as attached image), and set the reflectance to Green: 0.0416, Red: 0.0416, Red edge: 0.042, NIR: 0.042. I ran 'calibrate reflectance' twice since I've heard there's a bug at the moment.

I check the metadata and there are 'Sensor Model' tag under XMP.

I tried the calibrate reflectance function on my old data which was taken by Sequoia on 2 Feb 2017. We didn't have a micasense panel at that time so we deployed multiple known reflectance customized panels on the ground. I used the black panel (4.2% reflectance) as reference in the calibrate reflectance dialogue. However, no matter how I tried by selecting panels only or both panels and sun sensor check, I always get a very weird result in green band as attached. I can send you the panel images I used, though the usable area is only several pixels.
Another question is how to convert the reflectance calibrated image to reflectance (0 to 1) for Sequoia images? There are two sayings I've heard: 1) divide the DN value by 32767, and 2) divide the DN value by maximum DN (65535?). Which is the correct answer?
My PhotoScan Pro version is 1.4.1 build 5929 64-bit if it helps.

General / Re: Questions about new calibrate color feature in 1.4
« on: January 23, 2018, 05:16:21 AM »
Thanks Alex,

May I ask that does the previous 'color correction' option correct all bands separately or simultaneously?

General / Questions about new calibrate color feature in 1.4
« on: January 22, 2018, 09:30:56 AM »

I just notice that in version 1.4, a new feature 'calibrate colors' is added. According to the changelog:

" Added Calibrate Colors command for vignetting and brightness calibration."

Meanwhile, the original 'color correction' option in 'build Orthomosaic' is removed.

Therefore, two questions are raised:
1. Is the 'calibrate colors' feature equivalent to the 'color correction' option in the previous version (1.3.4)?
2. When perform 'calibrate colors', we can select 'data source' and 'calibrate white balance'. Is it correct that 'data source' argument is for vignetting correction while 'calibrate white balance' is for brightness calibration?

Appreciated for your help!

Python and Java API / Re: Is it possible to modify loaded image?
« on: December 06, 2017, 03:58:51 AM »
The methods work! Thanks a lot.

Python and Java API / Is it possible to modify loaded image?
« on: December 05, 2017, 09:01:09 AM »

When I tried to modified the loaded image with:
Code: [Select] = New_ImageIt always shows the error
'PhotoScan.Photo' object attribute 'image' is read-only

Although I am able to manage modifying it with:
Code: [Select]
width = camera.sensor.width
height = camera.sensor.height
for u, v in [(u, v) for u in range(width) for v in range(height)]:[u, v] = New_Image()[u, v]
The efficiency is terrible in this case. It costs around one hour to process a 1280*960 image.

The reason I do this is I want to apply two different linear regression model to the image based on its DN value, and New_Image is the image I calculated and wish to be used for further process. The concept is like this:
Code: [Select]
if DN >= criteria:
    DN = linear_model1(DN)
    DN = linear_model2(DN)
Then the modified images can be used to process the orthomosaic directly so that I don't need to run photo alignment and other workflow again.
Any idea about how to achieve this would be very appreciated.  :)

Python and Java API / Re: Two Python scripting questions
« on: November 27, 2017, 02:24:20 AM »
Just interested that whether there's any update of this issue?

Python and Java API / Re: How to get pixel value for different band?
« on: November 27, 2017, 02:21:13 AM »
Thanks Alexey. This method works! Though all of the camera labels are the same, which is a little bit confused.

Python and Java API / How to get pixel value for different band?
« on: November 23, 2017, 10:20:16 AM »

I just can't figure out how to get the pixel value from different band through the Python API.
My photos are Parrot Sequoia multi-spectral images, and I added them via multispectral layout. I can also manage to set the master channel to review the different bands in the photo window. However, when I access the image by
Code: [Select] appears to have only one channel. And if I access the pixel value by
Code: [Select][600, 400]It gets me something like (27680, ), which seems only contains the pixel value of the master channel.
I tried to set master_channel from 1 to 4 and access the pixel value like[600, 400] but the values are always the same. Moreover, the information from camera.sensor.bands always contains the first master channel I set up (which is Green in this case) no matter how I change the master channel later.
I'm just curious that how PhotoScan store the information of multi-spectral images and how do I access the pixel value for different bands via Python API?
It would be appreciated to have your reply!

Python and Java API / Re: Disable photos based on list in CSV file
« on: November 22, 2017, 05:04:22 AM »
I think your script doesn't save the content in the csv file to camera_names. You could try to use the file IO methods in Python like:
Code: [Select]
camera_names = list()
with open(filename, 'r') as file:
    for line in file.readlines():
        Files = line.split(',')
        for File in Files:
Then the camera_names shall contains the filenames in your csv file.

Python and Java API / Re: Calculating the camera normal vector
« on: November 22, 2017, 02:51:37 AM »
I just figured out that the normal vector in the geocentric system should be just
Code: [Select]
R.t() * PhotoScan.Vector([0.0, 0.0, 1.0])and the y should have a negative sign since the axis is toward south.
Please correct me if I mis-understood.

Python and Java API / Re: Two Python scripting questions
« on: November 20, 2017, 03:03:41 AM »
Yes it is.
I tried using simple command in the Python console directly such as It also locks my project file after closing it.

Python and Java API / Calculating the camera normal vector
« on: November 16, 2017, 09:47:22 AM »

I want to make sure I don't do any mistake in the camera vector calculation.
As far as I know, the normal vector of a camera in chunk coordinate system can be calculated by:

Code: [Select]
principal_pixel = PhotoScan.Vector(camera.sensor.width/, camera.sensor.height/
normal_vector = camera.transform.mulv(camera.sensor.calibration.unproject(principal_pixel))

Then it should work to transform the vector to world coordinate system by

Code: [Select]
world_vector = chunk.transform.matrix.mulv(normal_vector)
and I can also get the camera rotation matrix in the world by
Code: [Select]
T = chunk.transform.matrix
m =
R= m * T * camera.transform * PhotoScan.Matrix().Diag([1, -1, -1, 1])
R = R.rotation()

I would like to know that whether the vector's direction is defined as y axis to north, x axis to east, and xy plane is parallel to the horizon, or is it based on the camera orientation. If it is based on camera orientation, can I transform it by multiply the transpose rotation matrix?
Appreciated for your help to make it clear!

Python and Java API / Re: Classify Trees???
« on: November 16, 2017, 09:10:34 AM »
You need to classify the ground first, and the rest depends on your environment.
If your survey area only contains trees, then after ground classification, the rest will be trees (You will probably need to take care of vehicles or people on the ground).
Otherwise, I don't think there is function to deal with trees specifically in PhotoScan. You can use the other software to do the classification though.

Python and Java API / Re: Two Python scripting questions
« on: November 15, 2017, 08:23:39 AM »
Hi Alexey,

I use Windows 10 64-bit.
The script was written on Linux though, so the end of line character is different. However, I don't think it's a problem for Python on Windows.

Pages: 1 [2] 3