Your first step is to define the battery voltages when the batteries are considered to be "full" and when you consider them "empty".
Obviously charging the batteries to 4.4 V and then discharging them to 2.5 V will give a higher capacity than if you would charge/discharge between 4.1 V and 3.7 V. These voltages are just examples, they depends on model and chemistry of the battery.
Using 4.4 V and 2.5 V puts a lot more stress on the batteries so they will wear out sooner than if you would use 4.1 V and 3.7 V.
The reason why discharge curves are mostly done using constant current is that we can then simply derive from amount of time discharging takes what the stored charge (in Ah: Amp-Hours) was. Not that that does not tell us anything about the capacity in Watt-Hours. For that you'd have to multiply with the average battery voltage or more accurate: integrate over the battery voltage curve.
If the discharge curve is measured with a non constant current you would also need to integrate the current over time so that you would get the actual charge (in Ah) that is extracted in a given amount of time. To get the capacity in Watt-Hours you would need to integrate over the battery voltage again.
So sure, it is possible to get the capacity in Watt-Hours from the discharge curves with the non constant discharge current but it requires some mathematical wizardry to get the numbers out.
What you could do to make things easier at the cost of accuracy is to assume that all the curves (voltage, current) are straight lines with a constant slope. Then you can just take the average of each. Example: You charge/discharge between 4.1 V and 3.7 V, the average is then 3.9 V. The discharge current varies between 1 A and 0.8 A, then 0.9 A is the average. If discharging then takes 1 hour your battery's capacity is 0.9 Ah and it had released 3.5 Whr of energy during this discharge. Not that accurate but if you just want to compare batteries then this method is good enough.