Merge branch 'main' of http://Elara:3000/Sean/marketdata
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using MarketData.Utils;
|
||||
using System.Drawing.Imaging;
|
||||
@@ -9,12 +9,11 @@ namespace MarketData.CNNProcessing
|
||||
{
|
||||
public static class BitmapExtensions
|
||||
{
|
||||
// This call is used to generate the training, test, and validation bitmaps.
|
||||
// This call is used to generate the training, test, and validation bitmaps..
|
||||
// I noticed a large difference in the accuracy or the model when the quality parameter is 100.
|
||||
// I therefore intentionally not using EncoderParameters to specify quality but instead taking the default quality.
|
||||
public static void SaveJPG100(this Bitmap bmp, string filename)
|
||||
{
|
||||
// bmp.Save(filename,ImageFormat.Jpeg);
|
||||
EncoderParameters encoderParameters = new EncoderParameters(1);
|
||||
encoderParameters.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, 100L);
|
||||
bmp.Save(filename, GetEncoder(ImageFormat.Jpeg), encoderParameters);
|
||||
|
||||
Reference in New Issue
Block a user